Hi,
Can anyone help me code the following EMA Crossover strategy in PI for backtesting :
Buy Signal
EMA 13 crosses above EMA 26
Close above crossover of EMA 13 and 26 AND
Volume greater than 10 day average volume AND
MACD relatively making a new high ( or up trend)
Exit buy Signal :
If close is below the low of previous candle
Sell Signal
EMA 13 crosses below EMA 26
Close below crossover of EMA 13 and 26 AND
Volume greater than 10 day average volume AND
MACD relatively making a new low ( or down trend)
Exit sell Signal :
If close is above the low of previous candle
Also , I have noticed that while backtesting, PI immediately generates buys or sells after an exit signal. How to stop PI for generating such signal and wait for a completely new crossover setup?
Thanks in advance