Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATR Trailing Stop

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

    ATR Trailing Stop

    I know this has come up before and I read all the posts that relate and it still doesn't really answer the question.

    I am trying to program my strategy where I use a MACD cross to enter and then a trailing stop to take me out. Very simple strategy. I have a few conditions that I need met (as per trading plan) but I'll worry about that stuff later. I need to get the ATR trail to take me out first.

    I downloaded the WILDER ATR on these forums and it was just what I was looking for. What I need to happen though is when a MACD cross down triggers, I want the ATR to turn to a bearish trail and visa versa when the MACD triggers a long. So instead of waiting for price action to take out the trail for it to reverse, I want the MACD to trigger the reversal in the trail.

    But first I actually need the trail to work lol. Which I cant figure out. I got my entry down pack, I even added in some basic profit targets and a trailing stop as per the ninja basics. But I want to get rid of those and just use a trail

    Thanks

    #2
    Hello,

    Thank you for your post and welcome to our forums.

    I'm not quite following - are you having trouble with the reversal, or the ATR trailing stop?

    Are you able to get the stop to trail using the ATR indicator?

    Is it how to handle the stop after a reversal triggered by the MACD you need assistance with?

    If you have not yet, please review our Reference Sample on Modifying the price of stop loss and profit target orders: http://www.ninjatrader.com/support/f...ead.php?t=3222
    MatthewNinjaTrader Product Management

    Comment


      #3
      Thanks for reply.

      I have read it and I was able to program a basic trail but I want the ATR indicator to be the stop and not the built in trail stop.

      So I am having two problems.
      1) I want this particular ATR indicator to be my stop, cant get it to work. (PS. I CAN get the regular Trail stop built into wizard to work but I DO NOT want to use that one)

      2) I am not sure how to get the MACD indicator to REVERSE the ATR once it crosses.

      See picture below.

      The MACD crossed up but the ATR is still in a short. I want it to reverse as soon as MACD crosses so now the blue dots will appear and the long stop is acivated.

      Sigh.

      thanks
      Attached Files

      Comment


        #4
        Hello,

        You would not be able to make this type of dynamic stop loss using the Strategy Wizard.

        You would need to unlock the code and then you can use the custom ATR value with SetStopLoss() which can then dymaically adjust to that price.

        If you would like the ATR to change when a cross over has occurred, the ATR indicator would have to be reprogrammed to look for that condition as well.

        If you have limited time or programming capabilities, you can discuss your requirements with any of our NinjaScript consultants.
        Click here for a list of certified NinjaScript Consultants
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        648 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        369 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        572 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        574 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X