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:	271
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 CarlTrading, 03-31-2026, 09:41 PM
              1 response
              43 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 04-01-2026, 02:41 AM
              0 responses
              20 views
              0 likes
              Last Post CarlTrading  
              Started by CaptainJack, 03-31-2026, 11:44 PM
              0 responses
              30 views
              1 like
              Last Post CaptainJack  
              Started by CarlTrading, 03-30-2026, 11:51 AM
              0 responses
              48 views
              0 likes
              Last Post CarlTrading  
              Started by CarlTrading, 03-30-2026, 11:48 AM
              0 responses
              38 views
              0 likes
              Last Post CarlTrading  
              Working...
              X