VAMA – Volatility Adaptive Moving Average

VAMA – Volatility Adaptive Moving Average

This VAMA indicator draws an average with a period of p. The value of p is changed depending upon recent market volatility.

You set a percentage and the indicator counts back how many bars are needed to find that the highest high minus the lowest low is greater or equal to the desired percentage of the current price. The value for p is the number of bars needed to find this range.

With this calculation when a market is not very volatile the value of p will be high and the average slower moving and  in a volatile market the value of p will be low and the average faster moving.

You can change the average type drawn by changing the value of ‘type’ from 0 to 6.

  • 0 = Simple
  • 1 = Exponential
  • 2 = Weighted
  • 3 = Wilder
  • 4 =Triangular
  • 5 = End Point
  • 6 = Time Series

Set ‘Percentage’ to whatever percentage of price you want to use to calculate the p value for the average.

You can turn on and off the display of the latest p value change.

Due to the loop the average can be quite slow to draw so I advise using the DEFPARAM CALCULATEONLASTBARS to reduce calculation time.

I advise downloading the ITF file and importing it to get full functionality.

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

  1. JMat45 • 09/11/2019 #

    Thanks, Vonasi. Can this be adapted for a Hull moving average too? I’ve been looking for an ‘adaptive’ Hull for some time.

  2. Vonasi • 09/11/2019 #

    Sure that is possible. I will code it and make a post in the English ProBuilder forum and put a link here to that topic.

  3. Vonasi • 09/11/2019 #

    Vama v2 with Hull moving average included can be found here: https://www.prorealcode.com/topic/vama-with-hull-moving-average/

  4. JMat45 • 09/11/2019 #

    Thank you, Vonasi.

avatar
Register or

Likes

avatar avatar avatar avatar avatar
Related users ' posts
ChemaGeek Bonjour Nicolas, j'ai récemment découvert cet indicateur (Regularized Momentum 2017) et je l...
YvesRobert Bonjour, nouveau sur PRT (qq jours), j'essaie un peu de voir quel type d'indicateur me convi...
zilliq Thanks @Nicolas. I tried to use it as Trend in a proorder system, but don't know why, it doe...
Suzu Yuk He is right. MT and mavgMT are not defined and causing errors.....
Roland57800 Bonjour Noobywan, si je comprends bien l'utilisation de ce code que je trouve particulièr...
Noobywan Bonjour, quand la question a été posée dans le forum à celui qui avait fait la requête en am...
Fabian This Code draws only a retangle if the condition has been confirmed and NOT before (in that ...
RakeshPoluri I have a question about the bands on the candles. Is it bollinger bands or something else?
Nicolas I think that's 2 Bollinger Bands
Emperor.it "style(line,2)" C'è una guida ai parametri che si possono modificare ? Tipo stile della lin...
IV Mcm https://www.prorealcode.com/programming-with-prorealtime/
Seabiscuit Hi! I like this indicator a lot, been using it on a 30 min timeframe and usually confirms my...
Ramahu Bonjour et merci pour cet indicateur ! je l'observe sur les actions du Nasdaq et la plupart ...
fazel53 How do i attach this indicator to my mt5 platform?
Nicolas You can't! All indicators here are for ProRealTime trading platform: https://www.prorealtime...
Nicolas
4 years ago
Nicolas La définition des couleurs se situent entre les lignes 94 et 118. Selon le type de bougie (h...
Manu35250 Bonjour Nicolas, Est il possible de convertir cet indicateur en screener ? J'essaie depui...
Nicolas Bien sûr, merci de formuler la demande dans le forum approprié en respectant les règles de p...
Nicolas c'est exactement ce que je fais entre les lignes 58 et 64 pour pouvoir tracer la ligne complète
Italo Fabian Nicolas, Ces matrices sont-elles des vecteurs unidimensionnels ou multidimensionnels? Depu...
Denis Bonjour Nicolas et RicLg, Merci Nicolas pour cet indicateur intéressant et merci RicLg pour...
Nicolas Il doit s'agir d'un mauvais copier/coller. Je suggère de télécharger le fichier itf contenu ...
Bard Hello @Nicolas, I can get this to display in a separate indicator panel but not on Price as ...
Stenozar Hi @Nicolas, how can I put the bands on price? Thanks, Stefano
Fabian Hi IV Mcm, have you drawn the rectangles (Dinamic, Range) by yourself in the chart or are...
IV Mcm Myself to illustrate ;)
oraclus Bonjour indicateur très intéressant existe t il un screener qui détecte les actions qui donn...
IV Mcm Ce n'est pas le but de cet indicateur, mais avec un peu d'entraînement vous pourriez le code...
Yantra Thank you for sharing your good work!
Nicolas Il faut l'ajouter sur le prix avec l'icône de la clé situé en haut à gauche du graphique du ...
jerome777 merci de ta réponse
jerome777 bonjour c est bon il fonctionne parfaitement merci beaucoup
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...
Vonasi There are actually two ways to calculate standard deviations and I seem to have used the ver...
segie Can something similar be done with Supertrends?
Vonasi Not sure I fully understand what you are asking for. Are you asking for MTF Supertrend level...
Kris75 very interesting; thanks !

Top