Free: indicator teardowns, a repaint checker and open-source scripts. No buy/sell signals, ever.

Taught to TradeSystems over signals.

Explainers / CM_Williams_Vix_Fix by ChrisMoody

CM_Williams_Vix_Fix by ChrisMoody, explained from the source

CM_Williams_Vix_Fix Finds Market Bottoms is an open-source TradingView indicator by ChrisMoody, published in July 2014, with about 66,400 boosts. It plots Larry Williams' "VIX Fix" as a histogram under the chart and paints a bar bright green when the value is unusually high. This page walks through the published code in order, says what each part does, and ends with where it fails. It does not say what a green bar means for the next move.

The surprise: the "percentile" line is not a percentile

Two settings are labelled as percentiles: "Highest Percentile" at 0.85 and "Lowest Percentile" at 1.01. Neither computes a percentile. The high line is the largest VIX Fix value of the last 50 bars multiplied by 0.85, so it is 85% of a recent peak, not the level that 85% of recent values sit under. In our port that line sat about 9% above the true 85th percentile of the same 50 values. The low line is the smallest value of the last 50 bars multiplied by 1.01. And the low line is never used for the bar colour: changing "Lowest Percentile" moves an optional line (off by default) and nothing else.

Step 1: the formula

For each bar, the script takes the highest close of the last 22 bars (this bar included), subtracts this bar's low, divides by that highest close and multiplies by 100. So the value is how far, in percent, the bar's low sits below the best close of about a month of daily bars. It is zero or close to it while price makes new highs and grows as price falls away from them. That is Larry Williams' published VIX Fix, and the code matches it. The input for the 22 is labelled "LookBack Period Standard Deviation High", but it is only the lookback for the highest close; no standard deviation is involved there. Nothing in the formula uses the VIX index or any option price; it is built from the chart's own closes and lows.

Step 2: the band

On the VIX Fix values the script builds a Bollinger-style band: a 20-bar average plus 2.0 standard deviations of the same 20 values. The upper band can be drawn with "Show Standard Deviation Line?", which is off by default. There is no lower band in use.

Step 3: the colour

A bar is painted green when its VIX Fix value is at or above the upper band, or at or above the 85%-of-peak line from the section above. Otherwise it is grey. That is the whole decision. In our port, most green bars came from the 85%-of-peak line alone (about 12 bars in 100), while bars over the band alone added about 3 in 100.

What the settings change

"LookBack Period" (22) sets the window for the highest close. "Bollinger Band Length" (20) and "Standard Deviation Up" (2.0, allowed 1 to 5) set the band. "Look Back Period Percentile High" (50) and "Highest Percentile" (0.85) set the 85%-of-peak line. "Lowest Percentile" (1.01) only changes the optional low line. The two "Show" boxes draw the lines; they do not change the colour. The chart on the script's own page was made with 1.8 in the band box, not the default 2.0, so a reader who copies the picture's look gets slightly more green bars.

What we checked in Python

We ported the logic to Python and ran it on invented random-walk prices with 20 price ticks inside each bar, three runs of 20,000 bars, at two bar sizes (typical moves of 1.5% and 0.2%).

About one bar in five was green at the defaults (19% to 20%), at both bar sizes. The rule is scale-free, so the share of green bars barely depends on the symbol's volatility. With the listing picture's 1.8 the share rose to about 21%.

The 85%-of-peak line sat 8% to 10% above the true 85th percentile of the last 50 values, so the label overstates how rare a green bar is by that line's own name.

Inside a live bar the colour rarely flipped back. Fewer than 2 in 1,000 green bars were green at some tick and grey at the close. The other direction is common: because a bar's low can only fall during the bar, many bars start grey and turn green later, so the colour on a live bar is a running reading until the bar closes. The script uses no other timeframe and no future bars, so closed bars do not change after a reload. These figures describe the code on invented data, not any market.

Where it fails

Educational only. Not financial advice. Nothing here is a recommendation to buy or sell anything. CM_Williams_Vix_Fix is by ChrisMoody on TradingView, based on Larry Williams' VIX Fix; this page describes its published open-source code in our own words and is not affiliated with the author. Simulation figures come from synthetic random-walk prices and say nothing about how the script trades.

Also explained: Repaint checker, VWAP, Supertrend, RSI, UT Bot Alerts, Nadaraya-Watson Envelope, Squeeze Momentum, What is repainting on TradingView?, Is TradingView backtesting accurate?, Chandelier Exit, WaveTrend Oscillator, QQE MOD, Pivot highs and lows, Hull Suite, Range Filter, Twin Range Filter, HalfTrend, ZigZag++, SSL Hybrid, CM MacD Ultimate MTF, Volume Profile / Fixed Range, ADX and DI, Support Resistance Channels, Market Structure Break & Order Block, Order Block Finder, Pivot Point SuperTrend, Trendlines with Breaks [LuxAlgo], Divergence for Many Indicators, TradingView script selling terms, Support and Resistance Levels with Break, Liquidity Swings [LuxAlgo], Pine Script errors, Breakout Probability (Expo), Did ChatGPT or Claude write your Pine Sc, Lorentzian Classification, SuperTrend AI (Clustering), Machine Learning Adaptive SuperTrend, Dynamic Swing Anchored VWAP, Support and Resistance Power Channel by , Support and Resistance (High Volume Boxe, Trendline Breakouts With Targets by Char, Breakout Finder by LonesomeTheBlue, Volume Flow Indicator by LazyBear, FVG Order Blocks by BigBeluga, Bollinger + RSI Double Strategy by Chart, Ultimate Moving Average MTF by ChrisMood, Fibonacci Bollinger Bands by Rashad, Candlestick Patterns Identified by repo3, MACD + SMA 200 Strategy by ChartArt, Pine Script v5 to v6, Moving Average Cross Alert, Multi-Timefr, WaveTrend Oscillator [WT] by LazyBear, WaveTrend with Crosses [LazyBear], CM_Price-Action-Bars by ChrisMoody, RSI Candles by glaz, CM RSI-2 Strategy Lower Indicator by Chr, CM Stochastic Multi-TimeFrame by ChrisMo, CM_Ultimate RSI Multi Time Frame by Chri, TonyUX EMA Scalper - Buy / Sell by tux, MACD 4C by vkno422, My Pine Script is valid. What did the va

Next steps

  • Get a script fixed. Compiles but behaves differently live, or changes after a reload? In a Pine Script Audit, an AI model reads every line and writes a report on what to fix for $49, or also fixes those problems for $149. It cannot prove a script is safe.
  • Check your own script. Paste its source into the free repaint checker. It runs in your browser and flags known patterns.
Before you trust its backtest: the Integrity Checklist, $19 one-offBack to Taught to Trade

No TradingView account yet? This affiliate link gives you a $15 coupon toward a paid plan, and we earn a commission if you buy one. The free plan is enough to follow this page.