An indicator that measures the candle spread, optionally as a percentage, and compares it with its own moving average to classify volatility as compression, normal, moderate, high or extreme using adjustable multipliers.
1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
Output can be shown as columns, histogram, line, area, circles or crosses, coloured by threshold, by bull or bear direction, or uniformly. Optional band lines, zone fills, a mean line and bull and bear markers are available, and spread zones can be projected onto the price chart. It draws in a separate pane.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Show Spread as %
bool
true
showPercentage
Normal Multiplier
float
1.1
normalRange
High Volatility Multiplier
float
2.0
highVola
Extreme Volatility Multiplier
float
4.0
extremeVola
Chart Style
string
Columns
chartStyle
Color Mode
string
Threshold
colorMode
Bullish Color
color
color. green
bullColor
Bearish Color
color
color.red
bearColor
Uniform Color
color
color.gray
uniformColor
Compression Color
color
color.blue
colorCompression
Normal Color
color
color.green
colorNormal
Moderate Color
color
color.yellow
colorModerate
Show all 40 settings
Setting
Type
Default
Variable
High Color
color
color. red
colorHigh
Extreme Color
color
color.fuchsia
colorExtreme
Extreme Band
bool
true
showExtremeBand
Normal Band
bool
true
showNormalBand
Compression Band
bool
true
showCompressionBand
Band Transparency
int
70
bandTransparency
Band Line Width
int
1
bandLineWidth
Show Zone Fills
bool
false
showZoneFills
Show Mean Line
bool
true
showMeanLine
Color
color
color.black
meanColor
Width
int
2
meanLinewidth
Marker Width
int
2
markerWidth
Max Markers (Performance)
int
100
maxMarkers
Show Bull/Bear Marker
bool
true
showBullBearMarker
Bearish Color
color
color.red
bearMarkerColor
Marker Offset Below Zero
float
0.05
markerOffset
Show Spread Zones on Price Chart
bool
true
showSpreadZones
Confirm Hits on Bar Close Only
bool
true
confirmOnClose
Show Compression Zones
bool
true
showCompressionZones
Active: Compression
color
color.new(color.blue, 82)
compressionZoneColor
Show High Spread Zones
bool
true
showHighZones
Filled: High Spread
color
color. new(color.red, 92)
highZoneFilledColor
Show Extreme Spread Zones
bool
true
showExtremeZones
Active: Extreme Spread
color
color.new(color.fuchsia, 82)
extremeZoneColor
Filled: Extreme Spread
color
color. new(color.fuchsia, 92)
extremeZoneFilledColor
Zone Border Color
color
color. white
zoneBorderColor
Zone Border Width
int
1
zoneBorderWidth
Enable Housekeeping (Remove Old Filled Zones)
bool
false
useHousekeeping
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This indicator calculates the distribution of close-to-close percentage changes using rate of change on closing prices. It bins percentage changes into intervals of 0.25 percent increments from negative to positive values and plots a normalized cumulative hist
This indicator plots a Supertrend-based trend-following setup in a separate pane and skips conditions it treats as a sideways market. A volatility range is built from an ATR value, with RMA, SMA, EMA, or WMA smoothing, or from a fixed point distance. Optional
This indicator plots candle range and open-to-close movement as percentages in a separate pane. Range is the high-low difference divided by the low, and change is the close-open difference divided by the open. Both series draw as columns. Teal columns show ran
The Mojito v3 Strategy indicator evaluates volatility term structure by calculating the ratio between front-month and second-month VIX futures contracts. It smooths this ratio using a configurable median filter and compares the result against user-defined uppe
Calculates dynamic modeling values by applying a mathematical logistic differential equation to price change over a specified lookback length. It measures price momentum relative to the recent high-low price range. The script plots positive and negative logist
MACD-V is a volatility-normalized momentum indicator based on research by Alex Spiroglou. It calculates the standard MACD histogram and normalizes it by dividing by the Average True Range (ATR). Plotted in a separate pane as a colored histogram, it includes us