Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Avoid duplicate orders

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

    Avoid duplicate orders

    I have a strategy that is calling EnterLongLimit when conditions are met. The problem is that it contiues to enter the order on every bar until the exit condition is reached. The position grows in size with each bar/fill. Is there a simple way to avoid this without having to write the strategy to track which orders have been submitted/filled? I started looking at OnOrderUpdate but that seems to be overly an complicated path to follow for this simple requirement.

    #2
    Hello Brillo,

    For enter orders, you should first look into the properties EntriesPerDirection and EntryHandling. They're available whenever you run a strategy in our managed framework. You should be able to set these to only allow so many orders submitted per direction.



    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      I have set it to be
      EntryHandling = EntryHandling.UniqueEntries;
      It's also set to that in the properties dialog for the chart/strategy. I still get mujltiple entries with the same name. On my chart I have "LE3" or "SE3" over and over until the position is closed.

      Comment


        #4
        My appologies. EntryHandling = EntryHandling.UniqueEntries is behaving as designed... it limits the entries to the number specified by the
        EntriesPerDirection.
        Thank you, it's helpful. However, there are situations where I want to have a scalling entry approach that is confiurable such as this:
        Entry Name - Number of contracts:
        LE1 1
        LE2 1
        LE3 2
        LE4 4
        Four entries with a growing number of contracts submitted for each. How can I achieve that?

        Comment


          #5
          It looks like you're almost there. You can scale in multiple contracts using EntryHandling = UniqueEntries and providing unique signal names each time you want to scale in.

          With EntiesPerDirection set to 1 and UniqueEntries, then it allows 1 entry per direction for each uniquely named rule.

          A basic scale out sample is available here:
          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
          660 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          375 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          110 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          574 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          579 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X