![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jun 2008
Location: Hong Kong
Posts: 214
Thanks: 0
Thanked 0 times in 0 posts
|
Hello, if for example I have an ExitLongStop order working in the market, is it possible to access the price so it can be used in another calculation after its been placed?
Thanks |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
John833,
You would need to create an IOrder object to store the order and then you can access it to get the price.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jun 2008
Location: Hong Kong
Posts: 214
Thanks: 0
Thanked 0 times in 0 posts
|
ok thanks....
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Sep 2008
Posts: 483
Thanks: 0
Thanked 2 times in 2 posts
|
Josh,
Couldn't you also reference the object by name? |
|
|
|
|
|
#5 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
|
Not sure I follow r2kTrader - do you refer to something like this?
myExitLongStop.AvgFillPrice
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#6 | |
|
Senior Member
Join Date: Sep 2008
Posts: 483
Thanks: 0
Thanked 2 times in 2 posts
|
Hey Bertrand,
Actually I was referring to referencing an order by name rather than using token. Quote:
|
|
|
|
|
|
|
#7 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
r2kTrader,
Technically, but you can have multiple executions for the same entry order and to access the accurate information of the whole order you would want to deal with the IOrder directly instead of a single execution.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#8 | |
|
Senior Member
Join Date: Sep 2008
Posts: 483
Thanks: 0
Thanked 2 times in 2 posts
|
Quote:
But then you have to manually manage the order. Can you cancel an order by name without using AOH? While I think I am back to AOH because I can't get 100% of what I need without it, I would like to give the managed model one more shot before I give up. |
|
|
|
|
|
|
#9 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
|
Unfortunately you're back to AOH, since you need to refer to an IOrder object to cancel it specifically.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Limit Orders above and below price | tradenoob | Suggestions And Feedback | 3 | 05-30-2009 06:14 AM |
| Accessing Price Data Outside of OnBarUpdate() | phineas | General Programming | 4 | 04-01-2008 02:32 PM |
| Accessing the NINJA price database externally | EvolveK | General Programming | 6 | 02-06-2008 10:34 AM |
| Limit orders filled at different price | Richard Von | SuperDOM and other Order Entry Windows | 4 | 01-28-2008 12:02 PM |
| Accessing order fill price and quantity | NinjaTrader_Ray | Strategy Development | 2 | 01-03-2008 12:16 AM |