I have been developing strategies using Market Replay for more than a year and everything works as I wish.
But when I put them to work in real time with a simulated account, various disconnection problems began to appear that I had obviously not encountered until then.
These problems have sometimes restarted my strategies (which is already a problem for me) and sometimes they have disconnected my connection and it has stay disconnected until I have noticed it and had to restart it manually, which is already a disaster .
I attach screenshot of each of the different cases of disconnection suffered and I beg you to provide me with both an explanation for each of them and the way in which my strategists should manage that disconnection so that they do not restart and that the connection does not stay disconnected:
Type 1 disconnection (2 examples): Strategies are deactivated (apparently because the primary connection is lost) and restarted when that primary connection recovers.
Type 2 disconnection (2 examples): The primary connection disconnects causing a logoff and remains disconnected for life until it is manually started again.
I have already looked at several forums before writing this Post, and I anticipate telling you several things:
1.- The computer that runs Ninja Trader is a virtualized machine in the cloud with a professional provider that guarantees that it is turned on 24 hours / day and with an uninterrupted internet connection. I mean therefore that it is not a problem of the ISP, neither of the firewall nor of the IP, since that computer has a static IP.
2.- In the network adapter of that machine, the option "Allow the computer to turn off this device to save power" was NOT disabled. Obviously I have already activated it to work from now on, but in principle it is difficult for me to think that this is the cause, since for said device to be turned off by Windows, the traffic must be null for too long, which is highly unlikely on a card network.
3.- Control Center's Tools> Options> Strategies menu is "Recalculate" and NOT "Keep Running" and "Disconnect Delay Seconds" is set to 10. I understand that it would be advisable both to increase this time and to set the management to "Keep Running", but I would like you explain to me well how both these options and the other two relating to "Number of starts attempted" and "Restart in x minutes" works to acquire a complete knowledge of disconnection management.
Finally, I would like you to explain to me how I can avoid the following behavior:
1.- A strategy is started
2.- This strategy launches 3 orders: 1 to set a Stop Loss, another to set a Profit Target and another to make a purchase.
3.- Strategy is deactivated (manually or due to the aforementioned connection losses)
4.- The strategy is activated again (manually or automatically after recovering the connection)
5.- The buy order is kept as there are open positions BUT THE STOPLOSS AND PROFIT TARGET ORDERS ARE AUTOMATICALLY CANCELED by Ninja Trader, which is a disaster for me.
How can I make sure that such orders are not canceled?
Note: I am using Ninja Trader 8 version 8.0.24.2 64-bit.
Thanks in advance.
Comment