Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATR Trailing Stop

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

    ATR Trailing Stop

    How to define ATR Trailing Stop in strategy wizard?. Additionaly, where can I d/l ninjascript for ATR trailing stop.

    I am very new to this and have no clue at all

    Thx

    #2
    1. calculate your MFE tick by tick
    2. setup your trailing stop by MFE-ATR(14)[1]

    Comment


      #3
      Thx , do I jhave to calculate MFE manually for every trades?. I want to fully automate it.


      Originally posted by junkone View Post
      1. calculate your MFE tick by tick
      2. setup your trailing stop by MFE-ATR(14)[1]

      Comment


        #4
        then u have to write code that will do it.
        double currentClose = Close[0];
        highestHigh = (highestHigh > currentClose ? highestHigh : currentClose);
        lowestLow = (lowestLow < currentClose ? lowestLow : currentClose);
        Print(
        "highestHigh " + highestHigh + " lowestLow " + lowestLow + "currentClose " + currentClose);

        double currentProfitVariable = Position.GetProfitLoss(Close[0], PerformanceUnit.Points);
        Print(
        " currentProfitVariable " + currentProfitVariable + " ATRValue " + ATRValue);
        switch (tradedirection)
        {
        case Direction.Long:
        currentStop = highestHigh - ATRValue ;


        exitOrder = ExitLongStop(<use the currentstopvalue>)
        }

        Comment


          #5
          Many thxxxx

          Originally posted by junkone View Post
          then u have to write code that will do it.
          double currentClose = Close[0];
          highestHigh = (highestHigh > currentClose ? highestHigh : currentClose);
          lowestLow = (lowestLow < currentClose ? lowestLow : currentClose);
          Print(
          "highestHigh " + highestHigh + " lowestLow " + lowestLow + "currentClose " + currentClose);

          double currentProfitVariable = Position.GetProfitLoss(Close[0], PerformanceUnit.Points);
          Print(
          " currentProfitVariable " + currentProfitVariable + " ATRValue " + ATRValue);
          switch (tradedirection)
          {
          case Direction.Long:
          currentStop = highestHigh - ATRValue ;


          exitOrder = ExitLongStop(<use the currentstopvalue>)
          }

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by benmarkal, Yesterday, 12:52 PM
          3 responses
          22 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by helpwanted, Today, 03:06 AM
          1 response
          17 views
          0 likes
          Last Post sarafuenonly123  
          Started by Brevo, Today, 01:45 AM
          0 responses
          11 views
          0 likes
          Last Post Brevo
          by Brevo
           
          Started by aussugardefender, Today, 01:07 AM
          0 responses
          6 views
          0 likes
          Last Post aussugardefender  
          Started by pvincent, 06-23-2022, 12:53 PM
          14 responses
          244 views
          0 likes
          Last Post Nyman
          by Nyman
           
          Working...
          X