Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Auto Trailing Stoploss

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

    Auto Trailing Stoploss

    Hi, I am working on a strategy which will take long or short position. How can i have a Trailing Stop loss automated. Is there a way i can automate ATM strategy when my strategy goes long / short.

    thanks

    #2
    Hello cbsplanet,

    Thank you for your post.

    As this appears to be in relation to creating an automated strategy with NinjaScript, I've moved your post to a more appropriate forum.

    A basic trailing stop can be added to your strategy using SetTrailStop:



    SetTrailStop will begin trailing at a price you specify and will trail in the direction of profit by 1 tick for each tick in profit reached.

    If you're wanting a more complex trailing action in a strategy you would want to use Exit orders and create logic to move the exit in a trailing fashion. I've attached a simple Strategy Builder example that demonstrates - you can unlock the code to view the logic if you're manually coding in the NinjaScript Editor window. You can test this with the Sim101 account to get an idea of how that functions.

    While ATM strategies may be submitted from an automated strategy, it's generally simpler to use SetStopLoss/SetProfitTarget/SetTrailStop at first - using an ATM within a strategy would require advanced NinjaScript skill and cannot be done in the Strategy Builder. Further information regarding the use of ATMs in a strategy may be found in our help guide here:



    Please let us know if we may be of further assistance to you.
    Attached Files

    Comment


      #3
      thank you Kate

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      45 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      21 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      31 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X