MTF Adaptive ATR

v10.3
MTF Adaptive ATR

True Multi-Timeframe Dynamically Adapting ATR

This is actually a major overall to an earlier indicator I submitted to the library. The idea behind this indicator is to provide us with an Average True Range indicator than instead of the standard ATR indicator which is calculated with a static look back period, rather give us an ATR indicator that will only look at the most relevant price data. This means the indicator will (depending on the timeframe selected) only consider either market hours, after market hours or current weekly data. In this way, the sampled price data will always be relevant. The look-back period used to calculate the ATR will thus dynamically adapt as the trading day or week progress.

Explanation of the parameters:

  • TFMinutes: This parameter is used to input the current timeframe in minutes. (So for 5m TF set the parameter to 5, for hourly set it to 60)
  • TFMultiplier1: Those too lazy to work out higher timeframes you can use the multipliers. (Hourly TF is: TFMinutes = 1 and TFMultiplier1 = 60)
  • TFMultiplier2: Extention to the above functionality. (4-Hour TF is: TFMinutes = 1, TFMultiplier1 = 60 and TFMultiplier2 = 4)
  • stdDev: Standard deviation used to calculate the Relative ATR line
  • RecentDataPer: What percentage of the lookback period to sample for the SampledATR calculation (Recent Data)
  • MiddleDataPer:  What percentage of the lookback period to sample for the SampledATR calculation (Middle Data)
  • EarlyDataPer: What percentage of the lookback period to sample for the SampledATR calculation (Early Data)
  • ShowCalculationPeriod: Can be enabled to show a line on the indicator with the lookback period used for calculations
  • UseCloseOpenvsHighLow: If enabled will use open and close values instead of high and low to calculate the Total Price Range
  • GMTOffset: This is used to offset the GMT time difference in the code. (Default is set to GMT+2)
  • MarketOpenHour: Enter the hour (24hr) in which the market opens
  • MarketCloseHour: Enter the hour (24hr) in which the market closes
  • EnableAfterHours: Enable to calculate ATR values for after hours

Indicator Output Explained:

  • The black histogram shows the total price range for the evaluated period (be that for in-market hours, after-market hours or current weekly data)
  • The pink line called ‘Relative ATR’ shows the standard deviation adjusted ATR value based on the evaluation period
  • The green line called ‘Sampled ATR’  shows the averaged ATR as sampled over the 3 different data sets (within the evaluation period)

Possible Interpretations:

  1. When the black histogram expands it signifies that price is breaking higher or lower and expanding the current trading range.
  2. When the black histogram increases in steps without remaining static for extended periods we can assume the market is trending
  3. When the black histogram remains static we can assume the market is consolidating or ranging (watch for expansion)
  4. When the pink line rises with the green line we can assume that volatility is increasing
  5. When the pink line falls with the green line we can assume that volatility is decreasing
  6. When the pink line and the green line diverge we can assume a possible direction change is probable
  7. When either the pink line or the green line extends above the histogram it implies current volatility is extreme
  8. When the pink line stays high relative to the histogram it implies market is choppy with no clear direction
  9. When the pink line  stays low relative to the histogram it implies the market has a lot of momentum and trending

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

avatar
Register or

Likes

avatar avatar avatar
Related users ' posts
luxrun sorry, add prt code add doesn't work
robertogozzi Don't worry about PRT code, I can't make it work either! Great for pointing that out, it's ...
Khaled @Luxrun, good morning, you mentionned "y = exponentialaverage (x)", isn't the period of the ...
luxrun One question, Roberto: the two AvgT are variable, could you explain to me what they regulate...
robertogozzi AvgT stands for Average Type, it's a parameter for the AVERAGE keyword (https://www.prorealc...
robertogozzi Yes, you can use any setting that suits you best! As to which one... it depends on the inst...
DaxRider grazie Robnerto
supertiti Bonjour Nicolas, Je ne comprend pas bien , le trend change de couleur quand les prix sont a...
Nicolas Oui ce serait possible, cependant l'indicateur est bien prévu pour conserver la couleur de l...
supertiti Quand tu pourras si tu peux nous coder la troisième couleur cela améliorerait les trades cou...
Nicolas remplacer les valeurs de coloured(0,255,0) par coloured(r,g,b) et ajouter ces noms de variab...
mohamed merci Nicolas!
sacram14 Merci Nicolas pour ce set-up que je ne connaissais pas ! J'ai tenté de reprendre le code pou...
Nicolas Just add it on the price series.
yomisadiku Hello Nicolas, Can I use high and low price at lines hh=max(hh,close) and ll=min(ll,close) ...
Nicolas Yes you can do that, the impact will be that the trailing stop line will be much close to th...
Vonasi Sure that is possible. I will code it and make a post in the English ProBuilder forum and pu...
Vonasi Vama v2 with Hull moving average included can be found here: https://www.prorealcode.com/top...
JMat45 Thank you, Vonasi.
Bard Very interesting approach Vonasi! I'm getting a 404 error when trying to download though?
Vonasi I just tested and I was able to download with no error.
Psari Hi Vonasi, I am a newbie and was wondering whether you could possibly help me with this pro...
Bard I've also just noticed that changing the "Bands Deviation" setting from 1.25 to eg 3 doesn't...
bartekz Hi @Nicolas, Really impressed by your work. I am trying to replicate the Wave-PM indicator t...
Nicolas You don't have to replicate it, download the file and import it into your platform.
LucioleLucide Clean view, thanks for sharing
dertopen hi where i can found the window for candle configuration?
paolosab69 Ciao! . I have seen the pictures that explain this metod but i don't understand when is mome...
Thomas
5 years ago
Thomas Como? no intiendo. Can you write in english . It works! Download the itf file.
Thomas New Version comin soon...
CHARLESRACHELLE OLA NAO SERVE PARA MT4?
juanj
5 years ago
juanj I have actually completely redesigned this indicator with loads of improvements, so will res...
Brisvegas Thats Awesome thank you
Vinks_o_7 Thanks Vonasi !
Bard Problems with Safari latest s/ware and this site and links and adding code. Let me add the...
grimweasel47 Ok thanks Nicolas - could this be adapted to take into account MFI and then have price, volu...
Nicolas I don't understand what you mean exactly, would be better to open a topic about this idea wi...
ottimo Thank you Nicolas, great indicator, N. 1
tikigai Merci Nicolas! First Happy new Year 2020. Very good indicator BUT (yes the french "oui, m...
Nicolas Whats prorealtime version? Did you try in version prior to v11? indicator's call and loop ca...
jissey Bonjour Bolsatrilera,j'essaie de vous contacter pour le cm rsi ;je le trouve interessant, m...
jissey J'essaie de vous contacter pour l'indicateur"cm rsi"....
Marcos Alvarez Dominguez Hello Nicolas, is it possible to stablish a bullish screener for this indicator when the cen...
Nicolas Please open a topic in the screener section to ask for this specific query.
zaher123 Hello, the indicator doesn't show up anything on the screen, any suggestions please?
Nicolas Apply it on the price chart. The indicator plot just one single line. There are two in the...
jamesoc Hi Nicolas, do you happen to know if there is an indicator that can be applied to charts, to...
gustavobp Buenos dias Nicolas, al agregar tu indicador no me reconoce la variable Price ni en la linea...

Top