doptAccountPositionAware = true;
StartBehavior = StartBehavior.AdoptAccountPosition;
However, probably tha tis not relevant to this problem: i want a live-syncrhonization of Chart-Trader executions into strategy .
For example, BOTH strategy is flat and Account is flat. My Strategy creates entries (with EnterLong), and then I use ChartTrader to exit.
EnterLong() commands are are visible on chart, and it's executions are reflected into ChartTrader (i.e. CT can exit Strategy triggered orders).
However, once i exit strategy-created entry, then strategy is unable to re-enter with EnterLong command (I use if(PositionAccount.MarketPosition == Mktp.Flat) EnterLong() ).
So, the problem is that, when strategy fired an ENTRY order(and closed by ChartTrader), then it still sees strategy's internal position as "LONG" (even thought i manually reset `Position` property and successfully re-execute the EnterLong command, it no longer executes the order, it even doesnt reach to OnOderUpdate event)
here is my code:
I tried another attempt (for that, check the "try_auto_change_order" chechbox), but that creates a double orders...
will this help?: https://ninjatrader.com/support/help...ount_class.htm or this https://ninjatrader.com/support/foru...786#post437322
need your help. thanks
Comment