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:	212
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.
    Chris L.NinjaTrader Customer Service

    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.
        Chris L.NinjaTrader Customer Service

        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.
            Chris L.NinjaTrader Customer Service

            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 lorem, Yesterday, 09:18 AM
              3 responses
              13 views
              0 likes
              Last Post lorem
              by lorem
               
              Started by cmtjoancolmenero, Yesterday, 03:58 PM
              12 responses
              42 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by FrazMann, Today, 11:21 AM
              0 responses
              5 views
              0 likes
              Last Post FrazMann  
              Started by geddyisodin, Yesterday, 05:20 AM
              8 responses
              52 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by DayTradingDEMON, Today, 09:28 AM
              4 responses
              27 views
              0 likes
              Last Post DayTradingDEMON  
              Working...
              X