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

Getting ATR value, converting to ticks, using it within a strategy

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

    #16
    Originally posted by Trader17 View Post
    Thanks Kate. I could be totally wrong here but from what I see there is an input for ATRStopLoss set to 1 as an input, then it is used in State.DataLoaded and then calculated again under OnBarUpdate. Is that why it is using "1' from the input value the users above are saying it sets the stop to 1 and not the actual ATR value? I understand the input for the ATR Multiplier.
    Thank you as always.
    Thanks Kate. Did you see this?
    Cheers.

    Comment


      #17
      Hello Trader17,

      Thank you for your reply.

      That is in reference to the prior example in this thread, which is different from the example Brandon supplied you with. The issue is that the stop can't be set in State.Configure or that will happen, so that version was revised and the revision posted in a different thread here:

      Good afternoon, I would like through the strategy builder to be able to use the trailing stop, I don't know how to use it so that my stop decreases when I have advanced a certain number of ticks? Thanks


      Please let us know if we may be of further assistance to you.
      Kate W.NinjaTrader Customer Service

      Comment


        #18
        I was looking at your example in this thread itself above and saw this in the code.

        IsInstantiatedOnEachOptimizationIteration = true;
        ATRMultiplier = 2;
        ATRStopLoss = 1;

        Why do you have ATRStopLoss =1 as an input is what confused me? I only saw ATRMultiplier under Properties.

        Thanks.

        Comment


          #19
          Hello Trader17,

          Thank you for your reply.

          I wouldn't advise referring to the original version, the second version I posted again in the thread linked above is the corrected version.

          In the corrected version, ATRStopLoss is updated once processing starts to the ATR * Multiplier value that gets calculated.

          Please let us know if we may be of further assistance to you.
          Kate W.NinjaTrader Customer Service

          Comment


            #20
            Thanks Kate. I did see that ATRStopLoss input in version 2 too. Is there a need to have it as an input?
            Thanks.

            ATRMultiplier = 2;
            ATRStopLoss = 1;

            Comment


              #21
              Was wondering why there is an input for the ATRStopLoss.
              Thanks Kate.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Javierw.ok, Today, 04:12 PM
              0 responses
              3 views
              0 likes
              Last Post Javierw.ok  
              Started by timmbbo, Today, 08:59 AM
              2 responses
              10 views
              0 likes
              Last Post bltdavid  
              Started by alifarahani, Today, 09:40 AM
              6 responses
              40 views
              0 likes
              Last Post alifarahani  
              Started by Waxavi, Today, 02:10 AM
              1 response
              18 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by Kaledus, Today, 01:29 PM
              5 responses
              15 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X