StartBehavior=WaitUntilFlat.
When it went Flat, I disabled it (say at 14:25), and just added some more informational Print statements (no changes to the program structure), recompiled, and re-enabled the strategy at 14:34. If it had remained enabled it would have gone Long 'for real' at 14:30.
After re-enabling the strategy it correctly picks up this EnterLong at 14:30 and shows:
Position=100000L", Acct= -
but it also says "Sync=true" which is surely wrong, because the real Account is flat so is NOT in sync with the strategy.
Now each subsequent OnBarUpdate tries to use ExitLongLimit(price), and price specified is being hit during the bar, but the strategy does not simulate this action, so does not go Flat, so it remains in (amber) "waiting until it reaches a flat position" and so never goes back to live mode again.
Comment