View Full Version : Using NTOrderStatus for Stops/Target
03-15-2006, 03:35 AM
I understand that I can use Stop1, Target1 in place of OrderID to get the status of an order or to change it. My question is how do you do this when you have multiple positions across mulitple instruments? THe NTORderStatus function only takes orderID and this would be the same for every position (ie Stop1, Target1, etc)
I was thinking there must be a way to send the StrategyID with the request but don't know the correct parameter input order to use in the dll call,
ie is it
Or is there some other way to do it?
03-15-2006, 05:26 AM
You need to pass in a strategy id which would uniquely identify the stop/target . This means you need to pass in a strategy id on the first order that creates the strategy. Make sure you use unique strategy ids.
03-15-2006, 05:35 AM
THanks. I am doing that. Where I'm confused is when I'm checking order status for a specific instrument/strategy combo, what do I pass through the NTORderStatus function? If I use Stop1, Target1, etc, and I have 5 open positions, how do I know which status is being reported back?
03-15-2006, 06:42 AM
Sorry for the confusion. Right now there is no way to retrieve order status on a strategy based order. It is on our list. No ETA at this time.
03-15-2006, 08:35 AM
Let me ask the question another way. I need to determine if there is are outstanding stop & target orders for a specific instrument. I have the orderID and strategyID available. Using orderID I can determine if the entry order was filled, but how do I determine if any of the stops or targets are still open?
The issue is I am running into is with IB and forex trades. THere are no positions so NTMarketPosition always returns flat so I can't determine if I am still in a position when another signal is generated. I thought checking if any of the stops/targets are still unfilled from the last order sent from Esignal would give me the information I need.
03-15-2006, 01:00 PM
There is no way to retrieve this information. This is a known limitation and on our list. The only thing you could do is take care of the stop/target submission on your side and not use an NT strategy.
03-15-2006, 03:17 PM
OK. THanks. Just wanted to make sure there was no way around it.
03-16-2006, 01:33 AM
No problem. The problem is that there can be more than one order at the T1 level and therefore you can have multiple order states....
05-11-2006, 11:38 AM
Just looking for the same thing, just wondering if there has been any progress on this since March?
05-11-2006, 08:05 PM
05-18-2006, 03:54 AM
Does anybody know of any work arounds? I am using esignal to trigger with efs and IB as the broker. The ASMs are the best way to initiate the trade, but I need to know how the strategy went after it was filled. Has anybody done a method using the IB activeX controls or Ninja Script.
I would like to use something better then account p/l to calculate this.
Please please please get back to me.
05-18-2006, 04:47 AM
Sorry to ramble, but is maybe the best way to do this:
place a strategy with an order id
if it gets filled monitor the strategy position.
If it goes flat
look at current price
if it is close to the target or above
assume failed trade
05-18-2006, 06:50 AM
That could work.
05-19-2006, 04:56 AM
I got this working and so far it is pretty accurate, but it would be great if in the next version you could get more information about a stratefy like relized p/l and unrelized p/l plus th stuff you can use on a regular order.
My next question is this: why would I get this error?
Entry order quantity is greater than cummulative totals of stop loss/profit target quantities
5/19/2006 8:21 Strategy Entry order quantity is greater than cummulative totals of stop loss/profit target quantities
05-19-2006, 05:08 AM
Because the order qty of the order you are entering exceeds the total qty the strategy will manage.
If you have a strategy to manage 5 contracts, your entry order needs to be 5 contracts.
05-19-2006, 05:17 AM
I am using one target and loss in my asm and did not specify a quantity.
05-19-2006, 05:36 AM
The strategy template you create manually has a qty set. Through the ATI you must use this qty when placing an entry order.
05-29-2006, 09:16 AM
Here is what I am doing
upon execution fo main()
if trading criteria is met
try to put in strategy order at limit price
on next pass next execution look at strategy position if it is still at 0 then (maximum speed every 5 seconds( after modification))
cancel previous startegy
put in strategy order again
This is causing a problem though because I am getting orders into a position sometimes that is an odd number. The strategy does not specify a quantity because it is a simple stop and target strategy, so I pass it a quantity when I put in the order.
Other then going to market orders and then not caring next pass on if it got in or not do you have any sugestions?
Also can you test a reply tick file in esignal and have Ninja understand the concept and simulate trading with it?
05-29-2006, 12:46 PM
Let memake sure I understand:
Are you referring to getting partially filled on your limit order?
Yes you can use eSignal tick replay and trade against it. In the Help Guide, there is a section that covers setting up Market Replay with eSignal.