Comment on algoZ- a simple example

Varesh commented on 02 Oct 2013, 03:01 PM

Hi Zerodha,

I am getting below error while trying to back test the strategy as mentioned below. Could you please help me on this quickly.

I have NIFTY30OCT5800CE chart for 30 mins interval where I have added Directional Movement System for 14 period and MACD (26,13,9) to back test this strategy.

Buy Expression:

CLOSE > REF(HIGH,1) AND ADX(14) > 25 AND REF(ADX(14),1) < 25 AND MACD(26,12,9,EXPONENTIAL) > 0 AND CLOSE < REF(CLOSE,-1) AND REF(CLOSE,-1) < REF(CLOSE,-2)
AND REF(CLOSE,-2) < REF(CLOSE,-3)
Buy exit: 0
Sell Expression:
CLOSE < REF(LOW,1) AND ADX(14) > 25 AND REF(ADX(14),1) < 25 AND MACD(26,12,9,EXPONENTIAL) < 0 AND CLOSE > REF(CLOSE,-1) AND REF(CLOSE,-1) > REF(CLOSE,-2)
AND REF(CLOSE,-2) > REF(CLOSE,-3)
Sell exit: 0

Error:

Backtest ScriptError : Error: Scripts Generated No Trades.
Please look in above error and advise me accordingly.

Thanks.

View the full comment thread »