Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Entry order placed . . . has been ignored

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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:

    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
    NinjaTrader Ecosystem Vendor - Whitmark Development

    #2
    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"
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by algospoke, Yesterday, 06:40 PM
    2 responses
    19 views
    0 likes
    Last Post algospoke  
    Started by ghoul, Today, 06:02 PM
    3 responses
    14 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by jeronymite, 04-12-2024, 04:26 PM
    3 responses
    45 views
    0 likes
    Last Post jeronymite  
    Started by Barry Milan, Yesterday, 10:35 PM
    7 responses
    20 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by AttiM, 02-14-2024, 05:20 PM
    10 responses
    180 views
    0 likes
    Last Post jeronymite  
    Working...
    X