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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      661 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      375 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 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
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X