Market Crystallization Gauge TradingView Indicator

Trend strength usually arrives as one number. Also, market Crystallization Gauge, a trend strength indicator TradingView traders can drop on any chart, builds three. It measures how much bar-to-bar returns repeat, how hard ADX pushes, and how far return volatility has contracted against its own 50-bar baseline. Indeed, those three parts add up to a 0-100 crystallization score. The chart shifts colour as that score climbs. Still, arrows fire only on the bar the score first clears your threshold.

It is free and open source. Thus, you can add it to any chart from the Market Crystallization Gauge script page on TradingView, and the full Pine source is published there for you to read.

What Market Crystallization Gauge plots on the price chart

The script paints a purple 50-bar EMA in three stacked layers, so the line reads as a glowing regime rail. Hence, background tint tracks the score: gold or trade colour above 85, a lighter shade above 60, purple above 40. On a signal it prints a triangle marked CRYST up or down, tints the bar, and attaches a label showing the score out of 100 plus the rounded ADX. Next, a nine-row dashboard sits top right with score, regime word, bias, return correlation, ADX, DI+ against DI-, StdDev ratio and bars since the last signal.

How Market Crystallization Gauge is built

Three parts make the score

The script starts with one-bar returns. Then, it correlates that return series against its own previous value over 14 bars. Positive correlation means up bars follow up bars, so price moves in a structured way. Yet, the first component maps that correlation with correlation times 60 plus 30, then clamps the result between 0 and 40. So a correlation of zero already earns 30 points. Truly, anything above 0.17 saturates the component at 40.

Component two reads trend force. Plainly, the DMI calculation at length 14 returns DI+, DI- and ADX. The script takes ADX minus 15, multiplies by 1.5, then adds the 3-bar change in ADX times 3. Also, it clamps that to 0-35. A flat ADX of 15 scores nothing. Indeed, an ADX near 38 maxes the component out.

Component three rewards calm. Still, it divides the 20-bar standard deviation of returns by its own 50-bar average. Then it scores 1.2 minus that ratio, times 50, clamped to 0-25. Thus, a ratio of 0.70 or lower earns the full 25. A ratio at or above 1.2 earns zero. Hence, the three parts sum to a rounded 0-100 crystallization score.

How a signal clears the gates

Direction never comes from the score. Next, the script reads DI+ against DI-, and close against the 50-bar EMA. Both must agree. Then, DI+ over DI- with close above the EMA sets a bull bias. The mirror sets a bear bias. Yet, if the two disagree, bias stays neutral and no arrow prints.

Timing stays deliberately narrow. Truly, the score must cross your Crystallization Threshold, 75 by default, on this bar and not on the one before. That single transition bar is the only candidate. Three more gates then apply. Volume must beat its own 20-bar average. Plainly, at least 15 bars must have passed since the last signal. And the bar must close, because the script checks the confirmed-bar flag.

The score also drives four regime words. Also, above 85 reads CRYSTALLIZED, above 60 reads FORMING, above 40 reads TRANSITIONING, and anything lower reads CHAOS. Those words describe the score only. Indeed, they carry no direction on their own.

How to read the signals

Read the dashboard before the arrow. Still, return correlation above 0.2 turns green. ADX above 25 turns gold. Thus, a StdDev ratio under 0.8 turns green. When all three light up together, the score sits high for a reason you can name.

Treat the arrow as a regime start, not a reversal call. Hence, the signal fires on the bar where structure first appears, with volume behind it and the EMA already on the correct side. Price often has room left. Next, it can also stall, because a rising score says nothing about how far a move travels.

The 15-bar cooldown shapes what you see. Then, after a signal the gauge stays quiet for 15 bars even if conditions improve. The Last Signal row counts those bars for you. Yet, raise it on fast intraday charts. Lower it on daily charts and you still avoid clusters.

Every Market Crystallization Gauge setting explained

The script exposes 14 inputs, grouped in the settings panel exactly as shown below. Defaults are the published values.

Crystallization Settings

SettingWhat it doesDefaultRange
Correlation LengthLookback for bar-to-bar return correlation145 to 50
ADX/DMI LengthLength for ADX and directional indicators145 to 50
StdDev LengthLookback for return standard deviation205 to 100
StdDev Baseline LengthSets the stddev baseline length used in the calculation.5020 to 200
Volume SMA LengthSets the volume sma length used in the calculation.205 to 100
Regime EMA LengthSets the regime ema length used in the calculation.5010 to 200

