OPEN-SOURCE SCRIPT
Smart Money Flow Signals [QuantAlgo + Raph]

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
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
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。