Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Mutiple entries not working in strategy develpment

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

    #31
    Hi ChelseaB,

    I really like your ATRTrailing indicator. I was wondering if there was a way to modify the script so the new indicator plot (change in long/short) would plot "only" if price "closed" above/below the plot. With the current script, a new plot populates if price "breaks" the ATRTrailing stop. I have been using ThinkorSwim for many years and this is how their ATR Trailing Stop indicator works. I have found on higher time frames, using the "close" above/below method does a better job and holding the overall trend.

    Thank you for your help.

    Comment


      #32
      Hello Matt_E,

      Welcome to the NinjaTrader forums!

      https://ninjatraderecosystem.com/use...d/atrtrailing/

      This is not my original work but a conversion from a NinjaTrader 7 script.

      You are welcome to make any modifications you would like.

      I recommend you first make a copy of the script with a new unique name.


      The Sideset series appears to hold the direction.

      The switching conditions appear to be
      Code:
      if (Sideset[1] == 1 && Low[1] > Plotset[1])
      Code:
      if (Sideset[1] == 0 && High[1] < Plotset[1])
      You might add or replace the comparison with Close[1] > Plotset[1].

      I am also including a link to a forum post with helpful information about getting started with NinjaScript.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #33
        Awesome! I will give that a shot. Thank you, ChelseaB, for the info!

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        77 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
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X