OPEN-SOURCE SCRIPT

Smart Money Flow Signals [QuantAlgo + Raph]

796
Modification of the Smart Money Flow Signals - QuantAlgo

Add-on - Not 100% accurate
Vertical lines
Blue= Prepare for long position
Green = Long position confirmation
Orange= Prepare for short position
Red = Short position confirmation

Core calculation
It computes several intermediate series: raw money flow, positive/negative money flow, a Money Flow Index (MFI), Chaikin Money Flow, a volume‐weighted momentum channel, and then combines them into a single composite wave that represents institutional or “smart money” buying and selling pressure.

The composite wave is optionally smoothed and plotted around a zero line, with configurable overbought and oversold levels that mark extreme positive or negative money flow conditions.

Visual styling and gradients
The indicator colors the area between the composite wave and the zero line with a dynamic gradient whose intensity depends on wave strength, volume intensity, and alignment between Chaikin Money Flow and the composite wave (stronger, more aligned flows produce a more saturated fill).

Bars on the price chart can be recolored using a gradient between a bullish and bearish color, again based on the current value of the composite wave, to project smart money direction directly onto price action.

Vertical background lines (slope and pivots)
The script analyzes the slope of the composite (or smoothed) wave; when the slope turns from negative to positive or positive to negative, and the change is larger than a user-defined threshold, it paints a semi-transparent green or red vertical background line behind that bar to highlight changes in momentum direction.

It also uses ta.pivothigh() and ta.pivotlow() on the composite wave to detect local swing highs and lows; pivot highs are only treated as “valid peaks” when they are above zero, allowing the script to distinguish positive peaks from other tops.

Confirmed positive peaks are highlighted with vertical orange background lines, while opposite swing lows (troughs) are highlighted with a different color, both shifted back by pivot_right_bars so that the vertical line appears on the actual peak/trough bar where the oscillator turned.

Inputs and presets
A set of inputs lets the user control calculation periods (momentum, trend, MFI, smoothing), overbought/oversold thresholds, color presets for bullish/bearish waves, and whether to show bar coloring and the extra smoothed trend line.

Additional inputs configure the visibility and sensitivity of slope-based background lines (including minimum slope change and colors) and pivot detection parameters (left/right bars for pivot confirmation and colors for positive peaks and troughs).

Alerts and trading use
The script provides alerts for zero-line crossovers (bullish/bearish flow changes), entries into and reversals from overbought/oversold zones, extreme conditions, and both positive peaks and troughs of the oscillator.

Overall, it is intended to visualize where institutional money is accumulating or distributing, mark key inflection points of the flow curve, and give traders structured, color-coded cues for momentum shifts, exhaustion zones, and swing turning points in the smart money wave

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.