Need TRADESCRIPT code for Elder Force Index Indicator

Could anyone please Create Alert for Pi ?

"Elder Force Index"

 

BUY SIGNAL : When the period crosses above '0' line. Wait for confirmation of First Candle. The Second Candle opens with the same direction BUY.

SELL SIGNAL : When the period crosses below '0' line. Wait for confirmation of First Candle. The Second Candle opens with the same direction SELL.


Thank you and awaiting for reply.

hElLO tRaDeR,

Elder's Force Index Formula : 

CurrentPeriodClose - (PreviousPeriod Close) X Volume = EFI
 13 Period Exponential Moving Average of EFI = EFI (13)

BUY SCRIPT:

SET EF = (CLOSE - REF(CLOSE,1)) * VOLUME
SET EFI = EMA(EF, 13)
REF(EFI,2) < 0 AND 
REF(EFI,1) > 0 AND
EFI > REF(EFI,1) 

SELL SCRIPT:

SET EF = (CLOSE - REF(CLOSE,1)) * VOLUME
SET EFI = EMA(EF, 13)
REF(EFI,2) > 0 AND 
REF(EFI,1) < 0 AND
EFI < REF(EFI,1)