![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Feb 2008
Posts: 108
Thanks: 0
Thanked 0 times in 0 posts
|
Is there a way (API?) to manage the exit of an order generated from within a strategy from outside the strategy?
Specifically i would like to move stops and targets on a multi contract entry (entry determined by logic in the strategy) from a program running concurrently with Ninja. The strategy might or might not be using DOM/ATM facilities. Thanks |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
|
Hi Roland, not a full API unfortunately but an Automated Trading Interface that should offer what you seek here : http://www.ninjatrader.com/support/h...terface_at.htm
Here's all you could do with this inferface - http://www.ninjatrader.com/support/h...o_and_how_.htm
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Feb 2008
Posts: 108
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks Bertrand
The DLL appears to be the right interface, but I could not tell from the descriptions if I could pick up from the DLL interface the details of a trade entered from strategy, i/e. a trade that was started not using the DLL API. Can you tell me which call[s] would do that? |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hi roland_nt,
You could look into these two from the dll functions page: string Orders(string account) Gets a string of order ID's of all orders of an account separated by '|'. *If a user defined order ID was not originally provided, the internal token ID value is used since it is guaranteed to be unique. string OrderStatus(string orderId) Gets the order state (see definitions) for the orderId. Returns an empty string if the order ID value provided does not return an order.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Feb 2008
Posts: 108
Thanks: 0
Thanked 0 times in 0 posts
|
Ryan:
Just to be very certain, 1) the order id string WOULD contain orders generated from within a running strategy? 2) Is the name of initiating strategy indicated somehow? 3) are closed orders (trade completed) also in the list or only open/unfilled Thanks for your patience |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
|
Roland, it would give you access to order running on the specified account, this can include automated ones, too.
You can check for the StrategyID field of the order. It should give you the orders string for the session being run.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using 3rd party indicators | kcyster | General Programming | 9 | 12-14-2010 09:38 AM |
| 3rd Party Licensing | DionysusToast | Miscellaneous Support | 4 | 12-10-2010 08:56 AM |
| 3rd Party Developers | stressless | General Programming | 0 | 09-29-2009 08:38 AM |
| 3rd party indicator causing problems with modifying other code. | andy2001 | Miscellaneous Support | 1 | 06-06-2008 11:20 AM |
| 3rd Party Programming | John_Aus | General Programming | 2 | 05-26-2008 10:51 PM |