Adaptive Flow II | AnonycryptousAdaptive Flow II | Anonycryptous
Description & user manual
Why this indicator is different
Most trend-following indicators use a fixed moving average. A 50-period EMA moves at the same speed whether the market is trending hard or grinding sideways. It cannot distinguish between a clean directional move and noise. It gives the same weight to a volatile consolidation as it does to a strong impulse. The result is signals that arrive late in trends and fire repeatedly during chop.
Adaptive Flow v2 works differently.
At its core is a Kaufman Adaptive Moving Average — a moving average that measures the efficiency of price movement on every single bar and adjusts its own speed accordingly. When price is moving cleanly in one direction with low noise, the flow line accelerates toward price. When price is churning sideways with high volatility and no direction, the flow line nearly stops moving. It adapts. Automatically. Without requiring any manual intervention.
V2 builds significantly on this foundation. It adds five configurable stop modes, full market structure detection through BOS and CHoCH events, three independent signal filters, dynamic extension bands, a session-anchored VWAP, and an expanded dashboard. The result is a complete adaptive trend and structure system — not just a trend indicator, but a context-aware trading framework.
Important notice
Adaptive Flow v2 generates signals based on technical indicator alignment.
These signals are not financial advice.
They do not predict the future.
They do not guarantee profitability.
All trading decisions are made entirely by the user.
Always manage your own risk. Always apply your own judgment.
1. Overview
Adaptive Flow v2 is an adaptive trend-following indicator built around a Kaufman Adaptive Moving Average with a configurable stop engine and full market structure detection.
What it includes:
- Kaufman Adaptive Moving Average rendered as a neon glow line with four stacked plot layers
- Five stop modes: ATR Trailing, Supertrend, Chandelier, Donchian, and Volatility Pivot
- Cloud fill between the flow line and the stop line, reflecting the current trend state
- Dynamic extension bands above and below the flow line at configurable ATR distance
- BOS and CHoCH structure detection with BOS confirmation filter
- Pivot high and low target lines that change color when broken
- EMA 200 macro trend filter with higher timeframe support
- ADX filter for directional environment confirmation
- Session filter to restrict signals to a configurable trading window
- Signal cooldown to prevent repeated triggering
- Session-anchored VWAP with daily and custom session modes
- Bar coloring reflecting the current trend state
- Three presets: default, fast, and smooth
- Live dashboard with 13 data rows
- Seven alert conditions
2. The flow line — Kaufman Adaptive Moving Average
The flow line is the visual heart of Adaptive Flow. On every bar it calculates an Efficiency Ratio — a measure of how directionally efficient price movement is relative to total volatility over the lookback period.
When the Efficiency Ratio is high — price is moving strongly in one direction with low noise — the flow line accelerates toward price. When the Efficiency Ratio is low — price is ranging with high volatility — the flow line nearly stops moving.
This adaptive behavior means the flow line naturally stays close to price during strong trends and pulls away only during genuine transitions. It is not a lagging average that mechanically follows price at a fixed delay. It responds to market character.
The flow line is rendered with four stacked plot layers — a sharp core at full opacity and three progressively wider, more transparent layers behind it — creating a neon glow effect that makes it visually distinct on any chart.
The noise filter adds an additional gate: KAMA only advances when the price displacement exceeds ATR × threshold. This prevents the flow line from reacting to insignificant micro-movements during low-momentum conditions. Disable it for maximum responsiveness in strong trending environments.
3. Stop engine — five modes
The stop engine calculates a dynamic stop level from the flow line. All five modes use the flow line as their reference point, not raw price. This means the stop inherits KAMA's adaptive smoothing before calculating any distance.
When the flow line crosses the stop level, the trend flips and a signal fires.
3.1 ATR Trailing (default)
The stop trails the flow line at a fixed ATR distance using a ratchet mechanism — it only moves in the direction of the trend and locks in the floor or ceiling. This produces the characteristic smooth, flowing wave that follows the flow line closely. The cloud between the flow line and the stop gives a live view of the trend zone width. Default and recommended for most users.
3.2 Supertrend
ATR band above or below the flow line with ratchet mechanism. Similar to ATR Trailing but calculated differently, producing a more angular step-like stop line. More angular appearance, fewer intermediate flips.
3.3 Chandelier
The stop trails the highest or lowest flow line value over a configurable lookback window, then subtracts or adds ATR × multiplier. Exits when the flow line has sustained a reversal beyond the lookback range. Better for trending markets where you want to trail a historical extreme rather than the current level.
3.4 Donchian
The stop follows the highest or lowest flow line value over a rolling window with no ATR component. Purely range-based. The stop level is exactly the rolling high or low of the flow line — clean, simple, no volatility scaling.
3.5 Volatility Pivot
The stop anchors to the last confirmed pivot high or low of the flow line plus an ATR buffer. Structurally aware — the stop sits at a level where the flow line previously reversed, not at an arbitrary distance. Best for traders who want the stop to respect structure rather than trail at a fixed distance.
4. Extension bands
When enabled, two bands are drawn above and below the flow line at ATR × multiplier distance. They are not stop levels — they are extension context. When price reaches the upper band during a bullish trend, it may indicate an overextended condition. When price compresses back toward the flow line after touching a band, it may indicate a pullback area. The bands move with the flow line and adapt to current volatility.
5. Market structure — BOS and CHoCH
Adaptive Flow v2 includes a full market structure detection engine that runs alongside the adaptive trend engine.
Pivot highs and lows are detected on price using configurable left and right bar lookbacks. When price closes beyond a confirmed swing level, the indicator classifies the event as either a Break of Structure or a Change of Character.
A BOS fires when price closes beyond a swing level in the direction of the existing structural trend — confirming continuation. Drawn as a dashed line
A CHoCH fires when price closes beyond a swing level against the existing structural trend — signaling a potential reversal. Drawn as a solid line.
The BOS confirmation requirement prevents false reversals. When set to 1 (default), at least one BOS must confirm the current structural trend before a CHoCH can flip it. This blocks the common false reversal where a sharp pullback briefly closes beyond a swing level before the trend reasserts.
Pivot target lines are drawn automatically at the last confirmed pivot high and low. They extend to the right and change color when price closes through them.
6. Signal filters
Three optional filters are available. All three can be combined. A signal only fires when all active filters agree.
EMA 200 — always active as a macro filter. Bullish signals only fire above the EMA 200. Bearish signals only below. Set the EMA 200 timeframe to a higher timeframe (1H or 4H) when trading on lower timeframes — the native EMA 200 on a 1-minute chart only covers a few hours and provides no meaningful macro context.
ADX filter — when enabled, signals only fire when ADX is at or above the configured threshold. Below this level the market is typically ranging and directional signals carry less weight. Default threshold of 20 removes the weakest trend environments.
Session filter — when enabled, signals only fire during the configured trading window. Defined in HHMM-HHMM format using exchange timezone. Outside the window the flow line continues calculating but no new signals are generated.
Signal cooldown — minimum bars between two signals in the same direction. Prevents repeated triggering during choppy conditions around the stop level.
7. VWAP
The VWAP provides a volume-weighted price reference that resets at the start of each session. It represents the average price paid weighted by volume — a key reference for intraday value and institutional order flow.
Daily mode resets every calendar day. Custom mode anchors to a specific session defined by start and end times in HHMM-HHMM format. Timezone selection ensures correct boundary alignment.
8. Presets
Three preset configurations are available. Selecting a preset overrides the core KAMA calculation parameters.
Default — balanced for swing trading on 4H and daily charts.
Adaptive length 14 | Fast constant 2 | Slow constant 30 | Noise threshold 0.3.
Fast — built for scalping on 1 to 15 minute charts.
Adaptive length 6 | Fast constant 2 | Slow constant 15 | Noise threshold 0.15.
Shorter lookback for faster momentum shift detection. Lower noise threshold preserves full adaptive speed.
Smooth — designed for position trading on daily and weekly charts.
Adaptive length 21 | Fast constant 3 | Slow constant 40 | Noise threshold 0.5.
Extended lookback demands sustained momentum before accelerating. Aggressive noise filtering for high-conviction reads only.
9. Dashboard
The dashboard displays the live state of all indicator components and updates on every bar.
Rows displayed:
- Adaptive Flow — indicator name with trend-colored header and current timeframe
- Trend — current flow line direction: bullish or bearish
- Stop Mode — active stop mode in use
- Structure — current structural direction from BOS/CHoCH logic
- EMA 200 — whether price is above or below the macro filter
- VWAP — whether price is above or below session value
- ADX — current ADX value with confirmation indicator
- Session — whether the session filter is active and the current bar is inside the window
- Noise Filter — whether the noise gate is active
- Stop Distance — distance from current close to stop level in ATR multiples and as a percentage
- Trend Bars — number of bars the current trend has been active
- BOS Count — number of confirmed BOS events in the current structural direction
- Signal — last signal fired: buy, sell, CHoCH, BOS, or none
10. Settings reference
KAMA & Calculation
- Price Source: input for the flow line calculation
- Adaptive Length: efficiency ratio lookback period
- Fast Constant: smoothing speed during trending conditions
- Slow Constant: smoothing speed during ranging conditions
- Enable Noise Filter: toggle the displacement gate
- Noise Threshold: minimum ATR multiple required to advance the flow line
- Preset: Default, Fast, or Smooth
Stop Engine
- Stop Mode: ATR Trailing, Supertrend, Chandelier, Donchian, or Volatility Pivot
- ATR Length: volatility measurement period
- ATR Multiplier: distance scaling for the stop level
- Stop Lookback: rolling window for Chandelier and Donchian modes
- Pivot Buffer: ATR buffer for Volatility Pivot mode
Market Structure
- Show BOS / CHoCH: toggle structure detection
- Pivot Left / Right Bars: swing confirmation lookback
- Max Structure Levels: maximum lines shown on chart
- BOS Required Before CHoCH Flip: false reversal filter
- Show Pivot Target Lines: toggle automatic target lines
- Target Line Color and Width
Signal Filters
- EMA 200 Timeframe: leave empty for chart timeframe
- Show EMA 200: toggle line and label visibility
- EMA 200 Color
- Enable ADX Filter: toggle directional environment gate
- ADX Length and Threshold
- Enable Session Filter: toggle session-based signal restriction
- Session Window: HHMM-HHMM format
- Signal Cooldown: bars between signals
VWAP
- Session: Daily or Custom
- Timezone: UTC, Exchange, or major financial center timezone
- Session Window: for Custom mode
- Show VWAP: toggle line and label
- VWAP Color
Visuals
- Bull Color and Bear Color
- Cloud Transparency: fill between flow line and stop
- Show Extension Bands: toggle ATR extension bands
- Extension Band Multiplier: distance from flow line
- Show Reversal Signals: toggle triangle markers
- Color Candles: toggle bar coloring
- Candle Transparency
Dashboard
- Show Dashboard
- Size: Tiny, Small, or Normal
- Position: Top Left, Top Right, Bottom Left, or Bottom Right
11. How to use
11.1 Initial setup
Select a preset matching your primary trading style. Set the EMA 200 timeframe to a higher timeframe when trading on lower timeframes — 60 for 1H, 240 for 4H. Set the VWAP to Daily or configure a custom session matching your primary market. Choose a stop mode — ATR Trailing is the default and works well across all timeframes. Enable the session filter and ADX filter if you want stricter signal conditions.
11.2 Reading the chart
The flow line and its glow indicate the current adaptive trend. Green indicates a bullish environment. Red indicates a bearish environment. The cloud between the flow line and the stop shows the trend zone width — a wide cloud indicates strong momentum, a narrowing cloud indicates the flow line is slowing.
The stop line is where the trend flips. A reversal signal fires when the flow line crosses it. Triangle markers appear at the stop line at the signal bar.
Extension bands show how far price has moved from adaptive value. Price at the upper band in a bullish trend may indicate overextension. Price returning toward the flow line after touching a band may offer a pullback reference.
BOS and CHoCH lines show structural context. Use them to understand whether the trend is in a confirmation phase (BOS firing repeatedly) or approaching a potential reversal (flow line slowing while price approaches a structural level).
11.3 Timeframe guide
1 to 5 minutes — Fast preset. EMA 200 timeframe set to 60 or 240. Session filter recommended.
15 to 30 minutes — Fast or Default preset. EMA 200 timeframe 240 or D.
1 hour to 4 hours — Default preset. Native EMA 200 or D timeframe.
Daily and above — Smooth preset. Native EMA 200.
11.4 Stop mode selection guide
ATR Trailing — best for most situations. Smooth, flowing, closely follows the flow line.
Supertrend — fewer flips, more angular. Good for lower timeframe noise reduction.
Chandelier — suited for trending markets where you want to trail a recent high or low.
Donchian — clean range-based stop with no ATR influence. Simple and transparent.
Volatility Pivot — best when you want the stop at a structurally meaningful KAMA level.
11.5 Context
Adaptive Flow v2 identifies adaptive trend direction and market structure. It does not filter by fundamental events, news, or macro calendar. A bullish signal during a risk-off macro event may fail more often than one in a clear trending environment. Always apply your own context and judgment alongside the indicator output.
12. Alerts
Seven alert conditions are available:
- Bull Trend: flow line crosses above the stop level, EMA 200 above, all active filters passed.
- Bear Trend: flow line crosses below the stop level, EMA 200 below, all active filters passed.
- Any Trend Change: fires on either bull or bear trend signal.
- Bull CHoCH: market structure flips to bullish via Change of Character.
- Bear CHoCH: market structure flips to bearish via Change of Character.
- Bull BOS: bullish Break of Structure confirms trend continuation.
- Bear BOS: bearish Break of Structure confirms trend continuation.
All alerts include exchange, ticker, and interval in the message.
13. Disclaimer
This indicator is provided for educational and informational purposes only.
All outputs are based on historical price action calculations and do not guarantee future results.
Trading financial instruments involves significant risk of loss.
Past performance does not indicate future results.
Use at your own discretion.
อินดิเคเตอร์ Pine Script®






















