Hi guys.
I think I did backtest this code with success, but it seems like when Live trading a position was executed this morning at 5:00. It should be straight forward but apparently it’s not?
I cannot see what is wrong?
Cheers Kasper
DEFPARAM CumulateOrders = true
IF (Time >= 08000 AND Time <= 220000)then
Tradetime=1
else
Tradetime=0
endif
IF Not LONGONMARKET AND longcondition and tradetime THEN
BUY PositionSize CONTRACT AT MARKET
ENDIF
// short
IF Not SHORTONMARKET AND shortCondition and tradetime THEN
SELLSHORT PositionSize CONTRACT AT MARKET
ENDIF
Hi,
I’d say there is a missing zero,
Time >= 08000
vs
Time >= 080000
yes you are so right.. I’m such a noob.. Thanks anyway 🙂
Cheers Kasper