Hi,
I’m pretty now in this and need your help with one of my systems. When I do a backtest, the system works fine but now I’ve started it live, it does not make the same trads as in testing. In fact, it makes no trade when it’s live?
This is the code, quite simple I think.
What is wrong?
Big thanks for your help :))
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
//-------------------------------------------------------------------------
// Main code : MACD cross over
//-------------------------------------------------------------------------
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Conditions to enter long positions
indicator1 = MACDline [ 12 ,26 ,9 ] (close )
c1 = (indicator1 CROSSES OVER 0 )
IF c1 THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// Conditions to enter short positions
indicator2 = MACDline [ 12 ,26 ,9 ] (close )
c2 = (indicator2 CROSSES UNDER 0 )
IF c2 THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
// Stops and targets
SET STOP %LOSS 0.09
SET TARGET %PROFIT 0.36