Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to move profit target of order to x ticks, not open a new profit target

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

    How to move profit target of order to x ticks, not open a new profit target

    Hello,

    Is it possible to set a profit target and then adjust that profit target based on a new average price instead of creating a new profit target? For example

    My strategy at the moment opens a position using

    SetProfitTarget("MyEntry", CalculationMode.Ticks, 8);
    EnterLong(1, "MyEntry");

    Opens a long position at 16000 on NQ, profit target 16002

    My strategy will then add another contract if the price drops to 15990, using the following code

    SetProfitTarget("MyEntryLong2", CalculationMode.Ticks, 8);
    EnterLong(1, "MyEntryLong2");

    I then end up with a position that's 2 contracts total but with 2 separate profit targets. The initial profit target and a new one (15992 ) for my second entry

    What I want to do is to set a profit target for all open orders, in this example my average price would be 15995 and my profit target should be 15997.

    I've tried to remove the entry names - MyEntryLong1/2 from the enterlongs and setprofit target and also tried setting the "entry name" to the same value and it still sets 2 different profit targets.

    Any is appreciated!

    Thank you!

    Ravvles

    #2
    Hello ravvles,

    Yes that is possible, the easiest way is to just just call the SetProfitTarget again before the second entry. You also need to make sure you have the stop target handling set to by strategy position and not per execution if you wanted to update the quantity on the target instead of submitting a second target. https://ninjatrader.com/support/helpGuides/nt8/stoptargethandling.htm?zoom_highlightsub=stoptarge t

    Comment


      #3
      Great, thanks again NinjaTrader_Jesse! It was the stop target handling that needed changing! Thank you!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      29 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X