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
Francesco78 Hi Pepmartorell, please let's continue the discussion on the forum thread so that we can sha...
Francesco78 Hi Pepmartorell, please let's continue the discussion on the forum thread so that we can sha...
Jusmih1 Hi there, i am looking at your Strategy however when you put in automatic trading mode its ...
bruces Hi. Thank you that is what I am looking for. As well as the chart, I want to also add to a...
Jodal Bonjour Nicolas, Merci pour cet indicateur! Est-ce possible de configurer une alerte pou...
Nicolas Merci pour le post dans le forum en respectant les règles de publication énoncées dans le ca...
Dron De lo mejorcito
fabio407 Thanks, Nicolas. Very useful. Would you tell me where to find what result conveys the functi...
Nicolas This is not an instruction of the programming language but a variable from this indicator (l...
fabio407 OK. I didn't notice it. Many thanks, Nicolas!
albertocampagna Sei grande Nicolas :-)
SAcht Dear Nicolas, Great work, thank you very much!I would love to use the indicator in ProScree...
SAcht btw: The above-posted ProScreener is supposed to show stocks for which the center line has i...
Wilko And not only readable.... makes it much easier to iterate different entry/exit-conditions, d...
IGOSNELL Hi Interesting strategy, when I used $ M-R Dif EURUSD M15 Long if does not enter any positi...
ilvillans HI, I modified the system, from good results but from this error: Replace the variables wit...
victormork Hi, I would just like to share my own take on this strategy. I'm using 30 min on EURUSD but ...
mckubik Thanks. I will run a Test. 
poonsl2828 Hi! bjoern May i know what timing should i change for time zone (Singapore (GMT +8:00) ...
Nicolas Restart your platform in order to be sure to use the last version, there was a version rollb...
bertrandpinoy bonjour voud pouvez m envoyer le code modifier par vous?
Nicolas Désolé , je ne comprends pas votre question.
Nicolas Rien, il faut l'appliquer sur la charte. Soit le mettre sur le graphique du prix, à l'aide d...
signorini Merci pour votre réponse. Je l'applique sur la charte, j'utilise la petite clé pour effacer ...
signorini Je vous remercie, Nicolas. C'est fixé. Très bon week-end.
Abz  hi , you need to add the indicator from the "price" menu in chart
Francesco Thank you Abz!
phanz Hi Nicolas, this is an interesting strategy. For long position, I assume entry when prices ...
julien1978 The ADR value that is plotted intraday does not match the value of the regular ATR indicator...
Fab666 I've tried to get a fix for this also but no luck, it doesn't print the correct data as far ...
Seabiscuit Hi! With the new PRT update, this indicator does not work anymore
Guibourse Hi ! I am asking once again for your help : would it be possible to use the ATR as a "take p...
Tradingrob Many thanks for the indicator, however if the price is below the indicator, then the indicat...
aldtrading Merci pour ton travail ! J'ai de bons résultats en utilisant cet indicateur
Nicolas Use the wrench of the price chart! Upper left of the window
Dymjohn The wrench shows options for the components of the indicator not how to show in the main cha...
Nicolas http://www.prorealcode.com/topic/overlapping-indicators/  
Pelle Nævestad Thanks Nicolas, this is a keeper!
Chicane23 Hi, when uploaded the WAE isnt showing histogram; only line. Is there a way to modify?
Nicolas Change the way the lines are displayed in the indicator settings window : histogram, lines, ...
Dimi.A Perfect for counter-trend scalping. I like this!
viktorthuns Hi Nicolas! Great work you've done with all your indicators. Just wondering about the code a...
Nicolas the value is not a boolean but an average of an addition of booleans. As stated in the descr...
r.angel It seems that the formula needs a SQRT (that is Vyangzhang = SQRT(...))
RickTrader I think to have annualized view of this historical volatility you will need : Vyangzhang =...

Top