Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

what is the best way to count stoploss executions

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

    #16
    Depends on your code. For the most part you can just amend the first one generated after the first partial fill to accommodate the additional filled amounts.

    If you wanted to scale out half the total position you would have had to scale in with two orders to begin with.

    Scaling in first is required to do scale outs.
    Josh P.NinjaTrader Customer Service

    Comment


      #17
      Understood,

      I read the scaling sample code. the conundrum is that if there are several entry executions and if it is in onExecution() that target orders are made, there will be as many target orders placed as there are executions to fill the entry. So, I face this problem whether I scale in with two entry orders or not.

      Let's say it takes two executions to fill one entry order for 10 lots.

      On the first execution, let's say 6 lots are filled. On the second, 4 lots are filled.

      If OnExecution is where I place the ExitLimit() call, then there will be two target orders, yes?

      If so, in order to have a target limit to take 5 lots off, I have to use the execution.Order.Filled quantity divided by 2 and pray for an even number.

      the recourse is to make the call as such:

      targetOrder = Exit...Limit(0, true, 1/2 entry order qty, ...."targetOrder2");

      If I do this, won't there be multiple target orders, each one for the same quantity?

      Comment


        #18
        No. Don't submit as separate targets. Just amend the first one for that signal name up in quantity.

        Please check your setting for Stop & Target Handling when you run your strategy. Select ByStrategyPosition and not PerEntryExecution.
        Josh P.NinjaTrader Customer Service

        Comment


          #19
          Originally posted by NinjaTrader_Josh View Post
          No. Don't submit as separate targets. Just amend the first one for that signal name up in quantity.

          Please check your setting for Stop & Target Handling when you run your strategy. Select ByStrategyPosition and not PerEntryExecution.

          I'm sorry Josh, where are these settings, "ByStrategyPosition" and "PerEntryExecution"?

          Comment


            #20
            When you start up your strategy in the Strategy dialogue. There will be an option called "Stop & target handling". That is where you can find it.
            Josh P.NinjaTrader Customer Service

            Comment


              #21
              Ok, thanks.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CaptainJack, 04-24-2026, 11:07 PM
              0 responses
              32 views
              0 likes
              Last Post CaptainJack  
              Started by Mindset, 04-21-2026, 06:46 AM
              0 responses
              127 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by M4ndoo, 04-20-2026, 05:21 PM
              0 responses
              182 views
              0 likes
              Last Post M4ndoo
              by M4ndoo
               
              Started by M4ndoo, 04-19-2026, 05:54 PM
              0 responses
              94 views
              0 likes
              Last Post M4ndoo
              by M4ndoo
               
              Started by cmoran13, 04-16-2026, 01:02 PM
              0 responses
              138 views
              0 likes
              Last Post cmoran13  
              Working...
              X