While doing backtesting I am getting error, please help me out

I had tested through the following buy and sell script but getting errorv :

BUY script:

LOW > REF(HIGH, 1) * 1.01 AND VOLUME > REF(VOLUME, 1) * 10

SELL script:

CROSSOVER(EMA(CLOSE, 26), EMA(CLOSE, 14))

As per the above condition the alerts will be generated only when the condition matches , in above condition you have mentioned 10 times increase of volume for next candle with previous one, so check with more historical data.

hElLO tRaDeR,

Your code is a GAP UP scanner which is ideal for 1day candlesticks.

The Realtime Pi SCANNER and BACKTEST ENGINE works on minute and hourly intraday candles.

On the intraday candles you rarely find gapups greater than 1%

Please use realistic values.

1 Like