|02-25-2010, 05:00 AM||#1|
Join Date: Jan 2009
Thanked 21 times in 12 posts
sync account position after re-enable of strategy
I would like to understand the behaviour of this option:
Sync account position:
Today I had a strategy running. This strategy has 1 position open and 1 stop order active. The stop order is on the exchange.
Now I disconnect the LAN and then I reconnect the LAN to generate a disconnect- reconnect to the broker account.
There is still 1 position (FGBL -email@example.com ) and 1 stop order buy STP@124.42 active (since my orders are on the exchange)
Now I see my strategy disabled in the strategies tab. So I edit the strategy and set sync account position to true.
Then I enable the strategy. The strategy is running now and the position is synched with the strategy.
Not only I have 1 position, but I also have 1 stp order which should be sync'd with my strategy.
What happens to the stp order ?
Could you please explain?
Currently my trade is still open and the strategy should trail the stp order, but from my debug prints it looks like that this stp order is orphaned now and not updated by my strategy.
Please explain what I need to to to sync also this stp order.
|02-25-2010, 09:51 AM||#2|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Thanked 106 times in 70 posts
The sync account position does not influence stop/target orders. That is determined by your WaitUntilFlat/SubmitImmediately options.
Sync account position literally just means syncing of your account position to your strategy position. If your strategy started up that means it was able to recover your stop/target, but your code needs to be done properly for it to be able to move this order though. Please be sure you are using the new style of IOrder comparisons.
NinjaTrader Customer Service
|Thread||Thread Starter||Forum||Replies||Last Post|
|Strategy Position vs. Account Position||DaveS||Strategy Development||8||03-19-2009 05:48 PM|
|Strategy Position Vs Account Position||r2kTrader||Automated Trading||1||02-24-2009 07:42 AM|
|Strategy position VS account position||ju1234||Strategy Development||1||12-03-2008 06:44 AM|
|Re: Strategy Position vs. Account Position||Pete S||Strategy Development||1||11-14-2007 08:55 AM|
|Strategy Position vs. Account Position||NinjaTrader_Josh||Tips||0||11-12-2007 06:06 PM|