Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATR - calculate the ATR ticks for the last 7 days

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

  • tomleeson
    replied
    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

    Leave a comment:


  • tomleeson
    replied
    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...

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    BarsRequired = 20;

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

    Leave a comment:


  • tomleeson
    replied
    Originally posted by NinjaTrader_Josh View Post
    tomlesson,

    NT for sure does allow you to mix intraday with weekly. You just need to ensure you reach the min. bars required requirement on all bar series. By default this means you need 20 bars which would be a lot of time to achieve 20 weekly bars.
    the default of 20 - can i change that programmatically? is that set when the strategy is added to a chart?

    Leave a comment:


  • tomleeson
    replied
    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.
    I am checking this out.
    thank you!

    Leave a comment:


  • tomleeson
    replied
    Originally posted by NinjaTrader_Josh View Post
    tomlesson,

    NT for sure does allow you to mix intraday with weekly. You just need to ensure you reach the min. bars required requirement on all bar series. By default this means you need 20 bars which would be a lot of time to achieve 20 weekly bars.
    yes i think i can see how that would work :-)

    Leave a comment:


  • NinjaTrader_Austin
    replied
    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.

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    tomlesson,

    NT for sure does allow you to mix intraday with weekly. You just need to ensure you reach the min. bars required requirement on all bar series. By default this means you need 20 bars which would be a lot of time to achieve 20 weekly bars.

    Leave a comment:


  • tomleeson
    replied
    Thanks for your replies:

    The smaller time has to be the primary.
    The system has been tested with a weekly atr average value.
    NT strategy wotn allow me to mix intrady series with weekly series - so i guess i will have to count evrery bar and take an average for each 7 day period.. or create it on another chart and then commuicate this to the running strategy module..:-) through a common static class, a data cache, or maybe even post via a windowsmessage...:-)

    Leave a comment:


  • NinjaTrader_Austin
    replied
    Originally posted by tomleeson View Post

    somevalue= (ATR(
    14)[1] * 0.25) * 100);
    i believe the * 100 is there to convert it to to a number versus degrees?
    what is the 0.25 (ticks?)
    Not sure what the * 100 and the *0.25 mean... If I remember my basic math properties, multiplication is associative so (ATR(14) * 0.25) * 100 = ATR(14) * 25.

    In addition, there is a helpful function in NinjaTrader that rounds a value to the nearest tick size. Here is the reference page for Round2TickSize.

    Leave a comment:


  • NinjaTrader_Austin
    replied
    Tom, what you outlined in your first post would work, but the larger timeframe must be the primary instrument.

    Leave a comment:


  • tomleeson
    replied
    i found this:
    http://www.ninjatrader-support2.com/...e+Range&page=2

    somevalue= (ATR(
    14)[1] * 0.25) * 100);
    i believe the * 100 is there to convert it to to a number versus degrees?
    what is the 0.25 (ticks?)

    Leave a comment:


  • tomleeson
    replied
    essentially i wish to get the number of ticks an instrument moves per day - using the last 7 days as the period - but calculate it from a intraday period (so it can achieved in a intrady stratefy)...
    Eg.
    last 7 day ES was 20 points per day or 80 ticks

    i can use the 80 ticks as the basic tradeable oppurtunity.
    i thought ATR migh assist in this - maybe i need to look at another pattern
    Last edited by tomleeson; 07-21-2009, 03:20 PM.

    Leave a comment:


  • NinjaTrader_JoshP
    replied
    Not sure what you mean "tick value". ATR will come out as some range value as determined by the high - low calculation for the various days.

    Leave a comment:


  • tomleeson
    replied
    I have had a look at quite a few and inspected the code -and drew a blank - as they are mostly indicators and the such like - all i want is a pattern/ method to obtain the ATR for the last 7 days... as a tick value.
    I will keep looking

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by CaptainJack, 05-29-2026, 05:09 AM
0 responses
476 views
0 likes
Last Post CaptainJack  
Started by CaptainJack, 05-29-2026, 12:02 AM
0 responses
317 views
0 likes
Last Post CaptainJack  
Started by charlesugo_1, 05-26-2026, 05:03 PM
0 responses
254 views
1 like
Last Post charlesugo_1  
Started by DannyP96, 05-18-2026, 02:38 PM
1 response
340 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by CarlTrading, 05-11-2026, 05:56 AM
0 responses
306 views
0 likes
Last Post CarlTrading  
Working...
X