NinjaTrader Support Forum  
X

Attention!

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


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 03-23-2010, 11:13 AM   #1
tradervick
Member
 
Join Date: Jul 2008
Posts: 57
Thanks: 0
Thanked 0 times in 0 posts
Default Does stop order has been ignored error message get generated when trading live?

In backtesting a new strategy, I had the following error message in the log file “A SellShort stop order placed at '2/12/2010 1:00:00 AM' has been ignored since the stop price is greater than or equal to close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.”

If this strategy was running live instead of being backtested, does NT block this order from going over the brokerage (MBT in my case) and give this error message or would the order go to the brokerage and come back with an order status of rejected?
tradervick is offline  
Reply With Quote
Old 03-23-2010, 01:14 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello TraderVick,

NinjaTrader will detect that this is an invalid order and it will not be sent to the broker.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 03-23-2010, 02:01 PM   #3
tradervick
Member
 
Join Date: Jul 2008
Posts: 57
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks for the reply. Another question. I am testing this new strategy in NT7, where I can set up a mail alert. Is this error log message an alert type?
tradervick is offline  
Reply With Quote
Old 03-23-2010, 02:16 PM   #4
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Creating mail alerts can be done in the strategy wizard. As one of your potential actions, you choose Misc > Send mail.
http://www.ninjatrader-support.com/H...SendMail1.html


The message you received isn't part of an alert. You would have to work with Iorder objects and check that the state of your order has been rejected. This is assuming you want to create an email alert based on its status. If this isn't your intention let us know.
http://www.ninjatrader-support.com/H...V6/IOrder.html
NinjaTrader_RyanM is offline  
Reply With Quote
Old 03-23-2010, 02:36 PM   #5
tradervick
Member
 
Join Date: Jul 2008
Posts: 57
Thanks: 0
Thanked 0 times in 0 posts
Default

From what I can tell, NT detected that the order was invalid and the OnOrderUpdate logic wasn't executed. OnOrderUpdate is where I check for the order state being rejected. Should I check for this state in the OnExecution section?
tradervick is offline  
Reply With Quote
Old 03-23-2010, 03:17 PM   #6
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

That's true, and no, OnExecution() will not receive the event either. You will have to check that the price is valid prior to submitting your order.


For Longs:
Code:
 
if (stopOrderPrice >= GetCurrentBid())
{
//Submit order
}
NinjaTrader_RyanM is offline  
Reply With Quote
Old 03-23-2010, 03:34 PM   #7
tradervick
Member
 
Join Date: Jul 2008
Posts: 57
Thanks: 0
Thanked 0 times in 0 posts
Default

Got it. Thanks for help!
tradervick is offline  
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
Scary Error Message In Live Trading - Help Gorlitsky.dan ATM Strategies (Discretionary Trading) 1 08-13-2009 11:05 AM
ATM error message in Live but not Sim vail55 ATM Strategies (Discretionary Trading) 1 08-04-2009 08:28 AM
Is this a broker generated error message? BT_Techsupport SuperDOM and other Order Entry Windows 1 05-12-2009 02:27 AM
Error Message when executing order Edgar V. SuperDOM and other Order Entry Windows 4 03-25-2008 02:47 PM
error message after placing live order mreis Miscellaneous Support 7 01-18-2006 05:08 PM


All times are GMT -6. The time now is 04:28 PM.