Hi,
I am testing the attached simple system for Daily data:
T=18
P=30
EMA1 period = P
EMA2 period = 5 * P
I1 = RSI[14](close)
I2 = ExponentialAverage[EMA1](close)
I3 = ExponentialAverage[EMA2](close)
C1 = I1 CROSSES UNDER 30
C2 = I2 > I3
C3 = I1 CROSSES OVER 70
C4 = I2 < I3
//Conditions for long positions
IF NOT LongOnMarket AND C1 and C2 THEN
BUY 1 CONTRACTS AT MARKET
ENDIF
// Conditions for exit long positions
If LongOnMarket AND BARINDEX - TRADEINDEX > T THEN
SELL AT MARKET
ENDIF
// Conditions for short positions
IF NOT ShortOnMarket AND C3 AND C4 THEN
SELLSHORT 1 CONTRACTS AT MARKET
ENDIF
// Conditions for exit short positions
IF ShortOnMarket AND BARINDEX - TRADEINDEX > T THEN
EXITSHORT AT MARKET
ENDIF
It seems to work fine except for every instrument I try , I always get a vertical black line on a certain date (Aug 1st 2010) which seems to block testing before this date.
Why I am getting this nasty black line and how could I remove it ?
Thanks
Solved ! I just deselected tick by tick mode and now its OK
This black line mark the start date of the backtest. If you choose the tick-by-tick option, the history of backtest is smaller than without it, and without it, the start date is very often the very first bar of the history, that’s why you can see it with the tick option checked.