Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help, please add code to modify SL

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

    Help, please add code to modify SL

    Help, please, add code to the strategy.

    After opening a position sent orders SL and TP
    When moving in our direction to a value in ticks MSL1 from the opening price, the stoploss is translated to a value in ticks SL1 from the opening price.
    When moving in our direction to a value in ticks MSL2 from the opening price, the stoploss is translated to a value in ticks SL2 from the opening price.

    Thanks in advance for your help.
    Last edited by Lorast; 08-25-2014, 11:24 AM.

    #2
    Hi Lorast, welcome to our forums here - you can adjust the stop values dynamically in your OnBarUpdate() as the trade progresses just be calling the Set method again with your new stop price / tick offset value. We have prepared a reference sample that shows this technique in detail here - http://www.ninjatrader.com/support/f...ead.php?t=3222

    Comment


      #3
      thank you very much for the example

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      52 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      142 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      160 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      96 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      276 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X