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 FrazMann, Today, 11:21 AM
              0 responses
              3 views
              0 likes
              Last Post FrazMann  
              Started by geddyisodin, Yesterday, 05:20 AM
              8 responses
              51 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by cmtjoancolmenero, Yesterday, 03:58 PM
              10 responses
              36 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by DayTradingDEMON, Today, 09:28 AM
              4 responses
              24 views
              0 likes
              Last Post DayTradingDEMON  
              Started by George21, Today, 10:07 AM
              1 response
              19 views
              0 likes
              Last Post NinjaTrader_ChristopherJ  
              Working...
              X