Smoothed Bollinger %b indicator

Smoothed Bollinger %b indicator

This is the modified % bollinger bands oscillator remade by Sylvain Vervoort. It’s using an Heiken Ashi closing price instead of the classic close value with TEMA average. This indicator tend to be more accurate and less choppy for intendifying turning points of the Dow theory by counting reverse oscillation of the curve.

Because of its bounded values, it can be used as an overbought and oversold classical oscillator.

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. ALE • 11/12/2015 #

    Hi Nicolas
    there’s a problem to download file
    Thanks for the very nice indicator

    • Nicolas • 11/12/2015 #

      Thank you for noticing it to me, it is now fixed. Problem came from a wrong file name..

  2. Maxime Baudin • 11/12/2015 #

    Thanks!

  3. cepamoi • 11/12/2015 #

    Hi Nicolas,

    Something looks odd with haOpen: it seems that /4 is missing in the second part of the formula.
    Shouldn’t we have:
    haOpen = ((Open[1]+High[1]+Low[1]+Close[1])/4 + (Open[2]+High[2]+Low[2]+Close[2])/4)/2

    Thanks.

    • Nicolas • 11/12/2015 #

      Well, I don’t remember now but I think I’ve translated it correctly from its own original code… may I ask you to make a small verification on the web? 🙂

    • cepamoi • 11/12/2015 #

      From here:
      http://traders.com/documentation/feedbk_docs/2010/05/TradersTips.html
      haOpen = 0.5 * ( AvgPrice + haOpen[1] ) ;

      So haOpen = ((Open[1]+High[1]+Low[1]+Close[1])/4 + (Open[2]+High[2]+Low[2]+Close[2]))/2 is probably wrong.
      With this formula, if you try to plot haOpen, it is significantly shifted up from the price, which probably does not make sense.

      But haOpen = ((Open[1]+High[1]+Low[1]+Close[1])/4 + (Open[2]+High[2]+Low[2]+Close[2])/4)/2 is probably wrong too…

      How can we implement a formula which refers to its previous value in ProRealTime?

    • Nicolas • 11/12/2015 #

      I made verification and all formulas on the TraderTips page refer to the previous candlestick for the haOpen calculation. This is how S.VERVOORT made this indicator.
      To refer to a previous state of a value, just add offset in brackets : myvalue[20]

    • cepamoi • 11/12/2015 #

      So the correct formula should be something like:
      haOpen = ((Open[1]+High[1]+Low[1]+Close[1])/4 + haOpen[1])/2
      However, this does not seem to work. Any idea why?

    • Nicolas • 11/12/2015 #

      Because haOpen doesn’t exist at the very first bar, so the calculation can’t be made correctly (while Open/High/Low/Close do exist in the data serie). You should give haOpen a dummy value one time at first code read, like this:
      ONCE haOpen = medianprice

    • cepamoi • 11/12/2015 #

      Unfortunately, this still does not work:
      ONCE haOpen = medianprice
      haOpen = ((Open[1]+High[1]+Low[1]+Close[1])/4 + haOpen[1])/2

      ProRealTime does not plot anything with the above formula.
      What are we missing here?

    • Nicolas • 11/12/2015 #

      Force calculation to wait 1 bar of history already loaded:
      ONCE haOpen = medianprice
      if barindex>1 then
      haOpen = ((Open[1]+High[1]+Low[1]+Close[1])/4 + haOpen[1])/2
      endif

    • cepamoi • 11/12/2015 #

      Now it works.
      Thanks a lot Nicolas!

      Here is the full code:

      // variables :
      // period = 18
      // TeAv = 8
      afwh = 1.6
      afwl = 1.6
      afwper = 63

      once haOpen = medianprice
      if barindex>1 then
      haOpen = ((Open[1]+High[1]+Low[1]+Close[1])/4 + haOpen[1])/2
      endif

      haC = ((Open+High+Low+Close)/4 + haOpen + Max(high,haOpen) + Min(low,haOpen)) /4

      TMA1 = tema[TeAv](haC)
      TMA2 = tema[TeAv](TMA1)
      Diff = TMA1-TMA2
      ZlHA = TMA1+Diff

      percb = (tema[TeAv](ZLHA)+2*STD[period](tema[TeAv](ZLHA))-weightedaverage[period](tema[TeAv](ZLHA))) / (4*STD[period](tema[TeAv](ZLHA)))*100

      hi = 50+afwh*STD[afwper](percb)
      lo = 50-afwl*STD[afwper](percb)

      RETURN percb as “SVE BB %b”, hi as “upper band”, lo as “lower band”, 50 as “middle”

