![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jan 2008
Posts: 8
Thanks: 0
Thanked 0 times in 0 posts
|
Didn't find answers on my first pass through the documentation, so I figured the forum would be quicker:
1) How do I cancel a pending order using NinjaScript? There are methods for entering a new position and exiting an existing position, but I couldn't find anything which allows you to cancel an unfilled order. 2) How do you link orders together as One-Cancels-Other, etc? For example: I have a breakout strategy that goes long above X and short above Y. I want both orders active at the same time, but want the long order to be canceled if I go short (and vice versa). 3) How do I adjust the charts so that there is a fixed interval between the vertical time grid lines. For example, I would like the chart to start at 6:30am, and display 6:30, 7:00, 8:00, 9:00, etc, rather than 7:46, 8:06, 8:26, etc, etc. Thanks for your help. Matt |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
1) Orders automatically cancel at the close of a bar if they are not re-submitted again. One exception is if you are using NT 6.5 Beta, then there is an option to submit "LiveUntilCancelled" orders in which case you can use the Cancel() method.
2) Although this is supported in the current production release of 6.0, in 6.5 it will not be. You can only place one entry order in any direction. 3) Custom X axis formatting is unfortunately not supported.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jan 2008
Posts: 8
Thanks: 0
Thanked 0 times in 0 posts
|
Not sure I understand completely...Does this mean that unfilled orders cancel at the close of a bar?
If so, I assume this implies that all orders are held locally on Ninjatrader and not submitted to the brokerage servers? For example, if I am running a Ninjascript on a 2 minute chart and I submit an a limit order that is a large amount away from the current price, it will be deleted at the end of the bar and must be resubmitted each following bar until filled? Thanks much, |
|
|
|
|
|
#4 | |||
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
Quote:
Quote:
Quote:
Ray
NinjaTrader Customer Service |
|||
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming connections | Gumphrie | Connecting | 6 | 12-11-2009 03:09 AM |
| NinjaTrader programming services | Raditz | Indicator Development | 4 | 06-25-2009 05:37 PM |
| Programming error message | Betty | Installation and Licensing | 1 | 11-05-2007 09:09 AM |
| Advanced Programming | sbtrader | General Programming | 3 | 10-26-2007 10:11 AM |
| Need Help Programming Custom Indicator from TS to NT | stevestrading | Indicator Development | 4 | 06-20-2007 04:31 PM |