NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 11-29-2009, 02:09 AM   #1
SIFTrader
Junior Member
 
Join Date: Nov 2009
Posts: 24
Thanks: 0
Thanked 0 times in 0 posts
Default Ultimate handling for rejected stops...how?

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
SIFTrader is offline  
Reply With Quote
Old 11-30-2009, 07:20 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

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.
NinjaTrader_Josh is offline  
Reply With Quote
Old 12-19-2009, 11:36 PM   #3
aviat72
Senior Member
 
Join Date: Jul 2009
Location: San Francisco Bay Area
Posts: 216
Thanks: 0
Thanked 4 times in 3 posts
Default

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
aviat72 is offline  
Reply With Quote
Old 12-20-2009, 07:30 PM   #4
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

I will have someone reply to you on Monday. Thank you for your patience.
NinjaTrader_Ben is offline  
Reply With Quote
Old 12-28-2009, 06:54 PM   #5
aviat72
Senior Member
 
Join Date: Jul 2009
Location: San Francisco Bay Area
Posts: 216
Thanks: 0
Thanked 4 times in 3 posts
Default

Quote:
Originally Posted by NinjaTrader_Ben View Post
Hello,

I will have someone reply to you on Monday. Thank you for your patience.
Bump...
This is an important topic in any robust system so any pointers will be useful
aviat72 is offline  
Reply With Quote
Old 12-29-2009, 05:22 AM   #6
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,557
Thanks: 261
Thanked 1,015 times in 996 posts
Default

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.
NinjaTrader_Bertrand is online now  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 02:25 AM.