Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetProfitTarget fails to change price

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

    SetProfitTarget fails to change price

    RC2 Version - when I try to change an existing Profit Target when the order has filled after initially setting the target and stop - the system is not changing it neither in SIM BackTest nor MarketReplay.

    I also tried calling the ChangeOrder routine - it also does not change the price.

    #2
    I have no idea what you have coded - but based on your description, I took a guess.

    It did not work in RC2. I have also tested NTB11, and NTB9. My code did not change profittargets. I don't think I would have ever expected this code to work. I'm not about to test NT7 at the moment. Have you tested your code on NT7?

    I have other code that does and adjusts the target from NT8B9. I ran this code in NT8B14 (RC2), and it does adjust the profit target as programmed.

    Comment


      #3
      I am only using NT8 so I did not try coding it for NT7. My script is very complex, but I guess I could write a reduced example.

      According to the docs, unless I am misunderstanding it - after I set the profit target in a managed order scenario - if I want to change the price target - I call SetProfitTarget (which I do during onBarUpdate for the specific multiple timeframe BarInProgress I originally set it). I am using signal names, with multiple orders running at the same time as well. The SetStop routine does work which threw me.

      My specific scenario:
      • Multiple Timeframes (7 to be exact)
      • 2 different open orders using signal names (same direction)
      • SetProfit and SetStop previously set for both after filling
      • I reduce the pricetarget for one order by .25 on the ES
      Last edited by MarketAlly; 10-22-2016, 11:29 PM.

      Comment


        #4
        My sample was under 40 lines in OnBarUpdate, and 1/3 of it was white space and braces.

        Enter at 10am, and attempt to change after 10:05am...

        Which Calculation Mode are you using when trying to change?

        So no NT7 attempt... got it...

        Did this code work in previous beta's? or are you starting in RC2?

        Comment


          #5
          I have been using this code since beta 2 but I only previously moved stops. My targets had always been fixed.

          Comment


            #6
            Works for me:

            World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.

            Comment


              #7
              SetProfitTarget/SetStopLoss didn't work in NTB13/RC1... There might be fallout remaining from this.



              But without sample code that proves your case.... I'm not seeing it as evidenced by my video.
              Maybe someone else will see the issue.

              Comment


                #8
                I will try to work up sample code but your example is not outlining my scenario.

                Comment


                  #9
                  Hello MarketAlly,

                  Thank you for your response.

                  I would like to review the sample once you have it ready or the code you are currently using if you want to send it over to platformsupport[at]ninjatrader[dot]com with 'ATTN: Patrick H' and a link to this thread.

                  I would also like to ask if you have confirmed that switching back to RC1 resolves this behavior.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  649 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  370 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  109 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  574 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  576 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X