can anyone help me convert this eld code to efs for esignal?
id apprecaite it greatly!!!!
Vince B
VFISmooth Function
inputs:
Coef( NumericSimple ),
VCoef( NumericSimple ),
Period( NumericSimple ),
SmoothedPeriod( NumericSimple ),
MyVolume( NumericRef ),
CutOff( NumericRef ),
VC( NumericRef ),
MF( NumericRef ),
VFI( NumericRef ) ;
variables:
MyTypicalPrice( 0 ),
Inter( 0 ),
VInter( 0 ),
VAve( 0 ),
MyVolAvg( 0 ),
VMax( 0 ),
DirectionalVolume( 0 ) ;
MyTypicalPrice = TypicalPrice ;
MyVolAvg = Average( MyVolume, Period ) ;
MF = MyTypicalPrice - MyTypicalPrice[1] ;
if MyTypicalPrice > 0 and MyTypicalPrice[1] > 0 then
begin
Inter = Log( MyTypicalPrice ) - Log( MyTypicalPrice[1] ) ;
VInter = StdDev( Inter, 30 ) ;
CutOff = Coef * VInter * Close ;
VAve = MyVolAvg[1] ;
VMax = VAve * VCoef ;
VC = Iff( MyVolume < VMax , MyVolume, VMax ) ;
DirectionalVolume = Iff( MF > CutOff, VC, Iff( MF <
-CutOff, -VC, 0 ) ) ;
VFI = IFF(Summation( DirectionalVolume, Period ) = 0, 0, Summation( DirectionalVolume, Period ) /
VAve) ;
VFISmooth = XAverage( VFI, SmoothedPeriod ) ;
end
else
VFISmooth = 0 ;
VFISmoothed Indicator
inputs:
Coef( 0.2 ), VCoef( 2.5 ), Period( 130 ), SmoothedPeriod( 3 ), EMAPeriod(7) ;
variables:
oCutOff( 0 ),
oVC( 0 ),
oMF( 0 ),
oVFI( 0 ),
MyVFI( 0 ),
MyVolume( 0 ),
MyEMA( 0 );
MyVolume = Iff( BarType < 2, Ticks, AbsValue(Volume) ) ;
MyVFI = VFISmooth( Coef, VCoef, Period, SmoothedPeriod, MyVolume, oCutOff, oVC, oMF, oVFI ) ;
MyEMA = XAverage(MyVFI, EMAPeriod) ;
Plot1( MyVFI, "VFI" ) ;
Plot2( MyEMA, "EMA");
Plot3( 0, "0" ) ;
{Plot4(XAverage(MyVFI,20), "FastEMA");}
if MyEMA > 0 then
SetPlotColor( 2, DarkGreen )
else
SetPlotColor( 2, Red ) ;
VFI Volume Indicator
inputs:
Coef( 0.2 ),
VCoef( 2.5 ),
Period( 130 ),
SmoothedPeriod( 3 ),
EMAPeriod(50);
variables:
oCutOff( 0 ),
oVC( 0 ),
oMF( 0 ),
oVFI( 0 ),
MyVFI( 0 ),
MyVolume( 0 ),
MyEMA( 0 );
MyVolume = Iff( BarType < 2, Ticks, AbsValue(Volume) ) ;
MyVFI = VFISmooth( Coef, VCoef, Period, SmoothedPeriod, MyVolume, oCutOff, oVC, oMF, oVFI ) ;
MyEMA = Average(oVC, EMAPeriod);
Plot1( oVC, "VFIVol" ) ;
Plot2( MyEMA, "EMA" ) ;
if oMF > oCutOff then
SetPlotColor( 1, DarkGreen )
else if oMF < -oCutOff then
SetPlotColor( 1, Red )
else
SetPlotColor( 1, LightGray)
id apprecaite it greatly!!!!
Vince B
VFISmooth Function
inputs:
Coef( NumericSimple ),
VCoef( NumericSimple ),
Period( NumericSimple ),
SmoothedPeriod( NumericSimple ),
MyVolume( NumericRef ),
CutOff( NumericRef ),
VC( NumericRef ),
MF( NumericRef ),
VFI( NumericRef ) ;
variables:
MyTypicalPrice( 0 ),
Inter( 0 ),
VInter( 0 ),
VAve( 0 ),
MyVolAvg( 0 ),
VMax( 0 ),
DirectionalVolume( 0 ) ;
MyTypicalPrice = TypicalPrice ;
MyVolAvg = Average( MyVolume, Period ) ;
MF = MyTypicalPrice - MyTypicalPrice[1] ;
if MyTypicalPrice > 0 and MyTypicalPrice[1] > 0 then
begin
Inter = Log( MyTypicalPrice ) - Log( MyTypicalPrice[1] ) ;
VInter = StdDev( Inter, 30 ) ;
CutOff = Coef * VInter * Close ;
VAve = MyVolAvg[1] ;
VMax = VAve * VCoef ;
VC = Iff( MyVolume < VMax , MyVolume, VMax ) ;
DirectionalVolume = Iff( MF > CutOff, VC, Iff( MF <
-CutOff, -VC, 0 ) ) ;
VFI = IFF(Summation( DirectionalVolume, Period ) = 0, 0, Summation( DirectionalVolume, Period ) /
VAve) ;
VFISmooth = XAverage( VFI, SmoothedPeriod ) ;
end
else
VFISmooth = 0 ;
VFISmoothed Indicator
inputs:
Coef( 0.2 ), VCoef( 2.5 ), Period( 130 ), SmoothedPeriod( 3 ), EMAPeriod(7) ;
variables:
oCutOff( 0 ),
oVC( 0 ),
oMF( 0 ),
oVFI( 0 ),
MyVFI( 0 ),
MyVolume( 0 ),
MyEMA( 0 );
MyVolume = Iff( BarType < 2, Ticks, AbsValue(Volume) ) ;
MyVFI = VFISmooth( Coef, VCoef, Period, SmoothedPeriod, MyVolume, oCutOff, oVC, oMF, oVFI ) ;
MyEMA = XAverage(MyVFI, EMAPeriod) ;
Plot1( MyVFI, "VFI" ) ;
Plot2( MyEMA, "EMA");
Plot3( 0, "0" ) ;
{Plot4(XAverage(MyVFI,20), "FastEMA");}
if MyEMA > 0 then
SetPlotColor( 2, DarkGreen )
else
SetPlotColor( 2, Red ) ;
VFI Volume Indicator
inputs:
Coef( 0.2 ),
VCoef( 2.5 ),
Period( 130 ),
SmoothedPeriod( 3 ),
EMAPeriod(50);
variables:
oCutOff( 0 ),
oVC( 0 ),
oMF( 0 ),
oVFI( 0 ),
MyVFI( 0 ),
MyVolume( 0 ),
MyEMA( 0 );
MyVolume = Iff( BarType < 2, Ticks, AbsValue(Volume) ) ;
MyVFI = VFISmooth( Coef, VCoef, Period, SmoothedPeriod, MyVolume, oCutOff, oVC, oMF, oVFI ) ;
MyEMA = Average(oVC, EMAPeriod);
Plot1( oVC, "VFIVol" ) ;
Plot2( MyEMA, "EMA" ) ;
if oMF > oCutOff then
SetPlotColor( 1, DarkGreen )
else if oMF < -oCutOff then
SetPlotColor( 1, Red )
else
SetPlotColor( 1, LightGray)
Comment