The author states:
The Omni-Flow Consensus [LuxAlgo] indicator is a high-performance momentum and liquidity oscillator designed to visualize the directional pressure behind price movements through volume-weighted aggression and adaptive smoothing. It provides a comprehensive view of market regimes, identifying high-conviction capital injections while filtering out low-probability market noise.
USAGE
The indicator is designed to be used as a primary trend-confirmation tool. Unlike standard oscillators that only track price, Omni-Flow incorporates volume and candle body relativity to determine if a move has "weight" behind it.
Momentum Regimes
Impulse Injections
The indicator plots small diamond shapes within the oscillator pane. These represent "Flow Injections"βmoments where momentum has been confirmed by the Signal Strictness logic and has broken out of the neutral threshold. These are high-probability entry or trend-continuation points.
Gradient Candle Coloring
The script features a cinematic gradient coloring system for price bars. Instead of binary "Up/Down" colors, the candles transition smoothly between Bullish, Neutral, and Bearish states based on the flow intensity. This allows traders to visually "feel" the momentum fading or building before a crossover actually occurs.
HOW TO USE
Traders can utilize the Omni-Flow Consensus to filter entries and manage trend expectations:
I use it for 5 minute time frame on NQ.
Recommended settings
input flowLen = 16;
input spectralLen = 7;
input boostVal = 1.3;
input smoothSignals = yes;
input strictness = 5;
input momThresh = 22.0;
https://www.tradingview.com/script/3ONFG3bJ-Omni-Flow-Consensus-LuxAlgo/Original TY Link also attached.
The Omni-Flow Consensus [LuxAlgo] indicator is a high-performance momentum and liquidity oscillator designed to visualize the directional pressure behind price movements through volume-weighted aggression and adaptive smoothing. It provides a comprehensive view of market regimes, identifying high-conviction capital injections while filtering out low-probability market noise.
The indicator is designed to be used as a primary trend-confirmation tool. Unlike standard oscillators that only track price, Omni-Flow incorporates volume and candle body relativity to determine if a move has "weight" behind it.
- Bullish Flow (Cyan): Occurs when the main flow line is above zero and expanding toward the upper bands. This indicates aggressive buying pressure.
- Bearish Flow (Red): Occurs when the main flow line is below zero and expanding toward the lower bands. This indicates aggressive selling pressure.
- Accumulation/Neutral (Gray): When the flow line stays within the "Zero Zone" (Β±10), the market is in a contraction phase. Users should exercise caution as this is often a "no-trade" zone.
The indicator plots small diamond shapes within the oscillator pane. These represent "Flow Injections"βmoments where momentum has been confirmed by the Signal Strictness logic and has broken out of the neutral threshold. These are high-probability entry or trend-continuation points.
The script features a cinematic gradient coloring system for price bars. Instead of binary "Up/Down" colors, the candles transition smoothly between Bullish, Neutral, and Bearish states based on the flow intensity. This allows traders to visually "feel" the momentum fading or building before a crossover actually occurs.
Traders can utilize the Omni-Flow Consensus to filter entries and manage trend expectations:
- Trend Confirmation: Look for the main flow line to cross the Zero Axis. A cross above zero suggests a shift toward bullish dominance, while a cross below suggests bearish dominance.
- Identifying Injections: Pay attention to the Diamond symbols. These appear when the flow line crosses its signal line and maintains its direction for a set number of bars (defined by Strictness). These are often the start of volatile "expansion" phases.
- Volatility Monitoring: When the flow line remains flat near the zero line and the dashboard displays "ACCUMULATION," it indicates a lack of directional conviction. Traders may use this as a signal to avoid trend-following strategies until an injection occurs.
- Exhaustion Signals: When the flow line enters the glow bands (Β±70 to Β±90), the market is in an extreme state. While trends can persist here, a crossover of the signal line within these bands often precedes a mean reversion or deep pullback.
I use it for 5 minute time frame on NQ.
Recommended settings
input flowLen = 16;
input spectralLen = 7;
input boostVal = 1.3;
input smoothSignals = yes;
input strictness = 5;
input momThresh = 22.0;
https://www.tradingview.com/script/3ONFG3bJ-Omni-Flow-Consensus-LuxAlgo/Original TY Link also attached.
Code:
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# β OMNI-FLOW CONSENSUS β ThinkScript Conversion β
# β Original Pine Script v6 by LuxAlgo β
# β CC BY-NC-SA 4.0 β
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
declare lower;
# βββ Inputs ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
input flowLen = 24; # Flow Sensitivity
input spectralLen = 10; # Spectral Smoothing
input boostVal = 1.5; # Signal Boost (1.0 β 5.0)
input smoothSignals = yes; # Smooth Signals (Reduce Noise)
input strictness = 3; # Signal Strictness (1 β 10)
input momThresh = 15.0; # Momentum Threshold (0 β 50)
input colorCandles = yes; # Gradient Candle Coloring
input showLabels = yes; # Display Flow Dashboard
# Color Settings
DefineGlobalColor("Bull", Color.GREEN);
DefineGlobalColor("Bear", Color.RED);
DefineGlobalColor("Neutral", Color.GRAY);
DefineGlobalColor("BullGlow", Color.CYAN);
DefineGlobalColor("BearGlow", Color.MAGENTA);
# βββ Smart Volume & Flow Pressure Index ββββββββββββββββββββββββββββββββββββββ
def smart_vol = if !IsNaN(volume) and volume > 0
then volume
else TrueRange(high, close, low);
def vol_pressure = (close - open) / Max(high - low, TickSize()) * smart_vol;
def fpi_raw = Average(vol_pressure, flowLen);
def fpi_high = Highest(fpi_raw, flowLen * 2);
def fpi_low = Lowest(fpi_raw, flowLen * 2);
def fpi_range = Max(fpi_high - fpi_low, TickSize());
def fpi_norm = ((fpi_raw - fpi_low) / fpi_range * 200) - 100;
# βββ Signal Boost βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# ThinkScript has no Sign() function β replicate manually
def sign_fpi = if fpi_norm > 0 then 1 else if fpi_norm < 0 then -1 else 0;
def boostFlow = sign_fpi * Power(AbsValue(fpi_norm) / 100, 1 / boostVal) * 100;
# βββ Adaptive Smoothing Function (ASF) βββββββββββββββββββββββββββββββββββββββ
# Replicates Pine's asf() β an adaptive EMA whose alpha scales with momentum
# relative to ATR, capped at 1.0
def asfAlpha = 2.0 / (spectralLen + 1);
def asfATR = Average(TrueRange(high, close, low), spectralLen);
def adaptAlpha = Min(1.0,
asfAlpha * (AbsValue(boostFlow - boostFlow[1]) /
(asfATR + TickSize())));
# Recursive self-referencing (same semantics as Pine's := assignment)
def flowMain = if IsNaN(flowMain[1])
then boostFlow
else flowMain[1] + adaptAlpha * (boostFlow - flowMain[1]);
def flowSig = ExpAverage(flowMain, 5);
# βββ Regime Detection βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
def isBull = flowMain > 0;
def isTrending = AbsValue(flowMain) > 50;
# βββ Signal Logic βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
def crossUp = if flowMain crosses above flowSig then 1 else 0;
def crossDn = if flowMain crosses below flowSig then 1 else 0;
# Use Sum() to check if a cross occurred within the last `strictness` bars
# more stable than BarsSince() in ThinkScript
def bullConfirm = if Sum(crossUp, strictness) > 0 and flowMain > flowSig
then 1 else 0;
def bearConfirm = if Sum(crossDn, strictness) > 0 and flowMain < flowSig
then 1 else 0;
# Count consecutive bars of confirmation using a recursive counter
def bullConsec = if bullConfirm then bullConsec[1] + 1 else 0;
def bearConsec = if bearConfirm then bearConsec[1] + 1 else 0;
def impulseBull = if smoothSignals
then bullConsec == strictness and flowMain > momThresh
else crossUp and isBull;
def impulseBear = if smoothSignals
then bearConsec == strictness and flowMain < -momThresh
else crossDn and isBull == 0;
# βββ Zero Zone ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
plot ZeroAxis = 0;
ZeroAxis.SetDefaultColor(Color.GRAY);
ZeroAxis.SetLineWeight(2);
ZeroAxis.SetStyle(Curve.FIRM);
plot ZoneTop = 10;
ZoneTop.Hide();
plot ZoneBot = -10;
ZoneBot.Hide();
AddCloud(ZoneTop, ZoneBot, Color.LIGHT_GRAY, Color.LIGHT_GRAY);
# βββ Overbought / Oversold Reference Lines ββββββββββββββββββββββββββββββββββββ
plot OB_Inner = 70;
OB_Inner.SetDefaultColor(Color.DARK_GRAY);
OB_Inner.SetStyle(Curve.SHORT_DASH);
OB_Inner.SetLineWeight(1);
plot OB_Outer = 90;
OB_Outer.SetDefaultColor(Color.DARK_GRAY);
OB_Outer.SetStyle(Curve.SHORT_DASH);
OB_Outer.SetLineWeight(1);
plot OS_Inner = -70;
OS_Inner.SetDefaultColor(Color.DARK_GRAY);
OS_Inner.SetStyle(Curve.SHORT_DASH);
OS_Inner.SetLineWeight(1);
plot OS_Outer = -90;
OS_Outer.SetDefaultColor(Color.DARK_GRAY);
OS_Outer.SetStyle(Curve.SHORT_DASH);
OS_Outer.SetLineWeight(1);
# βββ Main Flow & Signal Lines βββββββββββββββββββββββββββββββββββββββββββββββββ
plot FlowMainPlot = flowMain;
FlowMainPlot.SetLineWeight(4);
FlowMainPlot.AssignValueColor(
if !isTrending then GlobalColor("Neutral")
else if isBull then GlobalColor("Bull")
else GlobalColor("Bear")
);
plot SignalLinePlot = flowSig;
SignalLinePlot.SetLineWeight(1);
SignalLinePlot.AssignValueColor(
if !isTrending then GlobalColor("Neutral")
else if isBull then GlobalColor("Bull")
else GlobalColor("Bear")
);
# Momentum fill between FlowMain and SignalLine
# Bull fill when flowMain > flowSig, bear fill when below
AddCloud(FlowMainPlot, SignalLinePlot,
GlobalColor("BullGlow"),
GlobalColor("BearGlow")
);
# βββ Impulse Signal Markers βββββββββββββββββββββββββββββββββββββββββββββββββββ
# Pine uses diamond glyphs at price; closest ThinkScript equivalent is arrows
plot BullImpulse = if impulseBull then flowMain else Double.NaN;
BullImpulse.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
BullImpulse.SetDefaultColor(GlobalColor("BullGlow"));
BullImpulse.SetLineWeight(3);
plot BearImpulse = if impulseBear then flowMain else Double.NaN;
BearImpulse.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
BearImpulse.SetDefaultColor(GlobalColor("BearGlow"));
BearImpulse.SetLineWeight(3);
# βββ Candle Coloring ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Note: Pine uses color.from_gradient for a smooth ramp; ThinkScript has no
# direct equivalent, so we apply a flat bull/bear color instead.
AssignPriceColor(
if !colorCandles then Color.CURRENT
else if isBull then GlobalColor("Bull")
else GlobalColor("Bear")
);
# βββ Dashboard Labels βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Pine renders a table; ThinkScript equivalent is AddLabel (top of chart).
AddLabel(showLabels, "OMNI-FLOW CONSENSUS", Color.WHITE);
AddLabel(showLabels,
"Regime: " + (if !isTrending then "ACCUMULATION"
else if isBull then "BULLISH FLOW"
else "BEARISH FLOW"),
if !isTrending then GlobalColor("Neutral")
else if isBull then GlobalColor("BullGlow")
else GlobalColor("BearGlow")
);
AddLabel(showLabels,
"Flow: " + Round(AbsValue(flowMain), 0) + "%",
Color.WHITE
);
AddLabel(showLabels,
"Status: " + (if impulseBull then "BULL INJECT"
else if impulseBear then "BEAR INJECT"
else "NEUTRAL"),
if impulseBull then GlobalColor("BullGlow")
else if impulseBear then GlobalColor("BearGlow")
else Color.WHITE
);
# βββ Alerts βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Alert(impulseBull, "Bullish Flow Injection Confirmed", Alert.BAR, Sound.Ding);
Alert(impulseBear, "Bearish Flow Injection Confirmed", Alert.BAR, Sound.Ding);
Last edited by a moderator: