Type : Indicator, Name : MFI Convergence Divergence
inputs:
FastLength(12),
SlowLength(26),
SignalLength(9) ,
MFILength (14) ;
;
Variables:
MFI_CD( 0 ), { MFI Convergence Divergence Value }
MFI_Signal( 0 ), { MFI-CD Signal Line }
MFI_Diff( 0 ) { MFI-CD, Signal Line Difference }
;
{ Calculate MFI CD Values }
MFI_CD = MACD( Moneyflow(MFILength), FastLength, SlowLength ) ; { Calculate MACD of MFI }
MFI_Signal = Average(MFI_CD, SignalLength); { Calculate Signal Line }
MFI_Diff = MFI_CD — MFI_Signal;
Plot1( MFI_Signal, «MFI_Signal» ) ;
Plot2( MFI_Diff, «MFI_Diff» ) ;
Plot3( 0, «ZeroLine» ) ;
{ Alert criteria }
if Plot1 crosses over 0 then
Alert( «Bullish alert» )
else if Plot1 crosses under 0 then
Alert( «Bearish alert» ) ;