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

Using ATR period/ATR multiplier for entries

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

    Using ATR period/ATR multiplier for entries

    Hello, the indicator I use plots the ATR with a period of 10 and multiplier of 4 as a dotted line on the chart (image attached). Using this, if the price reaches within 2 ticks to this level, it gives a signal for a breakout. My question is, how would I be able to create a strategy that trails an entry 2 ticks above this level at all times? So the entry moves slightly above the atr with period of 10 and multiplier of 4. That way if the price ever reaches the level of 2 ticks above the atr line, a long entry would be made. I have tried with the signal plots of this indicator but this is not what i want. Thank you! Most use the atr as a stop but I want to use it as an entry for pullbacks. Also I am using the strategy builder if this can be done on that
    Attached Files

    #2
    I also know of the ATR trailing indicator on the ecosystem (https://ninjatraderecosystem.com/use...d/atrtrailing/) so how could I use this for trailing an entry above the atr line?

    Comment


      #3
      Hello Brandon9821,

      Thank you for your post.

      Please see the attached example script that demonstrates placing a trailing entry order 2 ticks above the ATRTrailing indicator's Upper plot.

      In the example script, we create a bool variable (initially set to true) and a TrailPrice variable to hold our trailing limit price. Then, we check if the bool is true and assign a value to our TrailPrice variable and call EnterLongLimit() using the TrailPrice variable as the Limit price and we also set the bool to false. Next, we check if the current Close[0] is greater than the previous Close[1] and reassign a value to our TrailPrice variable. After that, we check if we are in a flat position and call EnterLongLimit() again to trail the limit order.

      See the help guide documentation for more information about using the Strategy Builder.
      Strategy Builder - https://ninjatrader.com/support/help...gy_builder.htm

      Let us know if we may assist further.
      Attached Files
      Brandon H.NinjaTrader Customer Service

      Comment


        #4
        Thank you very much for your help! When the strategy is enabled I don’t see any historical entries. I have specified my target and stop losses in ticks but this didn’t seem to help. Do I have to have any other condition or set anything else up? Also I know you setup the above file for the upper plot so that’s not why I’m seeing a trailing stop right now but if the strategy is setup to take a trade 2 ticks above the ATR then historical orders should show. Thank you!
        Attached Files

        Comment


          #5
          Hello Brandon9821,

          Thank you for your note.

          The strategy example I provided included a check to see if the State is Realtime (State = State.Realtime) before placing trades. Since we wait for State = State.Realtime before trades are placed, no historical orders would be placed.

          Does your strategy include a State = State.Realtime condition? If so, you would need to remove this condition from your strategy to see historical orders placed.

          Please let us know if we may assist further.,
          Brandon H.NinjaTrader Customer Service

          Comment


            #6
            Hi guys, I am interested in trying the indicator that Brandon mentioned in the first post. I just need the indictor and will do manual tests. Would you be able to point me to the script file for "ATR period/ATR multiplier" indicator, please?

            Thanks.

            Comment


              #7
              Hello You4Life,

              Thanks for your note.

              Unfortunately, I am not aware of an indicator named ATR period or ATR multiplier.

              We do have the ATRTrailing indicator mentioned in post #2.

              That said, this forum thread will be open for other community members to share their knowledge of an ATR period or ATR multiplier indicator.

              Let us know if we may assist further.
              Brandon H.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by gemify, 11-11-2022, 11:52 AM
              6 responses
              803 views
              2 likes
              Last Post ultls
              by ultls
               
              Started by ScottWalsh, Today, 04:52 PM
              0 responses
              3 views
              0 likes
              Last Post ScottWalsh  
              Started by ScottWalsh, Today, 04:29 PM
              0 responses
              7 views
              0 likes
              Last Post ScottWalsh  
              Started by rtwave, 04-12-2024, 09:30 AM
              2 responses
              22 views
              0 likes
              Last Post rtwave
              by rtwave
               
              Started by tsantospinto, 04-12-2024, 07:04 PM
              5 responses
              70 views
              0 likes
              Last Post tsantospinto  
              Working...
              X