donmat: Can anybody do this for Metatrader 4?
|
|
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Can anybody do this for Metatrader 4?
Here's the Easy Language Code:
Inputs:Period(130),Coef(.2),VCoef(2.5), SmoothingPeriods(3);
Vars:TP(0), Inter(0), VInter(0), CutOff(0), VAve(0), VMax(0), VC(0), MF(0),
DirectionalVolume( 0 ), myVFI(0);
TP = TypicalPrice;
if TP > 0 and TP[1] > 0 then
Inter = Log(TP) - Log(TP[1])
else Inter = 0;
VInter = StdDev( Inter, 30 );
CutOff = Coef * VInter * Close;
VAve = Average(V,Period)[ 1 ];
VMax = VAve * VCoef;
VC = IFF( V < VMax , V, VMax );
MF = TP - TP[1];
DirectionalVolume = IFF( MF > CutOff, +VC, IFF( MF < -CutOff, -VC, 0 ) );
if VAve <> 0 then
myVFI = Summation( DirectionalVolume, Period ) / Vave
else myVFI = 0;
If SmoothingPeriods > 0 then myVFI = XAverage(myVFI, SmoothingPeriods)
else myVFI = myVFI;
Plot1(myVFI,"VFI",GREEN);
Plot2(0 ,"0");