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 cmoran13, Yesterday, 01:02 PM
        0 responses
        29 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        21 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        160 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        95 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        148 views
        2 likes
        Last Post CaptainJack  
        Working...
        X