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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      80 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X