Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Profit Target Not Using Full Quantity

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

    Profit Target Not Using Full Quantity

    Problem: I use SetProfitTarget(CalculationMode.Currency, $100) for my orders, today my trading system entered 5 contracts for futures, when the profit target was hit it only sold 2 of those 5. Now I am left with 3 contracts and my trading system thinks it's not in a position. Why did it not sell all 5 at the profit target? Why 2?

    Picture Below:
    Click image for larger version

Name:	Screen_Shot_2020-03-27_at_8.20.06_AM.png
Views:	266
Size:	462.1 KB
ID:	1091975

    #2
    Hi JakeOfSpades, thanks for your post.

    Please look to the Log tab of the Control Center. Do you have any errors regarding the strategy or these orders? Was this on a live account or the Sim101 account?

    I look forward to hearing from you.

    Comment


      #3
      Originally posted by NinjaTrader_ChrisL View Post
      Hi JakeOfSpades, thanks for your post.

      Please look to the Log tab of the Control Center. Do you have any errors regarding the strategy or these orders? Was this on a live account or the Sim101 account?

      I look forward to hearing from you.
      Uploaded log below, no errors. It was a Sim101 Account


      Last edited by JakeOfSpades; 03-27-2020, 11:03 AM.

      Comment


        #4
        Hi JakeOfSpades, thanks for your reply.

        Could you make a reduced strategy I can test that re-creates the problem? I just want to see if I can reproduce this problem. You may Export it and send it to platformsupport at ninjatrader.com and reference "Attn ChrisL 2475990"

        SetStopLoss should apply to all orders without a signal name. If your orders do have signal names, you would need to use the SetStopLoss override that takes a fromEntrySignal string

        SetStopLoss(string fromEntrySignal, CalculationMode mode, double value, bool isSimulatedStop)

        I look forward to hearing from you.

        Comment


          #5
          Originally posted by NinjaTrader_ChrisL View Post
          Hi JakeOfSpades, thanks for your reply.

          Could you make a reduced strategy I can test that re-creates the problem? I just want to see if I can reproduce this problem. You may Export it and send it to platformsupport at ninjatrader.com and reference "Attn ChrisL 2475990"

          SetStopLoss should apply to all orders without a signal name. If your orders do have signal names, you would need to use the SetStopLoss override that takes a fromEntrySignal string

          SetStopLoss(string fromEntrySignal, CalculationMode mode, double value, bool isSimulatedStop)

          I look forward to hearing from you.
          Sent that Request Chris, thank you. Would setting signal names possibly help? I don't have any yet.

          Comment


            #6
            Hi Jake, thanks for sending that in.

            In the script you have a signal name set for the profit target but not for the EnterLong() method. Please add signal names to the orders and make sure they match when you call SetProfitTarget. You should get proper quantity management after this.

            Kind regards.

            Comment


              #7
              Originally posted by NinjaTrader_ChrisL View Post
              Hi Jake, thanks for sending that in.

              In the script you have a signal name set for the profit target but not for the EnterLong() method. Please add signal names to the orders and make sure they match when you call SetProfitTarget. You should get proper quantity management after this.

              Kind regards.
              Still happening, look at the Profit Target, why is it a quantity of 21 when the entry was 57. The Stop Loss was correct but not the Profit Target. I can share my code if you have Skype or Zoom, it would resolve this a lot quicker.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              84 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              47 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              29 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              32 views
              0 likes
              Last Post TheRealMorford  
              Started by Mindset, 02-28-2026, 06:16 AM
              0 responses
              66 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Working...
              X