avatar
Register or

Likes

avatar avatar avatar avatar avatar
Related users ' posts
Jean2139 Bonjour Yvan, Merci pour ton indicateur que je trouve très intéressant. Je suppose que tu ...
Suffi Hier eine kleine Korrektur: //-----Inputs-----------------------------------------// MALengt...
bousalahane hello, thank you for sharing, I’m not top strong in the programation part, there is a way to...
Fgats Hi, With this indicator I just wanted to show the interest that can exist to synthesize th...
davidguerreir how to adapt nbStdSig values ?
FXtonio @RICOU en 1 minutes avec un filtre de tendance ZLSMA 200 et eventuellement un rsi 7 , 69% de...
JC_Bywan For people interested in the screener: https://www.prorealcode.com/topic/screener-buy-sell-m...
octum Gracias NJicolas. Las lineas 35 y 36 dan fallo. (¿Es adrede para iniciados?) Puedes co...
Alfy
2 years ago
geroniman bonjour si je comprends bien, qaund els points sont verts on regarde pour un long, le blanc ...
Alfy No, the dots only show the compression of the volatility. There are 3 levels of "squeeze" wh...
ted.hulsman Hi Alfy, I'm trying to understand your indicator, so I made the Bollinger Bands and the Kelt...
bab el franco hello once installed I have no results despite different options of markets or temporality
Nicolas Sorry there was a small issue in the code, i have changed the attached itf file and updated ...
Mitchy14 Hi Nicholas, apologies, I am usually fairly good at implementing your creations (for which I...
Nicolas Are you using PRT version pre-v11? TIMEFRAME for indicators is possible since months for pro...
Pensera Bravo Nicolas ! Tu es en quelque sorte l’inventeur de Metascore…(oups je viens de lire jusqu...
Nicolas Dans un but d'investissement pure, et non spéculatif.
Enigma08 Hi Juanj. I am new to ProrealTime and I am trying to program the Proscreener. I want the Pro...
Fabian Hi Thomas, thanks for your explanations. Which indicator do you use in the screenshot ...
Thomas Thats On Balance Volume and Bollinger or SMA or what you want. It shows me the volume flow. ...
bertrandpinoy @MAKSIDE I would be grateful if you send me your version. have a nice day
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!
imonix Have been trying this on demo since Monday before deciding whether to go live with it. Using...
Roberto Blázquez I'm sorry, I've tried it since November 2012 and it's bad results.
Dunstan I would like to get guidance_ How do I access and attach this indicator to my MT5 platform...
Nicolas You can't, use prorealtime, it's way better
jc84 Thank you very much for this indicator , not provided by PRT I was actually working at thi...
Pierreco1991 Hello Can you confirm this configuration for FRANCE ? //Time in UTC+8 Rest0Minutes =...
Nicolas Ask on an Excel website?!
JJMR HOLA NICOLAS, TENGO LA ULTIMA VERSION ACTUALIZADA DEL INDICADOR TTM SQUEEZE PRO EN LA VERSIO...
imokdesign @nicolas ,if in want to "call" this indicator, which values i have to write down?
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...
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...
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...
Dron Hola! El archivo itf donde esta?
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.
Marie-Eve Vergoz lorsque je copie les codes, le système me signale des erreurs à la ligne 12 et suivantes
Marie-Eve Vergoz sorry - tout est ok -

Top