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

ATR - calculate the ATR ticks for the last 7 days

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

    #16
    Originally posted by NinjaTrader_Austin View Post
    Tom, I wasn't sure of your programming skills, so I didn't suggest anything too complicated from the start.

    You can try this: run your ATR calculations from a daily chart, and then have your strategy communicate with that daily chart to retrieve the values. Here is a reference sample that demonstrates how to expose indicator values. The sample includes a strategy and an indicator--they work together and are a great example.
    This is good yes i can see how that works ok. It may be better to extract and ecapsulate my signal logic into an indicator and then read it in the strategy - generic code maybe re used than for that gem...
    For now however the my strategy times series is 89ticks - no decision making is made on the week chart period - only an indication of the typical oppurtunity of an instrument.
    E.G ES 18 points ATR for the last 7 days...
    arget 1 = 8% of daily ATR --- eg 8% of 21points
    13% for target 2 and so on... -

    I need to do this on any periodtype - the chart period will be 15 days.
    The only constant variable (if that is possible) is the ATR ticks is represented by last 7 days...

    Comment


      #17
      Originally posted by NinjaTrader_Josh View Post
      BarsRequired = 20;

      It can also be set via the UI when you add a strategy.

      i will have a play

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Kaledus, Today, 01:29 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by frankthearm, Yesterday, 09:08 AM
      13 responses
      45 views
      0 likes
      Last Post frankthearm  
      Started by PaulMohn, Today, 12:36 PM
      2 responses
      16 views
      0 likes
      Last Post PaulMohn  
      Started by Conceptzx, 10-11-2022, 06:38 AM
      2 responses
      55 views
      0 likes
      Last Post PhillT
      by PhillT
       
      Started by yertle, Yesterday, 08:38 AM
      8 responses
      37 views
      0 likes
      Last Post ryjoga
      by ryjoga
       
      Working...
      X