Tuesday
Script runs. Creates a market order with a Limit and Stop OCO, hits the profit target, cancels the stop order, updates Ninja - success.
Creates another market order with a Limit and Stop OCO, hits the profit target, cancels the stop order, updates Ninja - success.
Strategy hit its 1% profit for the day and makes no other trades.
Wednesday (today)
Script runs. Creates a market order with a Limit and Stop OCO, hits the profit target, cancels the stop order, updates Ninja - success.
Creates another market order with a Limit and Stop OCO, hits the profit target, cancels the stop order, does not update Ninja. In TD, account is flat. In Ninja, it shows it is still working the Limit and Stop orders. Thirty minutes later, the market reverses which triggers an Exit within the strategy. Ninja attempts to close the order at TD, but is rejected as there is no open order. Ninja sends a cancellation request for the orders and then promptly shuts down the strategy.
So, one, the Output file really shows nothing. It basically logs the PlaceOrders(), but does not log incoming limit notifications. The Log file does show this information for the first order that hit its profit target. The second order has no errors or anything in the log. It's almost like TD didn't send anything to Ninja to inform it of the limit execution and cancel of stop order.
and two, we know that it can work. It's worked properly 3 times in the last 2 days. So, is this just a connection problem? Or is this an issue more specific with TD? Any insight is appreciated. My goal is leave this unattended.
Comment