Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OCO Bracket Entry

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

    OCO Bracket Entry

    Hi,

    I have been looking through the forum for a while and as best I can tell the following code should work to create a Bracketed OCO (manually Canceled) Entry:

    Init() includes:
    Code:
                EntriesPerDirection = 1;
                EntryHandling = EntryHandling.UniqueEntries;
    Actual entry looks like this:
    Code:
                    m_entryLongLimit = EnterLongStopLimit(0, true, t1size, LonglimitPrice, LongstopPrice, "LongLEntry");
                    m_entryShortLimit = EnterShortStopLimit(0, true, t1size, ShortlimitPrice, ShortstopPrice, "ShortLEntry");
    Certainly, I now need to cancel the order that didn't trigger later. The problem is this strategy still generates this error:

    **NT** An Enter() method to submit an entry order at '5/22/2011 6:00:11 PM' has been ignored. Please search on the term 'Internal Order Handling Rules' in the Help Guide for detailed explanation.

    The rules are not very clear, but implies if I have different names it should work, I read in a different thread that setting the UniqueEntry param is also required. I would rather not swap everything to Unmanaged if I can avoid it.

    -NJA_MC

    #2
    Hello NJA_MC,

    The internal order handling rule you're running into is:
    Methods that generate orders to enter a position will be ignored if:
    • 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

    In a managed strategy you can't submit opposing orders at the same time. If you want to submit both these orders at the same time, you have to use the unmanaged approach, which has no internal management of orders / positions.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_RyanM View Post
      Hello NJA_MC,

      The internal order handling rule you're running into is:
      Methods that generate orders to enter a position will be ignored if:
      • 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

      In a managed strategy you can't submit opposing orders at the same time. If you want to submit both these orders at the same time, you have to use the unmanaged approach, which has no internal management of orders / positions.
      http://www.ninjatrader.com/support/h...d_approach.htm
      Hi Ryan,

      Thanks for the fast reply. The part that doesn't exactly line up is the paragraph before what yo have quoted:

      The following rules are true per unique signal name:

      That is why I have created 2 signal names (LongLEntry & ShortLEntry). It seems like with this rule and allowing 1 position per unique entry, this should be allowed. This is a very comment entry strategy and would be good to easily implement in NT.


      Thanks

      Comment


        #4
        That scenario will definitely fall under internal order handling rules, even if you provide unique signal names. The only way to submit both long and short orders at the same time in a strategy is to use the unmanaged approach.

        Sorry if the language on "unique signal names" is confusing. I will discuss with our documentation team to see if there can be any improvements there.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        673 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        577 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X