I am testing the attached simple system for Daily data:
simple RSI system
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
T=18
P=30
EMA1period=P
EMA2period=5*P
I1=RSI[14](close)
I2=ExponentialAverage[EMA1](close)
I3=ExponentialAverage[EMA2](close)
C1=I1CROSSES UNDER30
C2=I2>I3
C3=I1CROSSES OVER70
C4=I2<I3
//Conditions for long positions
IFNOTLongOnMarketANDC1andC2THEN
BUY1CONTRACTSATMARKET
ENDIF
// Conditions for exit long positions
IfLongOnMarketANDBARINDEX-TRADEINDEX>TTHEN
SELLATMARKET
ENDIF
// Conditions for short positions
IFNOTShortOnMarketANDC3ANDC4THEN
SELLSHORT1CONTRACTSATMARKET
ENDIF
// Conditions for exit short positions
IFShortOnMarketANDBARINDEX-TRADEINDEX>TTHEN
EXITSHORTATMARKET
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 ?
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.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.