Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Possible to EnterShortStop and EnterLongStop on daily bar for breakout on the open?

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

    Possible to EnterShortStop and EnterLongStop on daily bar for breakout on the open?

    At the very end of one trading session, I would like to place one stop above the market and one stop below the market, to be executed on the close of the opening 1 minute bar of the next trading day. This would provide me the perfect breakout system on the open.

    I tried to do this with the following 2 lines, which get executed on the Daily Bar OnBarUpdate, at the very end of the trading day. (The number 2 refers to the 1 minute bar time series).

    this.EnterShortStop(2, true, 1, lowThreshold, shortStopName);
    this.EnterLongStop(2, true, 1, highThreshold, longStopName);

    The problem is that only the first stop gets placed, and a message in the Ninja Trader Log says:

    "An Enter() method to submit an entry order at '9/11/2008 12:00:00 AM' has been ignored. Please search on the term 'Internal Order Handling Rules' in the Help Guide for detailed explanation."

    I found the following rule in the help guide:

    (Orders are ignored for reasons including...)

    The strategy position is flat and an order submitted by an enter method (EnterLongLimit() for example) is active and the order is used to open a position in the opposite direction

    I really need to have two stops, one above the market and the other below the market, placed and ready to be executed on the Open of the following trading day, and they shouldn't be executed by accident in the last few minutes of the previous session.

    What are my options for a workaround for this Internal Order Handling Rule?

    Thanks in advance!

    ChiTrader2000

    #2
    Hello,

    In NinjaScript, you cannot have two orders working in the opposite direction.

    This link has information on this near the bottom:
    DenNinjaTrader Customer Service

    Comment


      #3
      Could new version of NT allow EnterShortStop and EnterLongStop in mkt at same time?

      Hello,

      I really would like to be able to do what I was asking about in my original post.

      I need to be able to have a EnterShortStop and EnterLongStop in the market at the same time, one above the market and one below the market. I only need this to work in backtest mode, if that helps at all.

      Could the new version of Ninja Trader include this feature?

      Thanks!

      ChiTrader2000

      Comment


        #4
        Simultaneous orders in opposite directions is not allowed. You should submit just one and if price moves closer to the other one, cancel the first and then place in the second.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        633 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X