![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Nov 2009
Posts: 24
Thanks: 0
Thanked 0 times in 0 posts
|
I am trying to ensure that I robustly handle any rejected stop orders when they are placed on the wrong side of the market due to fast moving markets.
For real-time, I overrode the default error handler, and then submit it as a market order. However, this code does not fire in backtesting...so I implemented a basic check of: if (price == stop price) then market order entry, else stop order entry. That seems to work, but my question really is how to best code so that the same code will be used for both real time and backtesting? Is that possible, or is my solution above the recommended method? And, will NT7 simply have a built in option to handle rejected stops so that they can be resubmitted as market orders or should I just add the default override of the error handler for all my systems? I am porting from TS because I am tired of their inability to handle rejected stops btw...so this is quite a key issue for me. Thanks |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
SIFTrader,
Since backtesting is different than real-time, the approach you used will be the one to take. If you wish to control it to become a market order I would recommend programming the logic yourself.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jul 2009
Location: San Francisco Bay Area
Posts: 216
Thanks: 0
Thanked 4 times in 3 posts
|
SIFTrader/Josh:
Can you point me to any link on how to override the default error handler? I need to take care of exactly the same situation. This is one of the most pernicious problems when trading some instruments because often the exchange (e.g. GLOBEX) will cancel your order instead of executing it as you intended! Thanks |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
I will have someone reply to you on Monday. Thank you for your patience.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jul 2009
Location: San Francisco Bay Area
Posts: 216
Thanks: 0
Thanked 4 times in 3 posts
|
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,557
Thanks: 261
Thanked 1,015 times in 996 posts
|
aviat72, sorry for our delay - you can turn off auto error handling by setting RealTimeErrorHandling to TakeNoAction - http://www.ninjatrader-support.com/H...rHandling.html
Of course it's your responsibility then to properly account for all scenarios involved.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Order being rejected - Why?? | Josey | Miscellaneous Support | 3 | 10-09-2009 05:21 AM |
| Order Rejected | Hugo1 | Strategy Development | 1 | 02-09-2009 01:22 AM |
| Do simulated stops get hit less than "hard" stops? | ninjablanks | ATM Strategies (Discretionary Trading) | 1 | 01-07-2009 05:36 AM |
| The Ultimate Trend Indicator | jimbo002 | NinjaScript File Sharing Discussion | 3 | 11-09-2008 07:49 PM |
| Handling Rejected Orders with TradeStation 8.3 EL strategy, using NT | Rocket130713 | Automated Trading | 5 | 05-20-2008 07:15 AM |