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?

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

  1. Matriciel • 284 days ago #

    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 • 243 days ago #

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

  3. Vonasi • 243 days ago #

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

  4. Psari • 147 days ago #

    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
Related users ' posts
luxrun // volatilitĂ  Schwager calcolo incrediblecharts.com x = TR (close) y = exponentialaver...
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 ...
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.
Vonasi I developed and tested on v11.1 - 1.8.0_202. All the array use in the code is very basic. Di...
Vonasi You can find the minor bug fix and new ITF file here: https://www.prorealcode.com/topic/eve...
Reddington Hi Vonasi! Really nice work, is it possible to re-create this to work in 10.3? Best regards ...
mlouys Bjr, j ai lu effectivement que le système était long only, mais je crois qu on peut aussi l ...
bertrandpinoy bonsoir Nicolas est il possible de voir cet indicateur Ă©voluer dans un TF bas pour une aide ...
Bhanu Pratap Great Work Sir, Hats Off.
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 It is a long time since I coded this. You may have found a coding error. At a glance I think...
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.
Vonasi It is possible but I will need to reread the code and remind myself how it works as I coded ...
Giogio hello dear Vonasi, thank you for your indicator, can I ask you for some help in order to let...
Pottar24 HI Vonasi I would like to know how can this algorithm give me the value of the last max e mi...
Pottar24 VONAZI super indicator thank you. Can you provide me a code that gives me the two latest max...
tobytarczy hi, Is there a simple way to draw downwards and upwards trend lines on a specific timeframe...
Vonasi Images are not possible in library posts. It is best to start a topic in the forums.
thierrybl [URL=https://www.casimages.com/i/200515043914185668.jpg.html][IMG]https://nsa40.casimages.co...
Vonasi That should be possible - I'll add it to my list to work on!
thierrybl Thanks a lot
Nicolas That's not possible because the code uses ZigZag instruction from the platform which is not ...
MrMUCKIE Thanks Nicolas. Do you have any idea of how I could generate support/resistance figures for ...
Nicolas Try fractals, swing high/low points, donchian channel, ..
Nicolas I can't remember, if you can't find it anywhere in forums, open a new topic if you want it t...
rastasam bonjour Nicolas, j'aimerais tout d'abord vous remercier pour tout ce que vous faite et j'ai...
Nicolas Il s'agit d'un indicateur, pour en faire une strategie de trading automatique, cela demande ...
juanj
1 year ago
juanj I have actually completely redesigned this indicator with loads of improvements, so will res...

Top