Thanks!!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Connection Lost
Collapse
X
-
Connection Lost
What is the best way to configure NT8 to reconnect after a lost connection? Can it be configured to send an email on reconnect or would that have to be coded?
Thanks!!Tags: None
-
-
Hello RiversideDude,
Thanks for opening the thread.
There are various settings that you use to configure how your strategies work in the event of a connection loss. These settings can be found in the in the Tools > Options window under Strategies.
Strategies Options - http://ninjatrader.com/support/helpG...strategies.htm
You could trigger an email alert when you reconnect. This would involve using OnConnectionStatusUpdate() and SendMail().
SendMail() - http://ninjatrader.com/support/helpG...s/sendmail.htm
OnConnectionStatusUpdate() - http://ninjatrader.com/support/helpG...atusupdate.htm
Connection Handling - http://ninjatrader.com/support/helpG...sshandling.htm
Please let me know if you have any additional questions.JimNinjaTrader Customer Service
Comment
-
-
-
Hello RiversideDude,
These On Connection Loss settings can be adjusted in the Strategies category of the Options Menu.
Recalculate will resume the strategy if the below conditions are not met:
• If data feed disconnects for longer than the time specified in “Disconnect delay seconds”, the strategy is stopped and the disconnection is logged.
• If the order feed disconnects and the strategy places an order while disconnected, the strategy is stopped and the disconnection is logged.
• If both the data and order feeds disconnect for longer than the time specified in “Disconnect delay seconds”, the strategy is stopped and the disconnection is logged.
Stop Strategy will atop the strategy on a connection loss.
When configuring settings for On Connection Loss, I always suggest to test the strategy with the simulation account and interrupt your internet connection so you know you have the settings you want.
Could you provide more details as to how we can reproduce a situation where the output window freezes and does not scroll?
Please let me know if you have any additional questions.JimNinjaTrader Customer Service
Comment
-
Ok, I'll make the config and code changes. But how do I force a re-connect when I found that the connection to the broker has been lost WITHOUT disconnecting and reconnecting, which disables my running strategies and closes my open orders?
Thanks!!
Comment
-
Hello RiversideDude,
We typically recommend to change the On Connection Loss settings to control the strategies behavior during a connection loss.
If you break the rules that allow you to reconnect with On Connection Loss settings, then the strategy will be disabled.
You can specify very large values for these On Connection Loss settings so the strategy automatically tries to reconnect numerous times over a very long period of time. Doing this will allow your strategy to resume and not disable it self, and the re-establish the connection.
There are additional options listed where the strategy will not cancel the entry or exit orders it creates upon disable. If you have these settings unchecked, you can re-enable the strategy so it can resume and attempt to match existing orders if you have the appropriate Start Behavior defined.These options can be found in the Strategies Options documentation I have previously linked in my last 2 posts.
Please take some time to review the documentation on Syncing Account Positions and Start Behaviors. It is very important to understand how these start behaviors function. I highly advise to test these start behaviors to fully understand how they will react when you are trading with your live account.
The Syncing Account Position Documentation can be found here: http://ninjatrader.com/support/helpG..._positions.htm
Please let me know if you have any questions on the material.JimNinjaTrader Customer Service
Comment
-
-
I'm still experiencing disconnects from the broker. The previous instructions spoke about ways to configure the strategy to behave a certain way when the connection was restored. Is that the best I can hope for? Or, can I configure something in NT to reconnect to the broker?
Thanks!!
Comment
-
Hello RiversideDude,
Thanks for the additional question.
The information provided was to determine how NinjaTrader should try to resume your strategy, and how many times it should try within a certain period of time.
These settings will not prevent disconnects but will keep your strategy running under the rules specified.
If your strategy is still disconnecting, I would advise to look at the log tab of the Control Center to find out why. You will see an error noted that tells you why the strategy was aborted if it was. From there you will know how you can adjust your settings or your strategy so they work appropriately.
For example, you strategy may be aborted from an exceeded number of restart attempts. Solution : Increase number of restart attempts
As another example there could be logic in your strategy to place an order. If that order is submitted in a disconnect, another error will be reported and the strategy will abort. Solution: Utilize OnConnectionStatusUpdate() to detect disconnects and prevent strategy actions that would abort the strategy.
Please check your log tab and adjust your strategy and settings accordingly. Please also test these settings while trading on the Sim101 account so you can verify you have the right settings you are looking for.
If you have a question about an error you are receiving, please copy the entire error and share it with me so I can provide further input.
I look forward to being of further help.JimNinjaTrader Customer Service
Comment
-
It actually has nothing to with the strategy. The log says:
MyFXCM Primary connection= connection lost
.... lost order connection but will keep running.
.... lost price connection but will keep running
I also loss connection to NT historical data, but that reconnects. How do I get MyFXCM connection to reconnect?
Thanks!
Comment
-
Hello RiversideDude,
The connection should reestablish itself automatically.
I have tested this by connecting to my NinjaTrader FXCM account, unplugging my network connection, and plugging it back in.
If you can perform a similar test and the connection does not reestablish on its own, please let me know.JimNinjaTrader Customer Service
Comment
-
Thanks,I'll test this later. In the interest of time, if it doesn't reconnect, how to I fix it so that it does?
Thanks!!
Comment
-
Hello RiversideDude,
It is expected that you should reconnect automatically. If that is not the case please let us know.
The only other way you could "force" a reconnect is to disconnect from your provider and attempt to reconnect. This will disable the strategy and you will have to use an appropriate Start Behavior so the strategy can match any orders it had submitted previously and manage them.
As an example, Immediately Submit has such a behavior to match orders that were previously submitted on start up.
Please let me know if I may be of further assistance.JimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by AdamDJ8, Today, 09:18 PM
|
0 responses
2 views
0 likes
|
Last Post
by AdamDJ8
Today, 09:18 PM
|
||
Started by knowmad, Today, 03:52 AM
|
2 responses
26 views
0 likes
|
Last Post
by knowmad
Today, 09:03 PM
|
||
Started by ETFVoyageur, Today, 07:05 PM
|
0 responses
8 views
0 likes
|
Last Post
by ETFVoyageur
Today, 07:05 PM
|
||
Started by Orion815, 05-02-2024, 08:39 AM
|
2 responses
18 views
0 likes
|
Last Post
by Orion815
Today, 06:24 PM
|
||
Started by suroot, 02-25-2017, 04:43 AM
|
11 responses
2,554 views
0 likes
|
Last Post
by Zilvercat
Today, 05:36 PM
|
Comment