View Full Version : Connection Lost, How make NT to re-send an order?
Hi,
I'm using eSignaland areal IB account.I've got the following problem. My limit order was executed and"Strategy" was supposed to send stop and limit orders after that, but didn't because of a connection loss. The connection was restored automatically within a minute, but the stop\target orders were not sent. As a result, I've got a naked possitionthrough the night and I've lost very uncomfortable amount of money.
My question is: Is it possible to make NT to re-send orders automatically after the connection is restored?
Thanks!
NinjaTrader_Ray
02-04-2006, 01:17 AM
No it is not but you do have the ability to place a standard limit and stop for exits tied via OCO.
- Right click menu, OCO order
- Place limit exit
- Place stop exit
- Right click menu, OCO order (disable)
Now you will be protected.
Ray
Ray,
Sure, I could put stop\limit orders manualy, if I was around. But, it happenedat 2am in the morning and I wasn't. I think it's the whole idea of automated trading that you don't need to babysit your trading every minute...
Is it possible to check from esignal script that the stop\limit orders were placed successully?
Thanks!
NinjaTrader_Ray
02-04-2006, 12:18 PM
There is no way to check the status of a stop loss submitted via a strategy. You could if your script submitted the stop loss and profit target orders themselves. If that is the case, use the NTOrderStatus() function.
I guess one could parse a status file. It's time consuming to implement, but I think it's doable, isn't it?
May be NT can send an email in case of an error? This function could be very useful.
I've just checked the manual and I wounder what exactly this function does
intStrategyPosition(stringstrategyId)
It says: Gets the position for a strategy. Returns 0 for flat, negative value for short and positive value for long.
Is it what I asked for?
NinjaTrader_Ray
02-05-2006, 02:20 AM
No, because it will not tell you if the strategy submitted orders or not. It's not a reliable source of information to determine if stop/targets were successfully submitted. The only option is to submit the stop/targets from your EFS and then check each order via the NTOrderStatus() function.
On another note, within the next few months we will have the ability to automate your entire strategy via NinjaScript.
Ray