Hi
I have write the following code in the algo, but the result, it does not close the position at that time.
if shortonmarket and time = 230000 THEN
EXITSHORT positionsize CONTRACT AT MARKET
ENDIF
if longonmarket and time = 240000 THEN
SELL positionsize CONTRACT AT MARKET
ENDIF
You can see the Bar…these trade is over many days and close it at trail stop/target profit/stop loss.
Thanks
close it at trail stop/target profit/stop loss.
Hi Alfred – You are only talking about the first trade in that list, right ? all others look fine to me, although you don’t show the exit code for that.
Is that instrument from a market which is open at those times ? … I would find it harder to find instruments which are open at those times, if the times would be mapped to European times (Amsterdam specifically). And then this won’t work …
Thanks, the code is work in the other algo.
I am trying to find out the reason in this algo, thanks
240000 does not exit.
Time ranges from 000000 to 235959.
Thanks! Your are right, and fixed 🙂