P and T Volatility

P and T Volatility

This indicator gives an indication of recent market volatility based on the number of peaks and troughs in the p look back period.

A trough or a peak can be classified by the number of bars before and after a high or low that have lower highs (for a peak) or higher lows (for a trough). Change the ‘BarsBefore’ and ‘BarsAfter’ variables to select what type of peaks and troughs you are testing for. Some people call these fractals and others pivot points and others support and resistance but I am choosing to call them peaks and troughs!

The number of peaks and troughs in the look back period are counted and returned as a weighted average line chart centred around zero. The zero line represents the all time average of peaks and troughs for the period p.

Change the look back period length by changing the value ‘p’.

The green line represents peaks (P volatility) in the look back period and the red line represents troughs (T volatility) in the look back period. The blue line is peaks and troughs (P and T volatility) combined.

Low values show that there has not been a lot of peaks or troughs recently indicating a not very volatile market.

High values show that there has been a lot of peaks or troughs recently indicating a very volatile market.

Low and High volatility readings can sometimes indicate a market that is about to change or choose a direction.

If a market has been trending then we might see the P and T volatility dropping off as the market makes less and less peaks and troughs as it heads off in whichever direction it has chosen.

If the P value is high and the T value low then it might be that the market has recently been hitting upward resistance but little downward support.

How you finally analyse the indicators output is up to you!

I advise downloading and importing the ITF file 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. Matriciel • 08/30/2019 #

    Well done Vonasi !
    You have a lot of ideas.
    Personally, I work with Moving Averages only. Whether in a bounded indicator or not.

  2. Bard • 08/30/2019 #

    Very interesting approach Vonasi! I’m getting a 404 error when trying to download though?

  3. Vonasi • 08/30/2019 #

    I just tested and I was able to download with no error.

  4. Psari • 08/30/2019 #

    Hi Vonasi,
    I am a newbie and was wondering whether you could possibly help me with this problem:
    I would like to make an indicator with 3 Williams %R with 3 different periods and on each a Weighted Moving Average. I don’t manage to do this and would greatly appreiate your help.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar
Related users ' posts
Noobywan (My apologies for unformatted code, the formatting only works in forum or library posts not ...
Noobywan Hi FXTT, no problem for requests (as long as no one requests me singing), just usually it’s ...
JC_Bywan Bug fix at line 38, should be: if changebarre or (opentime[1]=start) then (same as in ...
mistersylv What parameter should we change to make another channel appear in the higher or lower time u...
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 Oui le code est correct et il fonctionne, j'ai de bons résultats sur la liste NASDAQ par exe...
pincherman Bonjour :-) J'ai coller le script dans prorealtime pour jouer avec le supertrend et j'ai un...
Nicolas Vous l'avez sans doute collé au mauvais endroit, dans l'éditeur de code pour les stratégies,...
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...
robertogozzi Yes, you can use any setting that suits you best! As to which one... it depends on the inst...
DaxRider grazie Robnerto
Rory Dryden Thank you. Experimenting with it now.
Wolf Hi Vonasi. Thank for this indicator. I like this calculate concept. I think that line 16 thi...
Vonasi Well spotted! It is just a safety check to ensure that no value below 1 can be used otherwis...
Reddington Hi Vonasi! Really nice work, is it possible to re-create this to work in 10.3? Best regards ...
Vonasi Thanks for the compliments. No this is not easily possible in v10.3 because it uses arrays w...
bruces Hi and thank you. I successfully imported original version above and added to my Prorealtim...
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...
carpentier Joffrey Bonjour à tous, Avant tout merci pour ce travail, cependant je suis bloqué quand je l'insta...
carpentier Joffrey Re, C'est ok, j'ai trouvé mon erreur... Cependant sur quel base peut on calculer son CALC...
Aragorna Hi Nicolas, How is it possible to use it in a higher timeframe plotted on a lower timeframe?...
Bhanu Pratap Great Work Sir, Hats Off.
bolsatonimora2 Hi Roberto, It is possible to modify this indicator which it marks the supports and resist...
robertogozzi What do you mean by "very high volume"? What do you want to be printed exactly?
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 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.
Vonasi Yes that was the issue. I have posted an updated ITF file here: https://www.prorealcode.com/...
crolakstrading @vonasi Thank you for fixing the issue! This is a great indicator.
gregoire good evening vonasi , I had made the request to create this indicator a few years ago and I ...

Top