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:

            Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.

            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 Lumbeezl, 01-11-2022, 06:50 PM
                  31 responses
                  817 views
                  1 like
                  Last Post NinjaTrader_Adrian  
                  Started by xiinteractive, 04-09-2024, 08:08 AM
                  5 responses
                  14 views
                  0 likes
                  Last Post NinjaTrader_Erick  
                  Started by swestendorf, Today, 11:14 AM
                  2 responses
                  6 views
                  0 likes
                  Last Post NinjaTrader_Kimberly  
                  Started by Mupulen, Today, 11:26 AM
                  0 responses
                  7 views
                  0 likes
                  Last Post Mupulen
                  by Mupulen
                   
                  Started by Sparkyboy, Today, 10:57 AM
                  1 response
                  7 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Working...
                  X