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 SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      47 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      22 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 06-17-2026, 10:32 AM
      0 responses
      15 views
      0 likes
      Last Post CaptainJack  
      Started by kinfxhk, 06-17-2026, 04:15 AM
      0 responses
      21 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 06-17-2026, 04:06 AM
      0 responses
      23 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X