Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Sometimes Enters Double / Duplicate Entries

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

    Strategy Sometimes Enters Double / Duplicate Entries

    Hello, I am running a strategy (built in strategy builder) that trades 1 contract. However, every now and then, when the conditions are met, it enters two entries, (either at the same entry point or a tick or two apart). I can't figure out why. It is a condition that my strategy only enters a trade when market position is flat. Please help.

    The attached pictures show (1) two examples of said double entries, and (2) the conditions of my strategy. Thanks!
    Attached Files

    #2
    Hello dwfromhawaii,

    Is this running with Calculate.OnBarClose?

    If not, it could be that the second order is submitted before the position has changed (which takes time).
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      EntriesPerDirection = 1?
      Bruce DeVault
      QuantKey Trading Vendor Services
      NinjaTrader Ecosystem Vendor - QuantKey

      Comment


        #4
        NinjaTrader_ChelseaB​ - it calculates on each tick. So if I understand correctly - is it the reason this is happening that after the first order is entered, it does not yet realize just yet that the current market position is no longer flat?

        QuantKey_Bruce​ - Oh, I have EntriesPerDirection at 20 or so. Would it make a difference if I had it at 1? Also, would that mean that my strategy would enter 1 long trade, and then if another long trade comes along later, it would not enter the next one?

        Thank you both! I really appreciate all the help I can get.


        Comment


          #5
          Hello dwfromhawaii,

          Yes, until the first order is accepted, becomes working, is filled, and the position changes, new orders can be placed on each new tick as the position has not yet changed.
          You could choose to use a variable such as a bool that is set to true once the order is placed, and then back to false once the exit is submitted.

          With EntriesPerDirection set to 20, you can 20 entries orders into the position before further entries are ignored. Set this to 1, if you only would like 1 entry into the position.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Thank you!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            63 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            139 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            75 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            45 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            50 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X