Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ByStrategyPosition vs PerEntryExecution issue

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

    ByStrategyPosition vs PerEntryExecution issue

    Hello,

    I am using managed approach in my strategies. I have a question about “Stop & target submission” property within custom strategy.

    My understanding is that if I set the property to “ByStrategyPosition” and get partial fills on the order of 10 contracts (let’s say 1, 1 and 8), I should only have 1 stop loss resting order with qty 10 and 1 profit take resting order with qty 10. If I choose “PerEntryExecution”, the resting stop loss and take profit will mimic the way partial order was filled (1, 1 and 8). My strategy only submits SL and Take Profit after all contracts are filled (entryOrder.Filled == entryOrder.Quantity)

    Is my understanding correct?

    I was testing this property on Sim account, and even though I had property set to “ByStrategyPosition”, I still got 1,1 and 8 resting orders for both stop loss and take profit.

    Thanks,
    redduke

    #2
    Hello RedDuke,

    Thank you for your post.

    You are correct in your understanding. The only item here is when the strategy position updates and that partial fills will update the position. So ByStrategyPosition means that when the position updates it will generate the Stop Loss and Profit Target. Some people prefer that this occur on the execution event rather than the position update, so the option PerEntryExecution is available.

    Please let me know if you have any questions.

    Comment


      #3
      Hi Patrick,

      Thanks for confirming it. Why did I get multiple stop loss and take profits then?

      My logic runs as follows. Once I get a fill, I wait for the whole order to get filled (entryOrder.Filled == entryOrder.Quantity), then wait for 2 more seconds and then send my stop loss and take profits orders.

      This morning, I got a partial fill for qty of 10 in a way of 1, 1 and 8 for a Sim account. When I submitted stop loss and take profit they were placed as 1, 1 and 8, instead of 10.

      Thanks

      Comment


        #4
        Hello RedDuke,

        Thank you for your response.

        I would need to review the strategy it self and the executions that were seen through your Log and Trace files.

        Comment


          #5
          where can i email it to?

          Comment


            #6
            Hello RedDuke,

            Thank you for your response.

            Please send me your log and trace files for today so that I may look into what occurred.

            You can do this by going to the Control Center-> Help-> Mail to Platform Support.

            You can also attach the strategy, which is found under (My) Documents\NinjaTrader 7\bin\Cusotm\Strategy.

            Please reference this thread in the e-mail: http://ninjatrader.com/support/forum...ad.php?t=77800

            Comment


              #7
              Just emailed everything.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              558 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              324 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              545 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              547 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X