Indicator · Pine Script v6 · Own pane

Institutional View: CMF & SuperTrend

by dcaoyuan

This indicator combines Chaikin Money Flow (CMF), a SuperTrend baseline, and an Average True Range (ATR) calculation inside a separate sub-pane.

View on GitHub

GitHub stars55on the repository
Pine versionv6current
Lines of code22
Settings0inputs
LicenceApache-2.0
Last update6 months ago20 Apr 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

22 lines of Pine Script v6 from public/indicators/cmf.pine, published under Apache-2.0. Keep the author's credit and licence lines when you reuse it.

cmf.pine
//@version=6
indicator("Institutional View: CMF & SuperTrend", overlay=false)

// --- 1. SuperTrend (Overlay logic but plotted separately for clarity here) ---
[supertrend, direction] = ta.supertrend(3.0, 10)
plot(close, title="Price", color=color.gray, linewidth=1, display=display.none) // Hidden price for scale
plot(supertrend, title="SuperTrend Level", color=direction == 1 ? color.red : color.green, linewidth=2)

// --- 2. Chaikin Money Flow (CMF) ---
cmf_len = 20
ad = close==high and close==low or high==low ? 0 : ((2*close-low-high)/(high-low))*volume
mf = math.sum(ad, cmf_len) / math.sum(volume, cmf_len)
plot(mf, color=#43A047, title="CMF", linewidth=2)
hline(0, color=color.black, linestyle=hline.style_dashed)

// Color CMF columns
plot(mf, style=plot.style_columns, color=mf >= 0 ? color.new(color.green, 70) : color.new(color.red, 70))

// --- 3. ATR (Volatility) ---
atr_len = 14
atr = ta.atr(atr_len)
plot(atr * 10, color=color.purple, title="ATR (x10 for visibility)", linewidth=1) // Scaled up to fit pane

Overview

Institutional View: CMF & SuperTrend calculates a standard 20-period CMF plotted as a line and colored histogram columns around a zero baseline, tracks a 10-period SuperTrend with a multiplier of 3.0 colored by trend direction, and displays a 14-period ATR scaled tenfold for volatility reference. All settings use hardcoded values without external user inputs. Because price-scale metrics and oscillator values share the same sub-pane, visual scaling can be distorted.

Details

Published by

dcaoyuan on GitHub

Type

Indicator, Pine Script v6

Draws

Separate pane below the chart

Category

Trend, Volume, Volatility & bands

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

aicharttradingvibepinescripttechnical-analysispinestock

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.

Similar Pine Scripts

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

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Trend Following Setup - Sideways Market Skipper
6 stars

Capital41 Fusion Oscillator v3 measures multi-condition market confluence in a separate pane with a smoothed composite score ranging from 0 to 100. It evaluates four criteria: EMA trend direction, RSI oversold or overbought turns, Williams %R thresholds, and A

Indicator v6 Oscillators & momentumTrend
Updated 8 weeks ago · MIT GitHub repository of Capital41 Fusion Oscillator v3
4 stars

The Fakeout Filter indicator calculates a four-layer signal quality score ranging from 0 to 4 to evaluate trade setups. It assesses four conditions: volume expansion above a moving average multiple, alignment with a higher timeframe EMA trend, price move excee

Indicator v6 TrendVolume Repaints
Updated 2 months ago · MIT GitHub repository of Fakeout Filter [trugurpala]
4 stars

Meridian - Futures Context is an intraday analysis indicator designed for US index futures. It measures volume participation using relative volume, calculates rolling realized volatility, and evaluates trend context through VWAP slope and EMA structures. Displ

Indicator v6 VolumeVolatility & bands
Updated 7 weeks ago · MPL-2.0 GitHub repository of Meridian - Futures Context
3 stars

The Directional Flow Oscillator combines momentum, cumulative volume delta, price range position, trend ratio, and relative volatility into a single bounded composite indicator. It fetches lower-timeframe volume data to calculate cumulative volume delta and no

Indicator v5 Oscillators & momentumVolume
Updated 2 years ago · GPL-3.0 GitHub repository of Directional Flow Oscillator

Faith JL

by g-moe
3 stars

This indicator evaluates market sentiment and momentum using Aroon crossovers, intra-bar buy and sell volume estimation, and an ATR-based calculation. It generates modular buy and sell conditions filtered by volume thresholds, percentage bands, and Aroon signa

Indicator v5 VolumeTrend
Updated 5 months ago · None stated GitHub repository of Faith JL

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers