I’ll copy and paste my code just in case I have something wrong here.. But I can’t work out what the problem is.
I watch the backtest window work side-by-side the real window and they behave differently with the same code. The backtest opens cumulative orders but the live version does not… 🙁
DEFPARAM CumulateOrders = true //
// Conditions to enter long positions
indicator1 = MACD[12,26,9](close)
c1 = (indicator1 CROSSES OVER -1)
IF c1 THEN
BUY 1 PERPOINT AT MARKET
ENDIF
// Conditions to enter short positions
indicator3 = MACD[12,26,9](close)
c3 = (indicator3 CROSSES UNDER 1)
IF c3 THEN
SELLSHORT 1 PERPOINT AT MARKET
ENDIF
// Stops and targets
SET STOP pLOSS 20
SET TARGET pPROFIT 25