Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order quantities not in sync with Strategy

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

    Order quantities not in sync with Strategy

    NinjaTrader Support, I have my order quantities explicitly defined in my strategy, however I am getting executions of 3 contracts when my strategy only indicates 2. I have the order quantity defined to be handled by the strategy but for some reason it still doesn't stay in sync. Please see my code and order executions attached:
    Attached Files
    Last edited by omermirza; 08-07-2024, 08:29 AM.

    #2
    Hello omermirza,

    The conditions you have shown are all individual conditions, in the situation where multiple conditions become true in the same update that could cause what you are seeing. You could also see additional positions if you have specified a higher entries per direction, that will allow additional entries into the same direction if one of your conditions to enter becomes true after the other had already become true.

    Comment


      #3
      Hi Jesse, How can multiple conditions become True if I'm only entering when the Market Position is Flat? -Omer

      Comment


        #4
        Hello omermirza,

        The position does not update until the next OnBarUpdate event, if those conditions become true within the same event that could lead to multiple positions. You would need to use Prints to see if that is happening.

        Comment


          #5
          Im not sure I follow - the strategy is set to calcuate OnBarClose. Can you give me a hypothetical example?

          Comment


            #6
            Hello omermirza,

            Your conditions are execution from top to bottom so every condition you have in the image will be checked in a single OnBarUpdate event. If any of those conditions become true within that same event they will submit orders because the position is still flat within that one event. To find out if that is happening you can use Print statements in your conditions to verify they are not becoming true within the same event.

            Comment


              #7
              But If I'm specifying the quantity I still don't see how I can get more than 2 contracts. There is only one entry order.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Yesterday, 05:17 AM
              0 responses
              55 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              132 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              73 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
              49 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X