OPEN-SOURCE SCRIPT
Confluence Flow Oscillator

Confluence Flow Oscillator
Confluence Flow Oscillator is an educational momentum, pressure, and volume-flow indicator designed to help traders evaluate whether current market movement is supported by directional pressure, bar-close behavior, and volume-weighted participation.
This script is an indicator, not a trading strategy. It does not place trades, does not simulate orders, and does not provide backtested performance results. Any signal markers are optional and disabled by default. The indicator should be used as a research and decision-support tool, not as financial advice or an automatic trading system.
What the script measures
The indicator creates a composite oscillator called Flow Score. The Flow Score is calculated from three separate components:
1. Close Location Value / CLV
CLV measures where the candle closes within its own high-low range.
When the close is near the high of the candle, CLV is positive.
When the close is near the low of the candle, CLV is negative.
When the close is near the middle of the candle, CLV is closer to neutral.
This helps measure intrabar buying or selling pressure.
2. RSI Distance From 50
The script uses RSI as a momentum component, but instead of displaying the standard RSI scale, it re-centers RSI around a zero line.
RSI values above 50 contribute positively to the Flow Score.
RSI values below 50 contribute negatively to the Flow Score.
This allows RSI momentum to be blended into a zero-centered oscillator.
3. Chaikin Money Flow / CMF
CMF measures volume-weighted accumulation or distribution over the selected lookback period.
Positive CMF values suggest that volume is more associated with buying pressure.
Negative CMF values suggest that volume is more associated with selling pressure.
The script scales CMF so it can be blended with the other oscillator components.
How the Flow Score is calculated
The Flow Score is a weighted blend of:
- Smoothed CLV × 100.
- RSI distance from 50.
- CMF × 100.
Users can adjust the weight of each component. For example, increasing the CMF weight gives more influence to volume-based flow. Setting a component weight to zero removes that component from the composite calculation.
The final result is plotted as a zero-centered oscillator:
- Positive values suggest bullish pressure.
- Negative values suggest bearish pressure.
- Readings above the bullish threshold suggest stronger upside flow.
- Readings below the bearish threshold suggest stronger downside flow.
Originality and usefulness
This indicator is designed as a confluence-based flow oscillator rather than a simple single-input momentum tool.
The purpose of combining CLV, RSI distance, and CMF is to evaluate three different aspects of market behavior in one normalized view:
- CLV shows where candles close within their own range.
- RSI distance from 50 shows directional momentum relative to a neutral momentum level.
- CMF shows whether volume is supporting accumulation or distribution.
The script also includes optional confirmation filters so that signals are not based only on a threshold cross. These filters can require volume conviction, recent pivot structure, and exhaustion protection before a signal marker is allowed.
This makes the indicator useful for traders who want to study whether directional movement is supported by price location, momentum, and volume flow together.
Signal logic
The script can optionally display signal markers, but they are disabled by default.
A bullish signal can occur when the Flow Score crosses above the bullish threshold and the selected confirmation filters are satisfied.
A bearish signal can occur when the Flow Score crosses below the bearish threshold and the selected confirmation filters are satisfied.
A long-exit marker can occur when the Flow Score crosses below the bearish threshold while the script’s internal long-state is active.
These markers are informational only. They are not guaranteed entries or exits, and they should not be used without additional analysis, risk management, and testing.
Confirmation filters
The script includes several optional filters:
1. Volume Conviction Filter
When enabled, the signal requires current volume to be at or above a selected percentile of recent volume. This is intended to reduce signals that occur during low-participation conditions.
2. Pivot Structure Filter
When enabled, bullish signals require a recent confirmed pivot low, and bearish signals require a recent confirmed pivot high. This helps connect oscillator signals to recent market structure.
Because pivot confirmation requires bars to close after the pivot point, pivot-based logic can appear with delay. This is a normal characteristic of confirmed pivot calculations.
3. Exhaustion Guards
When enabled, the script attempts to avoid buying into overbought conditions and avoid selling into oversold conditions.
The exhaustion guard can block bullish signals when RSI is already above the selected overbought block level, and it can block bearish signals when RSI is already below the selected oversold block level.
It also checks whether an opposite-side flow regime existed recently before allowing a new signal. This helps reduce signals that occur after an extended one-sided move without prior regime context.
How to use it
A practical workflow is:
1. Use the zero line to identify whether flow is generally bullish or bearish.
2. Use the bullish and bearish threshold lines to identify stronger flow conditions.
3. Review whether the Flow Score is rising, falling, or flattening.
4. Enable optional signal markers only if you want visual threshold-cross markers.
5. Use the volume, pivot, and exhaustion filters to make signals more selective.
6. Confirm any setup with your own market structure, trend context, support/resistance, higher timeframe analysis, and risk rules.
Main settings
Core Periods
- RSI Length: controls the RSI momentum lookback.
- CMF Length: controls the Chaikin Money Flow lookback.
- CLV Smoothing: smooths the Close Location Value component.
Component Weights
- CLV Weight: controls the influence of candle close-location pressure.
- RSI Distance Weight: controls the influence of RSI momentum.
- CMF Weight: controls the influence of volume-weighted money flow.
Signal Logic
- Long Entry Threshold: bullish Flow Score threshold.
- Short/Exit Threshold: bearish Flow Score threshold.
- Show Short Signals: enables bearish short markers. Disabled by default.
Volume Conviction
- Require Volume Conviction: requires above-percentile volume before signals are shown.
- Volume Percentile: sets the required volume percentile.
- Volume Window: sets the lookback used for volume percentile calculation.
Pivot Structure
- Require Recent Pivot: requires recent pivot confirmation before signals.
- Pivot Left Bars: controls the left-side pivot confirmation.
- Pivot Right Bars: controls the right-side pivot confirmation.
- Max Pivot Age: controls how recent a pivot must be to qualify.
Exhaustion Guards
- Use Exhaustion Guards: enables overbought/oversold and regime-context filters.
- RSI Oversold Block: blocks bearish signals when RSI is too low.
- RSI Overbought Block: blocks bullish signals when RSI is too high.
- Regime Confirmation Window: checks whether a prior opposite-side flow regime existed.
Visuals
- Shade Bullish/Bearish Zones: shades the oscillator area above or below zero.
- Show Threshold Lines: displays bullish and bearish threshold lines.
- Show Buy/Sell Signal Markers: enables optional signal markers in the oscillator pane.
- Plot Signal Arrows on Price: displays optional markers on the main price chart when signal markers are enabled.
Alerts
The script includes alert conditions for:
- Bullish Signal.
- Bearish Signal.
- Long Exit.
Alerts only trigger when signal markers are enabled. They are intended as informational alerts, not automated trading instructions.
Important limitations
This indicator does not predict future price movement.
A positive Flow Score does not guarantee price will continue upward.
A negative Flow Score does not guarantee price will continue downward.
A bullish or bearish marker does not guarantee a profitable trade.
The Flow Score can behave differently across symbols, timeframes, sessions, and market conditions. Volume-based components may be less reliable on instruments where volume data is limited, synthetic, or inconsistent.
Users should test the indicator across multiple symbols and timeframes before relying on it in any decision-making process.
Recommended use
Confluence Flow Oscillator is used as a supporting oscillator for studying momentum, candle pressure, and volume participation together. It is designed to complement, not replace, a complete trading plan.
Confluence Flow Oscillator is an educational momentum, pressure, and volume-flow indicator designed to help traders evaluate whether current market movement is supported by directional pressure, bar-close behavior, and volume-weighted participation.
This script is an indicator, not a trading strategy. It does not place trades, does not simulate orders, and does not provide backtested performance results. Any signal markers are optional and disabled by default. The indicator should be used as a research and decision-support tool, not as financial advice or an automatic trading system.
What the script measures
The indicator creates a composite oscillator called Flow Score. The Flow Score is calculated from three separate components:
1. Close Location Value / CLV
CLV measures where the candle closes within its own high-low range.
When the close is near the high of the candle, CLV is positive.
When the close is near the low of the candle, CLV is negative.
When the close is near the middle of the candle, CLV is closer to neutral.
This helps measure intrabar buying or selling pressure.
2. RSI Distance From 50
The script uses RSI as a momentum component, but instead of displaying the standard RSI scale, it re-centers RSI around a zero line.
RSI values above 50 contribute positively to the Flow Score.
RSI values below 50 contribute negatively to the Flow Score.
This allows RSI momentum to be blended into a zero-centered oscillator.
3. Chaikin Money Flow / CMF
CMF measures volume-weighted accumulation or distribution over the selected lookback period.
Positive CMF values suggest that volume is more associated with buying pressure.
Negative CMF values suggest that volume is more associated with selling pressure.
The script scales CMF so it can be blended with the other oscillator components.
How the Flow Score is calculated
The Flow Score is a weighted blend of:
- Smoothed CLV × 100.
- RSI distance from 50.
- CMF × 100.
Users can adjust the weight of each component. For example, increasing the CMF weight gives more influence to volume-based flow. Setting a component weight to zero removes that component from the composite calculation.
The final result is plotted as a zero-centered oscillator:
- Positive values suggest bullish pressure.
- Negative values suggest bearish pressure.
- Readings above the bullish threshold suggest stronger upside flow.
- Readings below the bearish threshold suggest stronger downside flow.
Originality and usefulness
This indicator is designed as a confluence-based flow oscillator rather than a simple single-input momentum tool.
The purpose of combining CLV, RSI distance, and CMF is to evaluate three different aspects of market behavior in one normalized view:
- CLV shows where candles close within their own range.
- RSI distance from 50 shows directional momentum relative to a neutral momentum level.
- CMF shows whether volume is supporting accumulation or distribution.
The script also includes optional confirmation filters so that signals are not based only on a threshold cross. These filters can require volume conviction, recent pivot structure, and exhaustion protection before a signal marker is allowed.
This makes the indicator useful for traders who want to study whether directional movement is supported by price location, momentum, and volume flow together.
Signal logic
The script can optionally display signal markers, but they are disabled by default.
A bullish signal can occur when the Flow Score crosses above the bullish threshold and the selected confirmation filters are satisfied.
A bearish signal can occur when the Flow Score crosses below the bearish threshold and the selected confirmation filters are satisfied.
A long-exit marker can occur when the Flow Score crosses below the bearish threshold while the script’s internal long-state is active.
These markers are informational only. They are not guaranteed entries or exits, and they should not be used without additional analysis, risk management, and testing.
Confirmation filters
The script includes several optional filters:
1. Volume Conviction Filter
When enabled, the signal requires current volume to be at or above a selected percentile of recent volume. This is intended to reduce signals that occur during low-participation conditions.
2. Pivot Structure Filter
When enabled, bullish signals require a recent confirmed pivot low, and bearish signals require a recent confirmed pivot high. This helps connect oscillator signals to recent market structure.
Because pivot confirmation requires bars to close after the pivot point, pivot-based logic can appear with delay. This is a normal characteristic of confirmed pivot calculations.
3. Exhaustion Guards
When enabled, the script attempts to avoid buying into overbought conditions and avoid selling into oversold conditions.
The exhaustion guard can block bullish signals when RSI is already above the selected overbought block level, and it can block bearish signals when RSI is already below the selected oversold block level.
It also checks whether an opposite-side flow regime existed recently before allowing a new signal. This helps reduce signals that occur after an extended one-sided move without prior regime context.
How to use it
A practical workflow is:
1. Use the zero line to identify whether flow is generally bullish or bearish.
2. Use the bullish and bearish threshold lines to identify stronger flow conditions.
3. Review whether the Flow Score is rising, falling, or flattening.
4. Enable optional signal markers only if you want visual threshold-cross markers.
5. Use the volume, pivot, and exhaustion filters to make signals more selective.
6. Confirm any setup with your own market structure, trend context, support/resistance, higher timeframe analysis, and risk rules.
Main settings
Core Periods
- RSI Length: controls the RSI momentum lookback.
- CMF Length: controls the Chaikin Money Flow lookback.
- CLV Smoothing: smooths the Close Location Value component.
Component Weights
- CLV Weight: controls the influence of candle close-location pressure.
- RSI Distance Weight: controls the influence of RSI momentum.
- CMF Weight: controls the influence of volume-weighted money flow.
Signal Logic
- Long Entry Threshold: bullish Flow Score threshold.
- Short/Exit Threshold: bearish Flow Score threshold.
- Show Short Signals: enables bearish short markers. Disabled by default.
Volume Conviction
- Require Volume Conviction: requires above-percentile volume before signals are shown.
- Volume Percentile: sets the required volume percentile.
- Volume Window: sets the lookback used for volume percentile calculation.
Pivot Structure
- Require Recent Pivot: requires recent pivot confirmation before signals.
- Pivot Left Bars: controls the left-side pivot confirmation.
- Pivot Right Bars: controls the right-side pivot confirmation.
- Max Pivot Age: controls how recent a pivot must be to qualify.
Exhaustion Guards
- Use Exhaustion Guards: enables overbought/oversold and regime-context filters.
- RSI Oversold Block: blocks bearish signals when RSI is too low.
- RSI Overbought Block: blocks bullish signals when RSI is too high.
- Regime Confirmation Window: checks whether a prior opposite-side flow regime existed.
Visuals
- Shade Bullish/Bearish Zones: shades the oscillator area above or below zero.
- Show Threshold Lines: displays bullish and bearish threshold lines.
- Show Buy/Sell Signal Markers: enables optional signal markers in the oscillator pane.
- Plot Signal Arrows on Price: displays optional markers on the main price chart when signal markers are enabled.
Alerts
The script includes alert conditions for:
- Bullish Signal.
- Bearish Signal.
- Long Exit.
Alerts only trigger when signal markers are enabled. They are intended as informational alerts, not automated trading instructions.
Important limitations
This indicator does not predict future price movement.
A positive Flow Score does not guarantee price will continue upward.
A negative Flow Score does not guarantee price will continue downward.
A bullish or bearish marker does not guarantee a profitable trade.
The Flow Score can behave differently across symbols, timeframes, sessions, and market conditions. Volume-based components may be less reliable on instruments where volume data is limited, synthetic, or inconsistent.
Users should test the indicator across multiple symbols and timeframes before relying on it in any decision-making process.
Recommended use
Confluence Flow Oscillator is used as a supporting oscillator for studying momentum, candle pressure, and volume participation together. It is designed to complement, not replace, a complete trading plan.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.