Bryan
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
When strategy loses connection
Collapse
X
-
Hello Bryan,
Thank you for writing in.
No, once the strategy has disabled itself due to hitting its max reconnect attempts, you would manually have to handle the strategy/position.
If you are having connection issues you might consider looking into a new internet provider or a VPS.
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
-
What about "StartBehavior.AdoptAccountPosition"? Is that not supposed to be its raison d'ętre.Originally posted by NinjaTrader_AlanP View PostHello Bryan,
Thank you for writing in.
No, once the strategy has disabled itself due to hitting its max reconnect attempts, you would manually have to handle the strategy/position.
If you are having connection issues you might consider looking into a new internet provider or a VPS.
Please let us know if you need further assistance.
ref: http://ninjatrader.com/support/helpG...rtbehavior.htm
Comment
-
Yes, good point. And that goes with this flag:
IsAdoptAccountPositionAware
Definition
Determines if the strategy is programmed in a manner capable of handling real-world account positions. Once set to true, your strategy's "Start behavior" options will include an additional parameter named "Adopt account position" which can bet set at run-time. Only set to true if you have specifically programmed your strategy to be able to adopt account positions.
Comment
-
Hello cassb,
Koganam provides a good suggestion for how to set up your strategy to begin re-managing an open position upon restart, thank you Koganam, however I have just submitted a bug report as its not behaving as expected.
Your question about writing and reading from a text file could work, however would require you use the unmanaged approach, which a more advanced programming topic. You could read more about that here,
If you were interested in that approach, I have provided links to reading/writing from a text file.
Indicator: Using StreamWriter to write to a text file
Then you could have your strategy read from the file, a reference example,
Indicator: Using StreamReader to read from a text file
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
Comment
-
Hello Bryan,
Go to Control Center>Tools>Options and under Strategy Categories, if you you set On Connection Loss>Handling> to Keep Running or Stop Strategy, then upon connection loss your strategy should behave as expected.
Start Behavior will only affect the strategies when they are first started.
I apologize for not following up on this sooner, I had forgot to include this ticket with the issue number and therefor couldn't follow up when it was explained to me.
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
Comment
-
OK thank you. But we had that option set to "Keep Running", but the problem was that it lost the connection and never reconnected. When we disconnected and reconnected to the provider, the strategy disabled and then was not able to manage the position. Is there a way around that to manually reconnect to the broker without disabling the strategy?
Thanks!
Bryan
Comment
-
I have the same issue. Its not a frequent occurrence but would be nice to have this as a backup plan. I set the connection timeout to 180s and reconnection attempts to 5. The major obstacle is if you have to restart NT8 due to a crash and re-enable the strategy once restarted. I set start behavior on the strategy to sync with account and submit immediately. This way, you would have all original orders closed prior to enabling again and a fresh set of orders out in sync with the original order submission. Only drawback is you might enter the same position as a less favourable price (or better if your lucky).
Comment
-
Exactly. I'm not sure why the strategy automatically disables when you disconnect from the broker, but it would be nice to have a switch to allow it to remain running while you reconnect so that it would stay in sync with the open positions at the broker.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
62 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
134 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment