Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Problems with ATR Trailing Stop

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

    Problems with ATR Trailing Stop

    Currently we're working on a strategy that uses an ATR trailing stop, however, we're having a minor issue with the one we found in the download section.

    In order for it to work correctly for what we need we would like to be able to force it to stay above or below the price rather than switch back and forth when price crosses through it.

    We've already tried the ATR trailing indicator and selected it to plot only lower but it doesn't seem to be working. Our strategy is a long-only strategy right now, so we only need it to continuously plot itself below the price, no matter what. Is there a way for us to change this?

    Another solution is if there is a ATR trailing stop that follows above and below, continuously (like bollinger bands do). Meaning, it doesn't switch back and forth when price crosses through it. This switch is hurting us in some of our trades because when the switch in the ATR line occurs during backtesting, it either knocks us out when it shouldn't have or doesn't get us out until price crosses back through it again at a later date... which could be costly if it were live trading.

    This is the ATR stop we're currently using:



    It's a great indicator, I just wish we could figure out this one issue.

    Any help would be great, thanks

    #2
    Hi cmspruill,

    There is likely a custom coding solution available, but first step is to define your requirements. You could then consider hiring a NinjaScript consultant to code for you:


    If you want to calculate current price - ATR, this could be expressed as:
    Close[0] - ATR(14)[0]

    That expression produces a value that should always (as long as ATR is nonzero) be lower than the last traded price. You can also view source code for this indicator and save copy or make your own modifications. This is done through tools > Edit NinjaScript > indicator > Click ATRTrailingStop and Open.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Haiasi, 04-25-2024, 06:53 PM
    4 responses
    55 views
    0 likes
    Last Post effraenk  
    Started by ccbiasi, 11-23-2017, 06:06 AM
    5 responses
    2,199 views
    0 likes
    Last Post leodavis  
    Started by kujista, Yesterday, 12:39 AM
    2 responses
    14 views
    0 likes
    Last Post kujista
    by kujista
     
    Started by Austiner87, Yesterday, 11:24 AM
    2 responses
    12 views
    0 likes
    Last Post brucerobinson  
    Started by Rogers101, 05-05-2024, 11:30 AM
    3 responses
    21 views
    0 likes
    Last Post Rogers101  
    Working...
    X