Signal Settings

SettingWhat it doesDefaultRange
Crystallization ThresholdMinimum 0-100 score to trigger signal7550 to 95
Signal Cooldown BarsSets the signal cooldown bars used in the calculation.153 to 50

Visual Settings

SettingWhat it doesDefaultRange
Show Crystallization DashboardToggles show crystallization dashboard on the chart.onon / off
Show Regime Background GradientToggles show regime background gradient on the chart.onon / off
Show 3-Layer Signal GlowToggles show 3-layer signal glow on the chart.onon / off
Show Regime EMA GlowToggles show regime ema glow on the chart.onon / off
Buy ColorColour used for buy color.#39ff14
Sell ColorColour used for sell color.#ff2d78

Alerts built into Market Crystallization Gauge

The script ships 11 alert conditions. Truly, open the alert dialog on the chart, pick the indicator as the condition source, then choose the event you want. Alerts fire on the close of the bar, so they follow the same confirmed-bar rule the on-chart signals use.

  • MCG Buy Crystallize
  • MCG Sell Crystallize
  • MCG Any Signal
  • MCG Fully Crystallized
  • MCG Transition
  • MCG Strong ADX
  • MCG StdDev Contraction
  • MCG Bullish Regime
  • MCG Webhook JSON

Other markets and timeframes

Every input to the score stays relative. Plainly, correlation runs from -1 to 1. ADX arrives on its own 0-100 scale. Also, the volatility term compares a 20-bar deviation to its own 50-bar average. Nothing anchors to pip size or contract value. Indeed, so the defaults move to indices, gold, crypto and stocks without retuning. The one instrument-specific part is the volume gate. Still, it needs a volume feed, and on spot forex that feed counts broker ticks rather than traded contracts.

Limitations worth knowing

The gauge grades structure. Thus, it does not manage a trade. It sets no stop, no target and no size, and it never exits. Hence, a high score can persist while price grinds sideways inside a tight range.

The name is a metaphor. No physics model runs underneath. The script computes a weighted sum of return correlation, ADX with its slope, and a volatility ratio, then rounds it. Next, change the three clamps and the same chart produces a different score.

Signals need a closed bar, so arrows land on the next open and never repaint. Then, the background tint and the dashboard read the forming bar, so both do change intrabar. Volume also gates every arrow, which blocks signals outright on feeds with no volume.

Get Market Crystallization Gauge on TradingView

Open Market Crystallization Gauge on TradingView

If you also trade MetaTrader, the MT4 and MT5 indicator library is available below.

Get the complete indicator library

One email unlocks the full MT4 and MT5 indicator library. Yet, this TradingView script stays free on TradingView – the button above adds it to your chart.

Using it alongside MetaTrader

Adding a script on TradingView takes one click, so there is no install step here. Truly, if you want the same idea on MetaTrader, the MT4 and MT5 indicator installation guide walks through copying files into the data folder and attaching them to a chart. You can also browse the full MetaTrader indicator library, the MT4 indicators section, or the other free TradingView scripts published on this profile. For related chart tools see the MT5 indicators section and the forex trading strategies guides.

External references

Frequently asked questions

Does the Market Crystallization Gauge repaint?

The arrows do not. Plainly, every signal checks barstate.isconfirmed, so it prints only after the bar closes, and the historical chart matches live behaviour. The background gradient and the dashboard read the forming bar, so those two do change intrabar.

What does a score of 75 actually mean?

It means the three components together reached 75 out of a possible 100. Also, return correlation contributes up to 40 points, ADX with its slope up to 35, and volatility contraction up to 25. The score measures structure. Indeed, it does not measure the odds of any trade.

Is the gauge multi-timeframe?

No. Still, the script calls no request.security, so every reading comes from the chart timeframe you have open. To compare timeframes, load a second copy on a second chart.

Why did the score sit at 90 with no arrow?

A high score alone never fires. Thus, the score must cross the threshold on that exact bar. DI and the 50-bar EMA must agree on direction. Hence, volume must beat its 20-bar average. And the 15-bar cooldown must have elapsed. Next, a score parked at 90 for 30 bars produces one signal at most.

How much should I rely on this indicator?

Treat it as one input, not a decision. Then, it is a chart analysis tool, not trading advice. Test it on your own markets and timeframes before relying on it. Results are not guaranteed; past performance is not indicative of future results.

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

Leave a Comment