![]() |
|
|||||||
| Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Join Date: Feb 2006
Location: , Illinois, USA
Posts: 20
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
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 dll.call(("OrderStatus",orderid, strategyid) or dll.call("OrderStatus, orderid,"","","","","","","","","","","",strategyi d) Or is there some other way to do it? THanks, Jonathan |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
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.
Ray
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Join Date: Feb 2006
Location: , Illinois, USA
Posts: 20
Thanks: 0
Thanked 0 times in 0 posts
|
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?
Jonathan |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
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.
Ray
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Join Date: Feb 2006
Location: , Illinois, USA
Posts: 20
Thanks: 0
Thanked 0 times in 0 posts
|
Bummer.
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. Thanks, Jonathan |
|
|
|
|
|
#6 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
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.
Ray
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Join Date: Feb 2006
Location: , Illinois, USA
Posts: 20
Thanks: 0
Thanked 0 times in 0 posts
|
OK. THanks. Just wanted to make sure there was no way around it.
Jonathan |
|
|
|
|
|
#8 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
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....
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Join Date: May 2006
Location: , ,
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
|
Hello,
Just looking for the same thing, just wondering if there has been any progress on this since March? |
|
|
|
|
|
#10 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
No progress.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#11 |
|
Join Date: May 2006
Location: , ,
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
|
Ok,
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. |
|
|
|
|
|
#12 |
|
Join Date: May 2006
Location: , ,
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
|
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 success else assume failed trade ??? |
|
|
|
|
|
#13 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
That could work.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#14 |
|
Join Date: May 2006
Location: , ,
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
|
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? 5/19/2006 8:21 Strategy 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 |
|
|
|
|
|
#15 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
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.
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|