NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 11-19-2007, 11:17 AM   #1
whitmark
Certified NinjaScript Consultant
 
Join Date: Nov 2005
Location: Virginia, USA
Posts: 441
Thanks: 0
Thanked 12 times in 7 posts
Send a message via Skype™ to whitmark
Default Entry order placed . . . has been ignored

I am using advanced order handling in a strategy that returns the following message while backtesing in the Strategy Analyzer:

Quote:
2007-11-19 12:40:06:093 ERROR: An entry order placed at '10/5/2007 9:15:00 AM' has been ignored since there already are pending exit orders for the opposite site of the market in place. Please fix your strategy.
To summarize, what I am trying to backtest is . . .

7:15 am bar - place a EntryLongStopLimit order (aka buy stop )
8:15 am bar - Buy stop order is triggered and limit order is placed and filled. OnOrderUpdate method is used to place target limit and stop loss (market) orders above and below the average entry price respectively using the proper entry signal name.
9:15 am bar - Stop loss (market) order is hit to close the position. A new EntryShortStopLimit order (aka sell stop) is placed but is ignored per the message above.

I would have thought that the previous trade's outstanding exit order (target limit order) would have been cancelled via OCO and therefore not interfere with the new entry being placed in the opposite direction on the same bar.

1) Am I missing something or is this behavior expected?

2) Is there a way to have previous trade exits and new orders be placed in the opposite direction on the same bar?

3) Can you confirm whether "fix your strategy" messages of this nature are displayed once for the first occurrence or for each occurrence encountered within a strategy backtest?

Thanks,

Whitmark

PS Note the typo in the error message "site" vs "side".
whitmark is offline  
Reply With Quote
Old 11-19-2007, 11:57 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Default

In your example, wait for the stop order to be confirmed cancelled and then submit the next entry order. It will be cancelled once the position is closed out.

The error text will be changed in next release. Disregard the "fix your strategy"
NinjaTrader_Ray 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
Hotkey order entry chudx Suggestions And Feedback 7 11-25-2008 01:30 AM
Order entry Desire Mike Winfrey ATM Strategies (Discretionary Trading) 1 09-17-2007 02:49 PM
Submit Limit Entry Order and Stop Loss Order at same time? aspTrader Miscellaneous Support 2 10-04-2006 02:40 AM
wait for entry order fill before placing stoplimit order ratherBgolfing Automated Trading 2 03-27-2006 01:59 AM
order entry/exit Vin Miscellaneous Support 1 06-29-2005 12:10 AM


All times are GMT -6. The time now is 12:53 PM.