Indicator request for Nic : CM_Williams_Vix_Fix

Forums ProRealTime English forum ProBuilder support Indicator request for Nic : CM_Williams_Vix_Fix

Currently, there are 0 users and 1 guest visiting this topic.
View all attachments


Viewing 15 posts - 1 through 15 (of 16 total)
  • #20017 Report


    Could you please convert the VIX Fix for PRT please? Link.

    Here is the Pine Script code:

    study(“CM_Williams_Vix_Fix”, overlay=false)
    pd = input(22, title=”LookBack Period Standard Deviation High”)
    bbl = input(20, title=”Bolinger Band Length”)
    mult = input(2.0 , minval=1, maxval=5, title=”Bollinger Band Standard Devaition Up”)
    lb = input(50 , title=”Look Back Period Percentile High”)
    ph = input(.85, title=”Highest Percentile – 0.90=90%, 0.95=95%, 0.99=99%”)
    pl = input(1.01, title=”Lowest Percentile – 1.10=90%, 1.05=95%, 1.01=99%”)
    hp = input(false, title=”Show High Range – Based on Percentile and LookBack Period?”)
    sd = input(false, title=”Show Standard Deviation Line?”)

    wvf = ((highest(close, pd)-low)/(highest(close, pd)))*100

    sDev = mult * stdev(wvf, bbl)
    midLine = sma(wvf, bbl)
    lowerBand = midLine – sDev
    upperBand = midLine + sDev

    rangeHigh = (highest(wvf, lb)) * ph
    rangeLow = (lowest(wvf, lb)) * pl
    col = wvf >= upperBand or wvf >= rangeHigh ? lime : gray
    plot(hp and rangeHigh ? rangeHigh : na, title=”Range High Percentile”, style=line, linewidth=4, color=orange)
    plot(hp and rangeLow ? rangeLow : na, title=”Range High Percentile”, style=line, linewidth=4, color=orange)
    plot(wvf, title=”Williams Vix Fix”, style=histogram, linewidth = 4, color=col)
    plot(sd and upperBand ? upperBand : na, title=”Upper Band”, style=line, linewidth = 3, color=aqua)

    #20028 Report

    There is also a version that picks tops and bottoms as well here:


    #20056 Report

    Here is the converted code. It has some lines that aren’t used in the code, so I commented them.

    This version is only used to find bottoms in a bullish trend.


    5 users thanked author for this post.
    #20061 Report

    That’s awesome Nic thank you mate!

    #31173 Report

    Thank you Nicolas!

    #37649 Report

    Merci Beaucoup Nicolas !


    #89750 Report

    Thanks Nicolas

    Could you please amend the above code by inserting a moving average[ variable n] within the indicator

    I obviously can add and see any moving average but I would like to refer to its value when I use a CALL within a strategy I might post later on.

    I tried to code it myself with the ‘Help” instructions but with no success.








    #89764 Report

    Here you go:

    Change the value of n to your desired average period.

    1 user thanked author for this post.
    #89781 Report

    Thanks a lot Vonasi

    #110244 Report

    Thanks very much for this very useful indicator Nicolas and for the modification, Vonasi.

    I had a couple of ideas:
    Is it possible to code it to find tops and make it like the indicator (linked below) so it shows not just the IV rank but also the percentile (so it is scaled by 100%)?

    “This indicator is meant to be a substitute for Implied Volatility Rank and Percentile for traders who do not have access to readily available options data. This indicator is based on the William’s VixFix which is an indicator that mirrors the VIX , which charts the implied volatility of the SPX . The great thing about the VixFix is that it can be applied to any security, not just the SPX .

    IV Rank is calculated by taking the highest and lowest values over the past however many periods you choose, and seeing what percentage of the way between those values the current IV value is. For example if over the past 5 periods the highest IV value was 30 and the lowest IV value was 10, and the current is 20; then the IV Rank would be 50% because 20 is 50% of the way between 10 & 30.

    IV Percentile is calculated by looking at all of the past values, not just the highest and lowest, and seeing how many of those values were below the current. (IVP tells you the percentage of time that the IV in the past has been lower than current IV). For example lets say over the past five periods the IV values were : 30,10,11,15, & 17; while the current IV value is 20. As stated before the IV Rank would be 50%, while the IV Percentile would be 80%, given that 4/5 of the values were below the current IV value of 20.

    IV Rank and IV Percentile are often wrongly used interchangeably, but as shown here they are very different. Most people use IV Rank as their main options tool; while IV percentile is a great way to give IV Rank context. Whichever you choose to use, or even both, does not really matter as long as you use either one or both consistently.

    IV Rank and IV Percentile are mainly used in this way: when IVR/IVP <50, buy options, when IVR/IVP >50 sell options. The reason that you buy options when IVR/IVP is low is because IV is mean reverting, so you would expect IV to eventually start increasing towards the mean, causing prices to move. The reason you would sell options when IVR/IVP is high is because IV is mean reverting and you would expect IV to decrease towards the mean, causing prices to move sideways.

    In this script there are two lines, one denoting IVR and one denoting IVP . IVR is the line which is green when it’s above 50 and red when below 50. IVP is the line which is aqua when above 50 and orange when below 50.

    Also I was wondering why “pl” is set at 1.01 instead of 0.15 and I also do not get the green histogram bars (mine are all grey despite color code within indicator)?


    #110750 Report

    If anyone can help contribute to the HV and IV Percentile/Rank indicator ideas please visit:


    #110753 Report

    Bard – Technically you have double posted which is frowned upon within the forums as it leads to confusion and wasted time and is less likely to get you an answer and not more likely to.

    I would suggest that anyone wishing to reply to you does so in the topic that you have provided a link to rather than here. Please do not double post again! 🙂

    #110848 Report

    That’s why I posted the link above after waiting 6 days without response here.

    #110849 Report

    You did get a response. I responded here by accident before realising that I had replied to the wrong topic and then I had to move my post to the other topic. A lot of wasted time and effort on my side due to double posting.

    If you don’t get an answer then it is most likely that the reason is because no one has an answer for you. Bumping the topic is unlikely to suddenly produce an answer.

    1 user thanked author for this post.
    #120566 Report


    In Nicholas attachment there is some bars on the histogram which is green, showing the market bottoms. However when I apply the indicator to some of my charts I don´t get a single green bar on the histogram.

    Does anyone have a solution for this?

    Thank you

Viewing 15 posts - 1 through 15 (of 16 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login