Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

error message on entry ()

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

    error message on entry ()

    i recieved an error message this morning. i'm not sure what it means.

    is it okay to have short and longs in the same strategy?
    Attached Files

    #2
    Hello SteveReiza,

    Thank you for your inquiry.

    From the Managed Approach help guide page:

    Methods that generate orders to enter a position will be ignored if:
    • A position is open and an order submitted by a non market order exit method (ExitLongLimit() for example) is active and the order is used to open a position in the opposite direction
    • A position is open and an order submitted by a set method (SetStopLoss() for example) is active and the order is used to open a position in the opposite direction
    • A position is open and two or more Entry methods to reverse the position are entered together. In this case the second Entry order will be ignored.
    • 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
    • The entry signal name is not unique

    You should also review the scenarios listed above and compare them to your script to ensure that the strategy is not falling into one of these scenarios.

    Managed Approach Internal Order Handling Rules: https://ninjatrader.com/support/helpGuides/nt8/managed_approach.htm

    It is okay to have a strategy use both EnterLong() and EnterShort(), if this is what you mean. The way you use them must follow the internal order handling rules.

    Please let me know if you have any other questions. ​

    Comment


      #3
      thanks for the reply. i do have all my entries in the strategy as enter long limit. then i have the limit price as the ask. do you think that is what' s causing it? putting the ask +1 tick will that fix it?

      Comment


        #4
        Hello,

        Without seeing the entirety of the script I would not be able to say for certain what exactly in your code is against the Managed Approach Internal Order Handling Rules. This error message would only be caused if your strategy is violating one of the rules mentioned in my previous post.

        I recommend debugging the script possibly using prints and enabling TraceOrders. TraceOrders will let us know if any orders are being ignored and not being submitted when the condition to place the orders is evaluating as true. You can alsoadd prints to the script that print out the Signal Name of the Entry orders to ensure the Signal Names are unique.

        Comment


          #5
          thanks for the reply. i figured it out. i had to offset the bid and ask by a tick.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          80 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          40 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          64 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          64 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          54 views
          0 likes
          Last Post CarlTrading  
          Working...
          X