Fractal Standard Deviation Bands

v11
Fractal Standard Deviation Bands

This indicator calculates the simple moving average and standard deviation bands (Bollinger Bands) of fractals.

This indicator only works on PRTv11 onwards.

Set ‘p’ to the period you wish to use in the calculations.

Set ‘Deviations’ to the multiple of standard deviations away from the average you want the bands to be.

The type of fractal used in the calculation can be changed by adjusting the ‘BarsBefore’ and ‘Bars After’ settings. For example if BarsBefore = 2 and BarsAfter = 1 then the swing high fractals would have a high with two bars preceding it with lower highs and one bar after it with a lower high and the swing low fractals would have a low with two bars preceding it with higher lows and one bar after it with a higher low.

The ‘HighandLow’ setting allows you to either display one average line that is an average of the last ‘p’ high and low fractals and standard deviation bands calculated from this or to display two average lines – one for the average of only high fractals and the other the average of only low fractals. The upper band is then calculated off the high fractal average and the lower band off the low fractal average. If ‘HighandLow’ is selected you get the latter high and low separate calculations.

As always I advise downloading and importing 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. Vonasi • 04/20/2020 #

    There are actually two ways to calculate standard deviations and I seem to have used the version for calculations on populations rather than on data samples. There is only a tiny difference between them but if you want a modified code then you can find it here; https://www.prorealcode.com/topic/standard-deviation-indicators-minor-fix/

avatar
Register or

Likes

avatar avatar
Related users ' posts
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...
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...
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...
Stockastiss Can this code be simply transferred into Backtestingcode so one doesnt need to use call ? (i...
Vonasi Sorry for the late reply. Add the code to your strategy and remove line 5 and line 39. Chang...
viktorthunss Hi! How many averages are there? Can I see the somewhere?
Zigo Normaly it do work in version 11.
bertrandpinoy Hello to all, please does a coder can bring the indication of the price level on the chart o...
Zigo @bertrandpinoy add between line 50 and 51 : drawtext("#dnh#",barindex,low-2.618*AverageTrue...
leofi https://www.prorealcode.com/topic/simple-average-with-visual-color/
leofi Go visit www.prorealcode.com/topic/simple-average-with-visual-color/ and watch 2em post
Dritan Hi,I am new on Prorealtime and coding.I downloaded the indi but I have it on a separate wind...
Marie-Eve Vergoz Bonsoir - Voici l'erreur qui est signalée lorsque je souhaite utiliser cet indicateur : il...
Om Hello, thanks for sharing! Getting a message that Variable P is undefined?
matin Intraday Average Volume Indicator Not working, what can i do plz
supertiti Hello Jan You must use this code in correspondence with other indicators, a code alone do...
Franro Hi, this looks very good is this something you worked towards a strategy?
hua hin Bonjour comment mettre ce programme sur un graphique le lien est en JPG et sur crewation i...
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...
redactv7 On my charts, the indicator doesnt go on the upper pannel, on prices, but under like an osci...
Nicolas apply in on the chart, look at this how-to video: https://www.prorealcode.com/blog/video-tut...
jonpt88 interesting code thanks!
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.
jobswaps Sube como trazar lineas de tendencias a tantas barras
Frankiesc interesting indicator !! Thanks for sharing!!!
robertogozzi Thank you :)
JJ Tec Hola Las condiciones de entrada / salida vienen en el libro de J. Carter Mastering the trad...
Pixeldd Ich bekomme beim einfügen des Indikators einen Fehler angezeigt. Was bitte muss ich genau än...
HarryPro Hello, Firtly there appears to be a typo on line 6 "lenghkc=20" should this be "lengthkc=...
Nicolas En effet merci, erreur corrigée, la variable Risk affecte désormais comme il se doit les cal...
nader003 How can we get this indicator on MT4
Nicolas You can ask for private custom coding to our programming services: https://www.prorealcode.c...
Vonasi
5 years ago
Balmora74 Thanks for this code. i will try to adapt it in the EUR/USD Pac Man Strategy who is based on...
Vonasi I still have two versions of the PacMan strategy on forward test although there have been va...
Balmora74 I use your version on a real account and the strategy is profitable and i did not have any p...
Jack86gv Ciao Nicolas, e possibile fare uno screener con questo codice ovvero vorrei sapere quando il...
Nicolas https://www.prorealcode.com/topic/screener-regressione-canale/
wharfdog Hi Nicolas, Fantastic work, I'm really grateful for this. I was wondering if it would be ...

Top