Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATR StopLoss

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

    ATR StopLoss

    I´d like to add an ATR Stop to my strategy.
    That is: if the actual price is lower than the entry price minus 1 * ATR(14) the long position should be stopped out.

    I tried the following:
    Condition 3: Variabel0 == ATR(14) [1]
    Than I choose this variable0 in the "Stops and Target" menu:
    SetStopLoss("", CalculationMode.Ticks, Variable0, false)

    But in this case, the stoploss is executed at the entry price.
    What do I do wrong?

    I would also like to test how ATR multiple work as stoploss levels....

    Thanks
    Last edited by ema.mfg; 02-20-2010, 07:01 AM.

    #2
    did you figure it out?

    Hi,

    I am also trying to figure this out, did you ever get a reply or find a solution? I want to set a stop 1*ATR (20) [0] below / above and a profit order n*ATR (20) [0] Above / below.

    cheers

    Comment


      #3
      Hello,

      First are you coding this or building it in the wizard? If coding, please post the actual code. If wizard, please post screen shots of the parameters.

      To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.
      DenNinjaTrader Customer Service

      Comment


        #4
        Can it be done in Wizard

        Hi,

        Thanks for the prompt reply but i haven't even begun with either approach. I would prefer to get some guidance on the best way to do it. I would prefer to use the wizard if it can be done through the wizard. Your assistance in describing an approach would be much appreciated. Please don't simply paste a link to the online help manual.

        regards

        Comment


          #5
          sjmuk,

          This can only be done through custom programming. The Wizard will not be able to attach stop/targets to ATR.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            Is this a secret or something?

            Thankyou for ruling out the wizard but please try and answer the original question and give some guidance on the best approach for this??????????

            Comment


              #7
              Hello sjmuk,

              You can access the price you entered with Position.AvgPrice. If you want to test whether current price is less than your entry price by the 14-bar ATR, this can be expressed in code:

              Code:
               
              if (Close[0] < Position.AvgPrice - ATR(14)[0])
              Ryan M.NinjaTrader Customer Service

              Comment


                #8
                is there a way to get more variables on the first screen of the Strategy Wizard?

                is there a way to get more variables on the first screen of the Strategy Wizard?
                I need more variables to build my strategy and I want to make sure that they all are available to be optimized with the genetic optimizer...
                thanks in advance...

                Comment


                  #9
                  Hello Rickym,

                  Welcome to our forums.

                  Unfortunately the number of variables available in the wizard can't be changed. You will have to work with code if you want to create additional variables.
                  Ryan M.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  647 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  368 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
                  571 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  573 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X