Finite Volume Element by zuijaideai
4402 downloads / 4751 views / Created: 23.05.2013




Average Rating: 0
Indicator Description
Hi All,
This is a Finite Volume Element indicator by Markos Katsanos. There are few version of this FVE indicator, some use Original Value of FVE, some use the Smoothing of FVE and others use Linear Regression of FVE. This indicators support both of these versions.

Forum link: Finite Volume Element
Best Rgds
Denny Imanuel
imanuel.denny@gmail.com
This is a Finite Volume Element indicator by Markos Katsanos. There are few version of this FVE indicator, some use Original Value of FVE, some use the Smoothing of FVE and others use Linear Regression of FVE. This indicators support both of these versions.

Forum link: Finite Volume Element
Best Rgds
Denny Imanuel
imanuel.denny@gmail.com
Comments
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
//==============================================================
// Forex Strategy Builder
// Copyright � Miroslav Popov. All rights reserved.
//==============================================================
// THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE.
//==============================================================
using System;
using System.Drawing;
using ForexStrategyBuilder.Infrastructure.Entities;
using ForexStrategyBuilder.Infrastructure.Enums;
using ForexStrategyBuilder.Infrastructure.Interfaces;
namespace ForexStrategyBuilder.Indicators.Store
{
public class FiniteVolumeElement : Indicator
{
public FiniteVolumeElement()
{
IndicatorName = "Finite Volume Element";
PossibleSlots = SlotTypes.OpenFilter | SlotTypes.CloseFilter;
SeparatedChart = true;
IndicatorAuthor = "Denny Imanuel";
IndicatorVersion = "2.1";
IndicatorDescription = "A custom indicator for FSB and FST.";
}
public override void Initialize(SlotTypes slotType)
{
SlotType = slotType;
// The ComboBox parameters
IndParam.ListParam[0].Caption = "Logic";
IndParam.ListParam[0].ItemList = new string[]
{
"The FVE Signal rises",
"The FVE Signal falls",
"The FVE Signal is higher than the Level line",
"The FVE Signal is lower than the Level line",
"The FVE Signal crosses the Level line upward",
"The FVE Signal crosses the Level line downward",
"The FVE Signal changes its direction upward",
"The FVE Signal changes its direction downward"
};
IndParam.ListParam[0].Index = 0;
IndParam.ListParam[0].Text = IndParam.ListParam[0].ItemList[IndParam.ListParam[0].Index];
IndParam.ListParam[0].Enabled = true;
IndParam.ListParam[0].ToolTip = "Logic of application of the indicator.";
IndParam.ListParam[1].Caption = "Chart's Signal";
IndParam.ListParam[1].ItemList = new string[]
{
"Original FVE",
"Moving Average of FVE",
"Regression Slope of FVE",
};
IndParam.ListParam[1].Index = 0;
IndParam.ListParam[1].Text = IndParam.ListParam[1].ItemList[IndParam.ListParam[1].Index];
IndParam.ListParam[1].Enabled = true;
IndParam.ListParam[1].ToolTip = "The method used for smoothing the both Moving Averages.";
IndParam.ListParam[2].Caption = "Smoothing Method";
IndParam.ListParam[2].ItemList = Enum.GetNames(typeof(MAMethod));
IndParam.ListParam[2].Index = (int)MAMethod.Simple;
IndParam.ListParam[2].Text = IndParam.ListParam[2].ItemList[IndParam.ListParam[2].Index];
IndParam.ListParam[2].Enabled = true;
IndParam.ListParam[2].ToolTip = "The method used for smoothing the both Moving Averages.";
// The NumericUpDown parameters
IndParam.NumParam[0].Caption = "FVE Samples";
IndParam.NumParam[0].Value = 22;
IndParam.NumParam[0].Min = 1;
IndParam.NumParam[0].Max = 200;
IndParam.NumParam[0].Enabled = true;
IndParam.NumParam[0].ToolTip = "The period of Finite Volume Element";
IndParam.NumParam[1].Caption = "Smoothing/Regression Period";
IndParam.NumParam[1].Value = 10;
IndParam.NumParam[1].Min = 1;
IndParam.NumParam[1].Max = 200;
IndParam.NumParam[1].Enabled = true;
IndParam.NumParam[1].ToolTip = "The period of smoothing or regression";
IndParam.NumParam[2].Caption = "CutOff";
IndParam.NumParam[2].Value = 0.003;
IndParam.NumParam[2].Min = 0;
IndParam.NumParam[2].Max = 1;
IndParam.NumParam[2].Point = 4;
IndParam.NumParam[2].Enabled = true;
IndParam.NumParam[2].ToolTip = "A cutoff level (for the appropriate logic).";
IndParam.NumParam[3].Caption = "Level";
IndParam.NumParam[3].Value = 0;
IndParam.NumParam[3].Min = -100;
IndParam.NumParam[3].Max = 100;
IndParam.NumParam[3].Point = 4;
IndParam.NumParam[3].Enabled = true;
IndParam.NumParam[3].ToolTip = "A critical level (for the appropriate logic).";
// The CheckBox parameters
IndParam.CheckParam[0].Caption = "Use previous bar value";
IndParam.CheckParam[0].Enabled = true;
IndParam.CheckParam[0].ToolTip = "Use the indicator value from the previous bar.";
}
public override void Calculate(IDataSet dataSet)
{
DataSet = dataSet;
// Reading the parameters
MAMethod maMethod = (MAMethod )IndParam.ListParam[2].Index;
int iSample = (int)IndParam.NumParam[0].Value;
int iLength = (int)IndParam.NumParam[1].Value;
double dCutOff = IndParam.NumParam[2].Value;
double dLevel = IndParam.NumParam[3].Value;
int iPrvs = IndParam.CheckParam[0].Checked ? 1 : 0;
double[] adTP = Price(BasePrice.Median);
double[] adFVE = new double[Bars];
double[] adFVESig = new double[Bars];
double[] adVolPM = new double[Bars];
double dMF;
double dFVEfactor;
double dFVESum;
double dVOLAvg;
int iFirstBar = Math.Max(iSample, iLength) + 2;
for (int iBar=iFirstBar; iBardCutOff*Close[iBar]) dFVEfactor = 1;
else if (dMF<-dCutOff*Close[iBar]) dFVEfactor = -1;
else dFVEfactor = 0;
adVolPM[iBar] = Volume[iBar] * dFVEfactor;
dFVESum = 0; dVOLAvg=0;
for (int iBack=0; iBack
Risk warning: Forex, spread bets and CFD are leveraged products. They may not be suitable for you as they carry a high degree of risk to your capital and you can lose more than your initial investment. You should ensure you understand all of the risks.
Copyright © 2006 - 2025, Forex Software Ltd.;
Copyright © 2006 - 2025, Forex Software Ltd.;