Adaptive Source Supertrend (TESSEN)
Most Supertrend implementations do two things by default: use a fixed price source (usually hl2) and a fixed ATR multiplier. Both are decisions, not laws. This version makes them adaptive.
Source selection: on every bar, the script computes Kaufman's Efficiency Ratio — a public-domain formula from Perry Kaufman's KAMA — independently for Open, High, Low, and Close. ER measures how directionally a series has moved over a lookback window (1.0 = clean trend, 0.0 = pure noise). Whichever OHLC series currently has the highest ER becomes the working price source for the moving average and the trailing stop. A hysteresis margin (adjustable) stops it flipping between two near-tied sources on every bar.
Band width: the ATR multiplier isn't fixed either. It scales with a volatility percentile rank — where current ATR sits relative to its own recent range. Bands widen automatically in high-volatility regimes and tighten in low-volatility regimes, instead of using one multiplier for every market condition.
What it deliberately doesn't do: no signals dressed up as certainty, no repainting (all selection and flips evaluate on confirmed bars only), no performance claims. A dynamic source and adaptive bands are a different set of assumptions than the classic version — not a guaranteed improvement. Backtest both on your own instrument before trusting either.
Includes: adjustable MA type on the selected source, BUY/SELL labels and glow fills on trend flips, source-switch markers, and alerts for both trend flips and source switches. インジケーター

Directional PurityDirectional Purity
Rather than a simple standalone strategy, Directional Purity is a professional trend-filtering and directional stability engine designed to supercharge any existing trading strategy. It eliminates the fatal flaw of traditional indicators like ADX—which measure trend strength with significant lag—by equipping your strategy with a zero-lag, mathematically precise gauge of directional purity.
Traditionally, ADX relies on double-smoothed EMAs of directional movements, causing delayed responses to trend breakouts and exhaustion. Directional Purity resolves this by using the mathematical equivalence of Chande's CMO and Kaufman's Efficiency Ratio (ER) as a volatility index to dynamically adapt a 13-period VIDYA (Variable Index Dynamic Average) base.
By utilizing a telescoping sum optimization, this script is fully vectorized (loop-free), ensuring extremely fast execution on any time frame.
Features:
- Live Dashboard: Shows real-time market state (Trending Bullish, Trending Bearish, Ranging) and Trend Purity %.
- Visual Fills: Highlights ranging zones in gray to prevent overtrading.
- Built-in Alerts: Triggers for trend breakouts, entering ranges, and direction shifts.
``` インジケーター

Motion Reversal System [BullByte]Motion Reversal System (MRS) - Trend-Failure Bar Detector with Adaptive Pressure Meter, Multi-Mode Signal Engine, and Complete Trade-Level Framework
---
Why This Indicator Exists
Most reversal indicators fall into one of two failure modes. Either they fire constantly in ranging markets because they have no directional filter, or they only confirm reversals long after price has already turned because they rely on lagging momentum oscillators. Motion Reversal System (MRS) was built to solve both problems in a single coherent engine.
MRS is one engine with one purpose: identify the precise bar at which a confirmed trend structurally fails - the moment commitment fades, the bar itself rejects further advance, and the move's energy reverses. From that bar, MRS automatically frames the trade with entry, two targets, and a stop loss, then manages the full trade lifecycle to closure.
---
What Makes This Not a Mashup
A mashup combines independent indicators that each output their own signal, then layers them visually. MRS is the opposite. Every component of MRS feeds into a single decision: "Is the current bar a trend-failure bar?" Remove any one component and the engine stops working correctly.
- The Directional Gate decides IF a trend is present (no trend = no exhaustion to detect)
- The Four Failure Conditions decide IF the current bar is structurally failing that trend
- The Signal Mode decides HOW STRICT the failure must be
- The Pressure Meter provides a live visual reading of building reversal pressure
- The Trade Level Engine decides WHERE to enter, stop, and target
- The HTF Filter decides WHETHER higher-timeframe context confirms the call
These are not independent indicators. They are stages of one detection pipeline. Each stage exists because the next stage cannot function without it.
---
The Engine - How It Actually Works
Stage 1 - Directional Gate (Kaufman Efficiency Ratio, Self-Adapting)
The script computes Kaufman's Efficiency Ratio (ER) over a rolling window. ER measures net price displacement divided by the total path price traveled. Values near 1.0 indicate pure trending motion; values near 0.0 indicate pure noise.
A fixed ER threshold would work well on one instrument and fail on another, so MRS adapts the gate dynamically. The threshold becomes the rolling mean of the ER series plus half a standard deviation, with a user-defined floor. This means the gate raises itself during volatile sessions and lowers during quiet sessions automatically. No re-tuning per instrument.
Only bars that occur inside a confirmed directional move (gate passed + minimum ATR displacement satisfied) are evaluated for failure. This single design choice eliminates the largest source of false signals: exhaustion calls in choppy ranges where there is no trend to exhaust.
Stage 2 - Four Failure Conditions (Evaluated at Bar Close)
For every bar inside a confirmed trend, MRS evaluates four orthogonal failure conditions:
C1 - Velocity Reversal: The bar closed against the direction of the confirmed trend. This is the most basic failure signal. A bull trend bar that closes red, or a bear trend bar that closes green.
C2 - Wick Rejection: The trend-side wick (upper wick in a bull trend, lower wick in a bear trend) is at least N times the size of the bar's body. This measures intra-bar rejection - buyers or sellers pushed price further in the trend direction and were defeated within the same bar.
C3 - Commitment Anomaly: The bar's commitment value (measured via volume-weighted body strength when volume is reliable, or wick-rejection ratio when it is not) is at least N standard deviations below the recent trend's commitment baseline. The current bar is statistically anomalous compared to what the trend has been producing.
C4 - Range Expansion: The bar's true range is at least N times ATR. Filters out small doji bars where wick rejection and velocity reversal become meaningless from microstructure noise.
These four conditions are orthogonal - they measure different physical properties of the bar. C1 measures direction. C2 measures intra-bar struggle. C3 measures volume/commitment. C4 measures magnitude. When multiple conditions align on the same bar, the signal reflects a greater degree of structural confluence - though no combination of conditions guarantees a reversal.
Stage 3 - Signal Mode (Strictness Selector - THE ACTUAL SIGNAL GATE)
This is the decisive gate that determines whether a signal fires. The user chooses how many of the four conditions must align:
Conservative - All 4 conditions required. Rarest signals, highest structural confluence. Best for swing traders, low-noise sessions, or those who prefer fewer signals with stronger multi-condition alignment.
Balanced (default) - Any 3 of 4 conditions required. Middle ground for most users and most timeframes. Allows one condition to be absent if the other three are strong.
Aggressive - Velocity Reversal (C1) is mandatory plus at least one other condition (minimum 2 of 4 total). Most signals, fewer conditions required per signal. Best for scalpers, active intraday traders, or those who prefer earlier detection at the cost of more false positives.
When the chosen condition count is satisfied at bar close, a signal fires. The Pressure Meter (Stage 5) is a separate visual reading and does not gate signals.
Stage 4 - Commitment Measurement (Volume-Aware with Auto Fallback)
Commitment measures how decisively the market voted on each bar. MRS supports three measurement modes:
Auto (recommended) - Uses volume-weighted commitment on instruments with real volume data (crypto, futures, stocks with traded volume). Automatically falls back to wick-rejection ratio on indices and synthetic feeds where reported volume is meaningless. The dashboard surfaces whichever method is actually active.
Volume - Forces volume-weighted measurement. Useful when you want to lock the method explicitly. Silently falls back to wick if data is missing, with a dashboard warning.
Wick - Forces wick-rejection ratio regardless of volume availability. Best for spot Gold (XAUUSD), forex, or any instrument where you don't trust the broker's volume feed.
Stage 5 - Adaptive Pressure Meter (Live Visual Reading)
The pressure meter is the dashboard's live reading of building reversal pressure. It is always populated whenever a trend is confirmed, regardless of whether the four-condition gate has been met. This gives the trader a continuous sense of how strong the reversal pressure has been building.
The meter is normalized against an adaptive baseline calculated from its own rolling history (mean + multiplier x stdev). The dashboard percentage shows where the current meter sits relative to that baseline.
Important: the baseline is a visual reference only. It does not gate signals. The signal authority is the Signal Mode condition count described in Stage 3. The meter and baseline simply help the trader monitor when conditions are increasingly aligned before they actually trigger.
Stage 6 - Higher Timeframe Confirmation (Optional Filter)
When enabled, the engine cross-checks every signal against the directional state of a higher timeframe. A reversal signal on the chart timeframe is marked "Strong" when the higher timeframe direction agrees with the chart trend being reversed against. For example: chart is in a confirmed bull move, HTF is also bullish, and a bear reversal signal fires - this is HTF-Strong, because the HTF confirms the bull trend that is being exhausted.
If the HTF direction disagrees with the chart trend (e.g., chart is in a bull move but HTF is already bearish), the signal is marked "Weak" - visually dimmed but not suppressed. The trader still sees the call but is warned that the HTF backdrop does not align with the underlying chart trend being detected.
The HTF uses request.security with lookahead = barmerge.lookahead_off, eliminating future-data leak across timeframes. The HTF series itself naturally evolves as each HTF candle forms (this is standard Pine behavior), so the script treats HTF as a confirmation filter rather than a guarantee of HTF-bar finalization. The signal trigger itself remains chart-bar-close only.
Stage 7 - Trade Level Engine (Complete Lifecycle)
When a signal fires, the engine automatically computes and draws:
- Entry: signal-bar close
- Stop Loss: fixed ATR distance from entry (not score-scaled - strong signals deserve tighter stops, not wider ones)
- Target 1: intermediate reference level, ATR distance scaled by signal strength (visual only, does not close trade)
- Target 2: decisive level, ATR distance scaled by signal strength (closes the trade on hit)
While the trade is active, four colored horizontal lines extend from the signal bar to the current bar, with monospace pill labels showing the price and R:R for each level. Two zone fills (green Entry to TP2 reward zone, red Entry to SL risk zone) make the risk/reward geometry visible at a glance.
The trade closes when either TP2 or SL is touched at bar close (intra-bar wicks that retreat before close do NOT close the trade). Same-bar TP2/SL tie is resolved as SL hit (conservative backtest assumption).
After closure, the trade-level lines freeze in place as historical record. Labels and fills vanish to keep the chart clean. The cooldown counter starts. By default, all four lines (Entry, SL, TP1, TP2) persist as historical traces for richest backtest visibility. The "Keep TP1/TP2 Historical Lines" input can be turned off to delete TP1/TP2 lines on closure and roughly double the number of historical trades the chart can hold before Pine's 500-line cap is reached.
---
Signal Timing - No Repaint
All signal generation and trade closure is gated to confirmed (closed) bars via barstate.isconfirmed.
- A reversal signal triangle and label appear only at the close of the signal bar
- Entry, SL, TP1, TP2 levels are computed from the signal bar's close
- Trade closure (TP2 / SL hit) is evaluated only after the candle finalizes - intra-bar wicks that retreat before close do not trigger closure
The trade-off is up to one bar of timing on closure for cases where price spikes through a level intra-bar and retraces. The gain is realistic backtest visuals and zero repaint at every stage of the trade lifecycle. This is an intentional architectural choice for honest behavior over flashy intra-bar firing.
---
How to Read the Chart
Signal Markers
Bull Reversal (detected inside a confirmed bear move, reversal up signaled): small cyan triangle below the bar.
Bear Reversal (detected inside a confirmed bull move, reversal down signaled): small red triangle above the bar.
Important: a bearish reversal signal fires inside a confirmed bull move. The signal detects exhaustion of the prevailing trend - not confirmation of a new one. The dashboard will show BULL MOVE while a short is active. This is correct behavior - you are trading the exhaustion of that bull move.
A monospace pill label sits beside each triangle showing the failure score (e.g., "Reversal Up | 2.45"). Higher numbers indicate stronger structural confluence across the four conditions.
When HTF Confirmation is enabled and HTF disagrees with the signal, the triangle and label appear in a dimmed color with "(HTF)" appended to the label text. The signal is still visible but is visually de-emphasized.
Trade Level Lines
Once a signal fires, four horizontal lines appear extending from the signal bar:
- Entry (yellow, solid): the price at which the signal was generated (signal-bar close)
- Target 1 (cyan, dashed): intermediate reference level, visual only
- Target 2 (green, solid): decisive level - trade closes when this is hit at bar close
- Stop Loss (red, solid): risk level - trade closes when this is hit at bar close
Pill labels at the right end of each line show the exact price and R:R distance.
Zone Fills
- Green soft fill between Entry and TP2: the reward zone
- Red soft fill between Entry and SL: the risk zone
At a glance, the green:red ratio visualizes the trade's risk-to-reward geometry.
Directional Background
- Subtle blue tint: a bull trend is confirmed
- Subtle red/orange tint: a bear trend is confirmed
- No tint: no confirmed direction (chop)
Bar Coloring (Exhaustion Gradient)
When the exhaustion meter rises above the trigger threshold (default 50% of baseline), bars are tinted on a gradient:
- Cool color (cyan/red): exhaustion is building but moderate
- Bright color (red on bull trend, cyan on bear trend): exhaustion has reached or exceeded the baseline - conditions for a signal are increasingly met, though no signal fires until the condition count gate is satisfied at bar close
Historical Trade Traces
After a trade closes, by default all four trade-level lines (Entry, SL, TP1, TP2) remain on the chart as a permanent historical record. This builds a visual log of every prior MRS detection directly on the chart. The "Keep TP1/TP2 Historical Lines" input can be turned off if you want to conserve Pine's line-object cap.
---
How to Read the Dashboard (Full Mode)
The dashboard is the live diagnostic panel. Every row tells you something specific about the current state of the engine. From top to bottom:
Row 0 - Title: "MOTION REVERSAL SYSTEM (MRS)" - confirms the indicator name.
Row 1 - Context: ticker symbol, chart timeframe, and active Signal Mode.
Row 2 - Directional State: BULL MOVE / BEAR MOVE / NEUTRAL - large text, colored. Tells you whether a confirmed trend is currently in effect. When a trade is active against the current trend (e.g., short open during a bull move), this row appends "SHORTING EXHAUSTION" or "LONGING EXHAUSTION" so the dashboard reads as a coherent statement rather than an apparent contradiction.
Row 3 - Exhaustion bar: a 10-segment text-based pressure bar with percentage. Shows how close the live meter is to the adaptive baseline. Color escalates from gray to teal to purple to bright red/cyan as pressure builds.
Row 4 - Pressure: numerical value of the live exhaustion meter.
Row 5 - Baseline: the adaptive baseline value (mean + k x stdev) the meter is compared against. Visual reference only - does not gate signals.
Row 6 - Conditions: which of the four failure conditions are currently satisfied. " VEL WICK ANOM RANGE" means C1, C2, C4 are firing; C3 is not.
Row 7 - Count: how many of 4 conditions are firing, with current Signal Mode in parentheses. This is the actual signal authority - when the count satisfies the Signal Mode rule, a signal fires.
Row 8 - Eff Ratio: the current Kaufman Efficiency Ratio value, with the adaptive gate level next to it. Shows whether the directional gate is passing.
Row 9 - ATR: current ATR value at the configured length. Reference for understanding trade-level distances.
Row 10 - HTF Dir: current higher-timeframe directional state, OR "INVALID HTF (set higher than chart)" warning if user has misconfigured the HTF input.
Row 11 - Commit: which commitment measurement method is currently active (Auto -> Volume, Auto -> Wick fallback, etc.), with warning indicator if forced mode silently fell back.
Row 12 - Active Trade Status: "NO ACTIVE TRADE" or "LONG ACTIVE E " / "SHORT ACTIVE E " - color-coded.
Row 13 - Status: "Ready for signal" / "Cooldown: N bars" / "Trade active" - tells you whether the engine can fire a new signal right now.
Row 14 - Session: count of signals fired in the current session (resets daily).
Rows 15 to 19 - Engine Parameters reference: live readouts of the directional window, lookback periods, threshold parameters, ER gate values, and current commitment status. Useful for verifying your settings are applied as expected.
Row 20 - Version and Author footer.
Mobile / Minimal Dashboard Mode
For phone and tablet users, switching "Dashboard Mode" to "Minimal (Mobile)" collapses the dashboard to a single-column 5-row compact layout with larger fonts: Title, State, Exhaustion, Conditions, and Trade Status. Diagnostics are hidden for screen-space efficiency.
---
Default Settings Explained
- Directional Window: 12 bars - measures Efficiency Ratio over a 12-bar lookback
- Directional Threshold (Base): 0.40 - minimum ER for trend confirmation, adapted upward dynamically
- Min Move Size: 1.5 ATR - net displacement must be at least 1.5 ATR for a trend to qualify
- Trend Statistics Lookback: 20 bars - sample size for computing commitment baseline statistics
- Wick Rejection Ratio: 1.5 - trend-side wick must be at least 1.5x the body to count as rejection
- Commitment Anomaly Sigma: 1.0 - current commitment must be at least 1.0 standard deviation below trend mean
- Min Range Expansion: 1.2 ATR - current bar range must be at least 1.2x ATR
- Signal Mode: Balanced - any 3 of 4 conditions required
- Baseline Lookback: 100 bars - rolling history for pressure meter statistics
- Baseline Multiplier: 2.0 - baseline = mean + 2.0 x stdev
- ATR Length: 14 - standard ATR period
- Commitment Mode: Auto - volume on real-volume instruments, wick on indices
- Post-Closure Cooldown: 10 bars - wait 10 bars after trade closure before new signal
- Stop Loss Distance: 1.5 ATR - base SL distance from entry
- Target 1 Distance: 1.5 ATR - T1 at 1:1 with SL
- Target 2 Distance: 3.0 ATR - T2 at 1:2 with SL
- Score-Weight Nudge: 0.3 - stronger signals widen targets by up to 30%
- Min Label Spacing: 0.35 ATR - minimum vertical gap between pill labels for readability
---
Recommended Usage by Trader Profile
Scalper (1m to 5m): Aggressive mode, Cooldown 5 to 8 bars, HTF Confirmation on 15m. Signal frequency will be higher in Aggressive mode; use the dashboard pressure meter to monitor building exhaustion between signals.
Intraday Trader (5m to 30m): Balanced mode (default), Cooldown 10 bars, HTF Confirmation on 1h to 4h. The default settings were designed with this profile in mind as a starting reference point.
Swing Trader (1h to 4h): Conservative mode, Cooldown 15 to 20 bars, HTF Confirmation on Daily. Few signals, maximum condition confluence required.
Position Trader (Daily and above): Conservative mode, HTF Confirmation on Weekly. Signals are rare; when they fire, all four structural failure conditions have aligned on a higher timeframe bar.
---
Recommended Markets
- Crypto (Spot and Perpetuals): well-suited - high volume data availability, clean microstructure, MRS auto-selects volume-weighted commitment
- Index Futures (NQ, ES, NIFTY futures): well-suited - real traded volume available, strong directional character
- FX Majors: usable with Wick commitment mode forced (broker volume is unreliable)
- Spot Gold (XAUUSD): use Wick mode explicitly - most brokers report tick count as volume which is meaningless
- Cash Indices (NIFTY, SPX index): MRS auto-detects index type and routes to Wick mode; verify Commit row on dashboard
---
A Real-World Example Walkthrough
This walkthrough is a constructed illustration of how the engine behaves. It does not represent a historical trade or a performance result.
Scenario: BTCUSDT 15m chart, Balanced mode, Auto commitment.
Bars 1 to 20: Price climbs in a steady bull move. Dashboard shows BULL MOVE, Efficiency Ratio 0.55, Pressure Meter 0.20 (low). No signals fire because exhaustion is not building.
Bar 21: A large green candle prints - Range Expansion (C4) fires but the bar closes strong (no Velocity Reversal C1), and commitment is normal (no C3). Only 1 of 4 conditions. No signal.
Bars 22 to 24: Three smaller green bars with shrinking bodies. The Pressure Meter ticks up to 0.55 (moderate). Bar coloring activates softly. Dashboard "Conditions" row shows - only Wick Rejection is firing intermittently. No signal yet.
Bar 25: A red bar prints with a long upper wick and large range. All four conditions fire:
- C1 Velocity Reversal: bar closed red (against bull trend)
- C2 Wick Rejection: upper wick is 1.8x the body
- C3 Commitment Anomaly: bar's commitment is 1.4 standard deviations below the trend baseline
- C4 Range Expansion: bar range is 1.6x ATR
Dashboard shows "Conditions: VEL WICK ANOM RANGE | Count: 4/4". Pressure Meter reads 1.15.
A red bear reversal triangle prints above the bar with the label "Reversal Down | 3.42". Trade-level lines automatically draw:
- Entry (yellow): 64,210.50 (signal-bar close)
- SL (red): 64,422.00 (1.5 ATR above entry, since this is a short)
- T1 (cyan dashed): 63,999.00 (1.5 ATR x score-scale below entry)
- T2 (green): 63,576.00 (3.0 ATR x score-scale below entry)
Green reward fill appears Entry to T2, red risk fill Entry to SL. Dashboard "Active Trade" row turns red: "SHORT ACTIVE E 64,210.50". Dashboard "Directional State" row reads: "BULL MOVE | SHORTING EXHAUSTION".
Over the next several bars, price drops. The trade-level lines extend bar-by-bar. Dashboard " Status " reads "Trade active". No new signals fire because one trade is already open.
Bar 32: In this example, price reaches T2 at 63,576.00 on this bar's close. The trade closes at the target level. Labels and zone fills vanish. The trade-level lines freeze at bar 32 as historical record. Dashboard "Status" switches to "Cooldown: 10 bars".
Bars 33 to 42: Cooldown period. No new signals possible.
Bar 43: Cooldown complete. Dashboard "Status" reads "Ready for signal". The engine will evaluate the next qualifying bar for failure conditions.
---
Chart Examples
These screenshots show the indicator in use at specific moments in time. They are provided for visual reference only and do not represent performance results or forward-looking outcomes.
1. MRS detected a trend-failure bar inside a confirmed bull move on BTCUSDT 5m. Range expansion (C4) fired as exhaustion pressure reached the adaptive baseline (1.28 vs 1.03). Balanced mode gated the short at bar close - entry 62,553.3, SL 62,681.9, T2 62,273.6 (T2 distance: 2.17R).
2. MRS detected a trend-failure bar at the low of a confirmed bear move on NQ1! 5m. As the engine tracked displacement against path length (ER), exhaustion pressure crossed the adaptive baseline - failure score 0.48. Balanced mode gated the long at bar close - entry 30,553.75, SL 30,489.00, T2 30,706.50 (T2 distance: 2.36R).
---
Parameter Adjustment Guide
If you get too few signals:
- Switch Signal Mode to Aggressive
- Lower Wick Rejection Ratio (1.0 to 1.2)
- Lower Commitment Anomaly Sigma (0.7 to 0.9)
- Lower Min Range Expansion (1.0 to 1.1)
- Reduce Cooldown to 5
If you get too many false signals:
- Switch Signal Mode to Conservative
- Raise Wick Rejection Ratio (2.0 to 2.5)
- Raise Commitment Anomaly Sigma (1.3 to 2.0)
- Raise Min Range Expansion (1.5 to 2.0)
- Enable HTF Confirmation
- Raise Cooldown to 15 to 20
If the T2 zone is reached but price reverses sharply before bar close triggers closure:
- Reduce T2 Distance to 2.0 to 2.5 ATR
- Reduce Score-Weight Nudge to 0.1 (less target widening on strong signals)
If SL is hit too often:
- Increase Stop Loss Distance to 2.0 ATR
- Increase T1 and T2 proportionally to maintain R:R geometry
---
What This Indicator Does Not Do
- It does not execute trades. It is an indicator (overlay), not a strategy. Order placement and trade management decisions remain with the user.
- It does not predict the future. It identifies bars where a confirmed trend has structurally failed based on objective criteria.
- It does not eliminate losses. False signals will occur, especially in news-driven price spikes. Always size positions according to your own risk management rules.
- It does not work on every instrument equally well. Choppy low-liquidity assets produce noisier signals. Test on your specific market before relying on it.
- It does not replace discretionary judgment. Use MRS as one input in your decision process, not the only input.
---
Alerts Available
MRS Bull Reversal (Strong) - bullish reversal signal; HTF confirms the preceding bear trend
MRS Bull Reversal (HTF Weak) - bullish reversal signal; HTF does not confirm the preceding bear trend
MRS Bear Reversal (Strong) - bearish reversal signal; HTF confirms the preceding bull trend
MRS Bear Reversal (HTF Weak) - bearish reversal signal; HTF does not confirm the preceding bull trend
MRS Target 2 Hit - trade closure at T2 level
MRS Stop Loss Hit - trade closure at SL level
---
Disclaimer
This script is provided for educational and analytical purposes only. It is not financial advice, an investment recommendation, or a solicitation to trade. Past performance of any indicator or strategy does not guarantee future results. Trading involves substantial risk of loss. The author and TradingView are not liable for any losses or damages arising from use of this script. Always validate signals against your own analysis, conduct your own due diligence, and apply prudent risk management. Use at your own risk.
---
Open source under Mozilla Public License 2.0. Code is fully readable in the Pine Editor for those who want to study the math. Thank you.
- BullByte インジケーター

ライブラリ

Adaptive Regime Filter + Divergence (AER-VN) [KEYALGOS]Adaptive Regime Filter + Divergence (AER-VN)
Professional Grade Market Regime Classification with Advanced Divergence Detection
Precision trend identification using Adaptive Efficiency Ratio methodology
Volatility-normalized thresholds that adjust to real-time market conditions
Automatic divergence detection (Regular and Hidden) with visual confirmation lines
Four distinct market regimes with color-coded clarity
Zero-lag signal generation with confirmation logic
OVERVIEW
The Adaptive Regime Filter with Volatility Normalization (AER-VN) represents a sophisticated evolution of traditional trend filtering methodologies. This proprietary indicator combines Kaufman's Efficiency Ratio principles with dynamic volatility adaptation to classify market conditions into four actionable regimes: Uptrend, Downtrend, Choppiness, and Consolidation.
The integrated Divergence Detection System operates as a secondary analytical layer, identifying momentum exhaustion and trend continuation patterns through comparative analysis of price action versus efficiency metrics. Unlike standard oscillators that measure raw momentum, this system evaluates the quality of price movement, providing earlier and more reliable reversal signals.
METHODOLOGY AND TECHNIQUE
1. Adaptive Efficiency Ratio (AER) Core
Traditional efficiency ratios utilize static thresholds that fail across varying volatility environments. The AER-VN methodology introduces dynamic threshold calculation that self-adjusts based on current volatility relative to historical norms.
Displacement Measurement: Calculates net price movement over the lookback period
Path Distance Analysis: Sums absolute bar-to-bar movements to determine movement quality
Efficiency Calculation: Ratio of displacement to path distance (0.0 to 1.0 scale)
Threshold Adaptation: Baseline efficiency requirements scale proportionally with the ATR ratio
When volatility expands (ATR above mean), the system automatically raises the efficiency threshold required to qualify as "trending." This prevents false trend signals during volatile chop. Conversely, during low volatility periods, the threshold contracts to capture subtle trending behavior.
2. Volatility Normalization Engine
The Volatility Normalization component creates a relative volatility index by comparing current ATR readings against a rolling historical average. This produces an ATR Ratio that serves as the scaling factor for dynamic threshold calculation.
Current ATR: Short-term volatility measurement (default 14 periods)
Mean ATR: Long-term volatility baseline (default 50 periods)
Adaptive Scaling: Raw threshold = Base Threshold x ATR Ratio
Ceiling Protection: Maximum threshold cap prevents mathematically impossible requirements during extreme volatility events
3. Four Regime Classification System
Uptrend (Teal): Efficiency exceeds dynamic threshold with positive price displacement. Indicates high-quality upward movement with minimal retracement.
Downtrend (Maroon): Efficiency exceeds dynamic threshold with negative price displacement. Indicates sustained selling pressure with directional clarity.
Choppiness (Orange): Efficiency below threshold during above-average volatility. Characterized by noisy, directionless movement with large wicks and whipsaws.
Consolidation (Gray): Efficiency below threshold during below-average volatility. Represents quiet, range-bound markets with compressed price action.
4. Zero-Lag Divergence Detection
The divergence system employs confirmed swing detection to identify pivotal highs and lows without repainting. Once a swing point is confirmed (price violates the extreme), the system evaluates four divergence classifications:
Regular Bearish Divergence: Price records higher highs while Efficiency Ratio records lower highs. Indicates trend exhaustion and potential reversal to the downside.
Regular Bullish Divergence: Price records lower lows while Efficiency Ratio records higher lows. Indicates selling exhaustion and potential reversal to the upside.
Hidden Bearish Divergence: Price records lower highs while Efficiency Ratio records higher highs. Suggests continuation of the current downtrend after a pullback.
Hidden Bullish Divergence: Price records higher lows while Efficiency Ratio records lower lows. Suggests continuation of the current uptrend after a retracement.
Visual confirmation lines connect the relevant swing points on the indicator panel, allowing traders to verify divergence validity visually.
INPUT PARAMETERS AND CONFIGURATION
Efficiency Ratio Settings
ER Lookback (N)
Default: 10 | Range: 2+
The calculation period for efficiency measurement. Shorter values increase sensitivity to recent price action, suitable for scalping lower timeframes. Longer values smooth the oscillator, better for swing trading higher timeframes.
Base ER Threshold
Default: 0.25 | Range: 0.05 to 0.80 | Step: 0.05
The foundational efficiency level required in normalized volatility conditions. Higher values demand cleaner, more directional movement to trigger trending regime classification. Lower values allow noisier price action to qualify as trending.
Max Threshold Cap
Default: 0.65 | Range: 0.10 to 0.99 | Step: 0.05
The absolute ceiling for the dynamic threshold. This safety mechanism prevents the threshold from rising to levels mathematically impossible to achieve during extreme volatility expansion.
Volatility Normalization Settings
ATR Length
Default: 14 | Range: 1+
The lookback period for Average True Range calculation. Determines how quickly the system responds to changing volatility conditions.
ATR Mean Lookback
Default: 50 | Range: 5+
The historical window for establishing the volatility baseline. Longer periods create a smoother volatility reference, while shorter periods adapt more quickly to regime changes in volatility.
Divergence Detection Settings
Swing Definition Length
Default: 10 | Range: 3+
The lookback window for identifying swing highs and lows. Determines the minimum number of bars required to establish a pivot point. Lower values detect micro-swings (more signals, more noise). Higher values detect major swings (fewer signals, higher quality).
Visual Display Toggles
Show Regular Div Markers: Display circle markers for Regular Bearish and Regular Bullish divergences
Show Hidden Div Markers: Display circle markers for Hidden Bearish and Hidden Bullish divergences
Line: Regular Bearish: Draw connecting lines between swing highs for Regular Bearish divergences (Red)
Line: Regular Bullish: Draw connecting lines between swing lows for Regular Bullish divergences (Lime)
Line: Hidden Bearish: Draw connecting lines for Hidden Bearish divergences (Orange)
Line: Hidden Bullish: Draw connecting lines for Hidden Bullish divergences (Aqua)
Visual Settings
Color Price Bars
Toggle to apply regime colors directly to price candles/bars on the main chart. Uptrend (Teal), Downtrend (Maroon), Choppiness (Orange), Consolidation (Gray).
INTERPRETATION GUIDE
Reading the Oscillator
The main panel displays three critical elements:
Efficiency Ratio Line: The primary oscillator colored by current regime. Values near 1.0 indicate perfect efficiency (strong trend). Values near 0.0 indicate complete inefficiency (chop).
Dynamic Threshold: The white crossed line representing the current volatility-adjusted efficiency requirement. When the ER line crosses above this threshold, the regime shifts to trending.
Base Threshold Reference: The gray dotted line showing the static baseline (0.25 default) for reference.
Divergence Signal Interpretation
Red Circle (Regular Bearish): Momentum divergence at highs. Consider reducing long exposure or preparing short entries. Highest probability when appearing near resistance or after extended uptrends.
Lime Circle (Regular Bullish): Momentum divergence at lows. Consider reducing short exposure or preparing long entries. Highest probability when appearing near support or after extended downtrends.
Orange Circle (Hidden Bearish): Trend continuation signal in downtrends. Pullback likely ending, downtrend resumption probable.
Aqua Circle (Hidden Bullish): Trend continuation signal in uptrends. Retracement likely ending, uptrend resumption probable.
TRADING APPLICATIONS
Strategy 1: Regime-Based Trend Following
Enter long positions only when the indicator displays Teal coloring (Uptrend regime) and short positions only during Maroon coloring (Downtrend regime). Exit positions when the regime shifts to Orange or Gray, indicating the trending condition has ended.
Best for: Directional traders and trend followers
Timeframe: M15 and higher recommended for stability
Confluence: Combine with moving average alignment or breakout patterns
Strategy 2: Divergence Reversal Trading
Monitor for Regular Divergences (Red or Lime circles) as early warning systems. Wait for price confirmation (engulfing candles, pin bars) at the divergence point before entering. Use the connecting lines to visualize the divergence strength.
Best for: Counter-trend scalpers and swing traders
Timeframe: M5 to H1 depending on swing length settings
Confluence: Combine with support/resistance levels and volume analysis
Strategy 3: Chop Avoidance and Consolidation Breakout
Use the Orange (Choppiness) and Gray (Consolidation) regimes as "No Trade" zones or reduction zones. Wait for a divergence to form within these regimes, then enter when the regime shifts back to trending (Teal or Maroon), capturing the breakout momentum.
Best for: Patience-based traders seeking high-probability setups
Timeframe: Effective across all timeframes
Confluence: Combine with volume expansion on regime change
Strategy 4: Hidden Divergence Continuation
In established trends (Teal lasting 5+ bars), look for Hidden Bullish Divergences (Aqua) on pullbacks to enter additional long positions. In established downtrends (Maroon), look for Hidden Bearish Divergences (Orange) on rallies to add to shorts.
Best for: Position traders adding to winners
Timeframe: H1 to Daily for best results
Confluence: Combine with Fibonacci retracement levels
OPTIMIZATION GUIDELINES
For Lower Timeframes (M1 to M5)
Reduce ER Lookback to 6-8 for faster response
Lower Base ER Threshold to 0.15-0.20 to account for noise
Reduce Max Threshold Cap to 0.50-0.55
Shorten ATR Mean Lookback to 20-30
Reduce Swing Definition Length to 6-8 for micro-structure
For Higher Timeframes (H1 to Daily)
Increase ER Lookback to 14-21 for smoother readings
Maintain or increase Base ER Threshold to 0.30+ for quality control
Increase ATR Mean Lookback to 50-100 for stable volatility baselines
Increase Swing Definition Length to 10-20 for major pivots only
ALERTS AND NOTIFICATIONS
The indicator includes built-in alert conditions for:
Regular Bearish Divergence Detection
Regular Bullish Divergence Detection
Configure TradingView alerts to trigger on these conditions to monitor markets without constant chart watching.
BEST PRACTICES AND RISK MANAGEMENT
Always confirm divergence signals with price action patterns (engulfing candles, pin bars, break of structure) rather than entering immediately on marker appearance.
Avoid trading divergence signals that occur deep within the Choppiness (Orange) regime without waiting for a regime shift confirmation.
Use the regime colors as a position sizing guide: Full size in Teal/Maroon, half size in Gray, flat or minimal in Orange.
The indicator excels when combined with support/resistance analysis. Divergences forming at key S/R levels carry significantly higher probability.
In ranging markets, decrease the Base ER Threshold to reduce whipsaws. In strongly trending markets, consider increasing it to filter out minor retracements.
TECHNICAL NOTES
The indicator does not repaint. Swing points require confirmation on the subsequent bar to print, ensuring signals remain fixed after formation.
All calculations utilize Pine Script v6 native functions for optimal performance and minimal resource usage.
The Volatility Normalization component prevents the common failure mode of static efficiency indicators during periods of expanding volatility.
Connecting lines for divergences are managed with automatic cleanup protocols to prevent chart clutter on extended runs.
SUPPORT AND UPDATES
This indicator is maintained by KeyAlgos. All users receive automatic updates as methodology improvements are implemented. For questions regarding parameter optimization or implementation strategies, utilize the TradingView comments section on this publication.
Disclaimer: This indicator is a technical analysis tool designed to assist with market analysis, not a guaranteed profit system. Always practice proper risk management and use stop losses. Past performance of indicator signals does not guarantee future results. インジケーター

Adaptive MAD Supertrend | GForgeAdaptive MAD Supertrend | GForge
The Adaptive MAD Supertrend is a trend-following indicator built on the classic Supertrend framework, but with two core innovations that address well-known weaknesses in the original design: how volatility is measured, and how the indicator behaves across different market conditions.
The Problem With Standard Supertrend
The classic Supertrend uses ATR (Average True Range) as its volatility measure and a fixed multiplier. ATR squares its deviation calculations internally, which means a single spike candle — a news wick, a liquidation cascade — can temporarily blow the bands wide and either trigger a false flip or delay a valid one. On top of that, a fixed multiplier means the indicator behaves identically in a clean trending market and a choppy ranging one. It has no awareness of what the market is actually doing.
Innovation 1 — MAD Replaces ATR
This indicator uses Mean Absolute Deviation as its volatility measure instead of ATR or Standard Deviation.
MAD = mean( |close − mean(close, n)| , n )
The key difference is linearity. Each bar contributes its deviation to the average equally, without squaring. A spike candle influences the band width, but proportionally — it cannot disproportionately dominate the calculation the way it can in ATR or StdDev. The result is a more stable, consistent band width that responds to genuine volatility without overreacting to outlier bars.
An optional EMA smoothing layer can be applied to the raw MAD output before it scales the bands, which further stabilizes band width during volatile periods.
Innovation 2 — Kaufman Efficiency Ratio Scales the Multiplier
The Efficiency Ratio (ER), developed by Perry Kaufman, measures how efficiently price is moving:
ER = |net price change over n bars| / sum(|bar-to-bar changes|, n)
ER → 1.0: price moved efficiently in one direction — a clean trend
ER → 0.0: price moved a lot but went nowhere — chop and noise
The adaptive multiplier uses ER to scale band width dynamically:
adaptive_multiplier = Multiplier_Chop − ER × (Multiplier_Chop − Multiplier_Trend)
During a clean trend, the multiplier contracts toward your Trend setting — bands tighten and the trailing stop follows price closely, capturing more of the move. During choppy conditions, the multiplier expands toward your Chop setting — bands widen and the stop absorbs noise without flipping unnecessarily.
This means the indicator automatically adjusts its sensitivity to what the market is doing, rather than applying the same fixed behaviour to every bar.
Basis MA
The band centre line (basis) is fully configurable. Rather than raw hl2 like the classic Supertrend, any moving average from the menu can serve as the anchor — the band is built outward from it. The default is T3, a Tillson triple-smoothed MA that provides an extremely clean centre line with minimal lag overshoot. Other useful options include DEMA and TEMA for faster response, VWMA for volume-weighted anchoring, or RMA for higher timeframes.
How to Read It
Line colour: green/up colour = bullish trend, red/down colour = bearish trend
Trend fill: shaded area between price and the trailing stop — visual confirmation of which side of the line price is on
Inactive band: the faint dotted line on the opposite side shows where a flip would trigger if price reaches it
Signal diamonds: markers at each trend flip — below bar for long entries, above bar for short/cash exits
Notes
Optimised and tested on Bitcoin 1D. Performs well on trending instruments across higher timeframes (4H and above).
The MAD + ER combination is theoretically complementary: MAD handles what the band width is, ER handles how much of it to apply. They solve orthogonal problems.
As with all trend-following tools, performance degrades in prolonged sideways markets — the Chop multiplier setting mitigates this but does not eliminate it.
⚠️ Disclaimer
This indicator is a technical analysis tool provided for informational and educational purposes only. It is not financial advice, and nothing presented here should be construed as a recommendation to buy, sell, or hold any asset. Past performance does not guarantee future results.
Developed by GForge インジケーター

FluxPulse Momentum [JOAT]FluxPulse Momentum - Adaptive Multi-Component Oscillator
FluxPulse Momentum is a composite oscillator that blends three distinct momentum components into a single, smoothed signal line. Rather than relying on a single indicator, it synthesizes adaptive RSI, normalized rate of change, and a Kaufman-style efficiency ratio to provide a multi-dimensional view of momentum.
What This Indicator Does
Combines RSI, Rate of Change (ROC), and Efficiency Ratio into one weighted composite
Applies EMA smoothing to reduce noise while preserving responsiveness
Displays overbought/oversold zones with optional background highlighting
Generates buy/sell signals when the oscillator crosses its signal line in favorable zones
Provides a real-time dashboard showing current state, momentum direction, and efficiency
Core Components
Adaptive RSI (50% weight) — Standard RSI calculation normalized around the 50 level
Normalized ROC (30% weight) — Rate of change scaled relative to its recent maximum range
Efficiency Ratio (20% weight) — Measures directional movement efficiency, inspired by Kaufman's adaptive concepts
The final composite is smoothed twice using EMA to create both a fast line and a signal line.
Signal Logic
// Buy signal: crossover in lower half
buySignal = ta.crossover(qmo, qmoSmooth) and qmo < 50
// Sell signal: crossunder in upper half
sellSignal = ta.crossunder(qmo, qmoSmooth) and qmo > 50
Signals are generated only when the oscillator is positioned favorably—buy signals occur below the 50 midline, sell signals occur above it.
Dashboard Information
The on-chart table displays:
Current oscillator value with gradient coloring
Momentum state (Overbought, Oversold, Bullish, Bearish, Neutral)
Momentum direction and acceleration
Efficiency ratio percentage
Active signal status
Inputs Overview
RSI Length — Period for RSI calculation (default: 14)
ROC Length — Period for rate of change (default: 10)
Smoothing Length — EMA smoothing period (default: 3)
Overbought/Oversold Levels — Threshold levels for zone detection
Await Bar Confirmation — Wait for bar close before triggering alerts
How to Use It
Watch for crossovers between the main line and signal line
Use overbought/oversold zones to identify potential reversal areas
Monitor the histogram for momentum acceleration or deceleration
Combine with price action analysis for confirmation
Alerts
Buy Signal — Bullish crossover in the lower zone
Sell Signal — Bearish crossunder in the upper zone
Overbought/Oversold Crosses — Level threshold crossings
This indicator is provided for educational purposes. It does not constitute financial advice. Always conduct your own analysis before making trading decisions.
— Made with passion by officialjackofalltrades インジケーター

インジケーター

インジケーター

ER-Adaptive ATR, STD-Adaptive Damiani Volatmeter [Loxx]ER-Adaptive ATR, STD-Adaptive Damiani Volatmeter is a Damiani Volatmeter with both Efficiency-Ratio Adaptive ATR, used in place of ATR, and Adaptive Deviation, used in place of Standard Deviation.
What is Adaptive Deviation?
By definition, the Standard Deviation (STD, also represented by the Greek letter sigma σ or the Latin letter s) is a measure that is used to quantify the amount of variation or dispersion of a set of data values. In technical analysis we usually use it to measure the level of current volatility .
Standard Deviation is based on Simple Moving Average calculation for mean value. This version of standard deviation uses the properties of EMA to calculate what can be called a new type of deviation, and since it is based on EMA , we can call it EMA deviation. And added to that, Perry Kaufman's efficiency ratio is used to make it adaptive (since all EMA type calculations are nearly perfect for adapting).
The difference when compared to standard is significant--not just because of EMA usage, but the efficiency ratio makes it a "bit more logical" in very volatile market conditions.
The green line is the Adaptive Deviation, the white line is regular Standard Deviation. This concept will be used in future indicators to further reduce noise and adapt to price volatility .
See here for a comparison between Adaptive Deviation and Standard Deviation
What is Efficiency Ratio Adaptive ATR?
Average True Range (ATR) is widely used indicator in many occasions for technical analysis . It is calculated as the RMA of true range. This version adds a "twist": it uses Perry Kaufman's Efficiency Ratio to calculate adaptive true range
See here for a comparison between Efficiency-Ratio Adaptive ATR, and ATR.
What is the Damiani Volatmeter?
Damiani Volatmeter uses ATR and Standard deviation to tease out ticker volatility so you can better understand when it's the ideal time to trade. The idea here is that you only take trades when volatility is high so this indicator is to be coupled with various other indicators to validate the other indicator's signals. This is also useful for detecting crabbing and chopping markets.
Shoutout to user @xinolia for the DV function used here.
Anything red means that volatility is low. Remember volatility doesn't have a direction. Anything green means volatility high despite the direction of price. The core signal line here is the green and red line that dips below two while threshold lines to "recharge". Maximum recharge happen when the core signal line shows a yellow ping. Soon after one or many yellow pings you should expect a massive upthrust of volatility . The idea here is you don't trade unless volatility is rising or green. This means that the Volatmeter has to dip into the recharge zone, recharge and then spike upward. You can also attempt to buy or sell reversals with confluence indicators when volatility is in the recharge zone, but I wouldn't recommend this. However, if you so choose to do this, then use the following indicator for confluence.
And last reminder, volatility doesn't have a direction! Red doesn't mean short, and green doesn't mean long, Red means don't trade period regardless of direction long/short, and green means trade no matter the direction long/short. This means you'll have to add an indicator that does show direction such as a mean reversion indicator like Fisher Transform or a Gaussian Filter. You can search my public scripts for various Fisher Transform and Gaussian Filter indicators.
Price-Filtered Spearman Rank Correl. w/ Floating Levels is considered the Mercedes Benz of reversal indicators
Comparison between this indicator, ER-Adaptive ATR, STD-Adaptive Damiani Volatmeter , and the regular Damiani Volatmeter . Notice that the adaptive version catches more volatility than the regular version.
How signals work
RV = Rising Volatility
VD = Volatility Dump
Plots
White line is signal
Thick red/green line is the Volatmeter line
The dotted lower lines are the zero line and minimum recharging line
Included
Bar coloring
Alerts
Signals
Related indicators
Variety Moving Average Waddah Attar Explosion (WAE)
Damiani Volatmeter
インジケーター

インジケーター

インジケーター

インジケーター

インジケーター

Adaptive Oscillator constructor [lastguru]Adaptive Oscillators use the same principle as Adaptive Moving Averages. This is an experiment to separate length generation from oscillators, offering multiple alternatives to be combined. Some of the combinations are widely known, some are not. Note that all Oscillators here are normalized to -1..1 range. This indicator is based on my previously published public libraries and also serve as a usage demonstration for them. I will try to expand the collection (suggestions are welcome), however it is not meant as an encyclopaedic resource , so you are encouraged to experiment yourself: by looking on the source code of this indicator, I am sure you will see how trivial it is to use the provided libraries and expand them with your own ideas and combinations. I give no recommendation on what settings to use, but if you find some useful setting, combination or application ideas (or bugs in my code), I would be happy to read about them in the comments section.
The indicator works in three stages: Prefiltering, Length Adaptation and Oscillators.
Prefiltering is a fast smoothing to get rid of high-frequency (2, 3 or 4 bar) noise.
Adaptation algorithms are roughly subdivided in two categories: classic Length Adaptations and Cycle Estimators (they are also implemented in separate libraries), all are selected in Adaptation dropdown. Length Adaptation used in the Adaptive Moving Averages and the Adaptive Oscillators try to follow price movements and accelerate/decelerate accordingly (usually quite rapidly with a huge range). Cycle Estimators, on the other hand, try to measure the cycle period of the current market, which does not reflect price movement or the rate of change (the rate of change may also differ depending on the cycle phase, but the cycle period itself usually changes slowly).
Chande (Price) - based on Chande's Dynamic Momentum Index (CDMI or DYMOI), which is dynamic RSI with this length
Chande (Volume) - a variant of Chande's algorithm, where volume is used instead of price
VIDYA - based on VIDYA algorithm. The period oscillates from the Lower Bound up (slow)
VIDYA-RS - based on Vitali Apirine's modification of VIDYA algorithm (he calls it Relative Strength Moving Average). The period oscillates from the Upper Bound down (fast)
Kaufman Efficiency Scaling - based on Efficiency Ratio calculation originally used in KAMA
Deviation Scaling - based on DSSS by John F. Ehlers
Median Average - based on Median Average Adaptive Filter by John F. Ehlers
Fractal Adaptation - based on FRAMA by John F. Ehlers
MESA MAMA Alpha - based on MESA Adaptive Moving Average by John F. Ehlers
MESA MAMA Cycle - based on MESA Adaptive Moving Average by John F. Ehlers , but unlike Alpha calculation, this adaptation estimates cycle period
Pearson Autocorrelation* - based on Pearson Autocorrelation Periodogram by John F. Ehlers
DFT Cycle* - based on Discrete Fourier Transform Spectrum estimator by John F. Ehlers
Phase Accumulation* - based on Dominant Cycle from Phase Accumulation by John F. Ehlers
Length Adaptation usually take two parameters: Bound From (lower bound) and To (upper bound). These are the limits for Adaptation values. Note that the Cycle Estimators marked with asterisks(*) are very computationally intensive, so the bounds should not be set much higher than 50, otherwise you may receive a timeout error (also, it does not seem to be a useful thing to do, but you may correct me if I'm wrong).
The Cycle Estimators marked with asterisks(*) also have 3 checkboxes: HP (Highpass Filter), SS (Super Smoother) and HW (Hann Window). These enable or disable their internal prefilters, which are recommended by their author - John F. Ehlers . I do not know, which combination works best, so you can experiment.
Chande's Adaptations also have 3 additional parameters: SD Length (lookback length of Standard deviation), Smooth (smoothing length of Standard deviation) and Power ( exponent of the length adaptation - lower is smaller variation). These are internal tweaks for the calculation.
Oscillators section offer you a choice of Oscillator algorithms:
Stochastic - Stochastic
Super Smooth Stochastic - Super Smooth Stochastic (part of MESA Stochastic) by John F. Ehlers
CMO - Chande Momentum Oscillator
RSI - Relative Strength Index
Volume-scaled RSI - my own version of RSI. It scales price movements by the proportion of RMS of volume
Momentum RSI - RSI of price momentum
Rocket RSI - inspired by RocketRSI by John F. Ehlers (not an exact implementation)
MFI - Money Flow Index
LRSI - Laguerre RSI by John F. Ehlers
LRSI with Fractal Energy - a combo oscillator that uses Fractal Energy to tune LRSI gamma
Fractal Energy - Fractal Energy or Choppiness Index by E. W. Dreiss
Efficiency ratio - based on Kaufman Adaptive Moving Average calculation
DMI - Directional Movement Index (only ADX is drawn)
Fast DMI - same as DMI, but without secondary smoothing
If no Adaptation is selected (None option), you can set Length directly. If an Adaptation is selected, then Cycle multiplier can be set.
Before an Oscillator, a High Pass filter may be executed to remove cyclic components longer than the provided Highpass Length (no High Pass filter, if Highpass Length = 0). Both before and after the Oscillator a Moving Average can be applied. The following Moving Averages are included: SMA, RMA, EMA, HMA , VWMA, 2-pole Super Smoother, 3-pole Super Smoother, Filt11, Triangle Window, Hamming Window, Hann Window, Lowpass, DSSS. For more details on these Moving Averages, you can check my other Adaptive Constructor indicator:
The Oscillator output may be renormalized and postprocessed with the following Normalization algorithms:
Stochastic - Stochastic
Super Smooth Stochastic - Super Smooth Stochastic (part of MESA Stochastic) by John F. Ehlers
Inverse Fisher Transform - Inverse Fisher Transform
Noise Elimination Technology - a simplified Kendall correlation algorithm "Noise Elimination Technology" by John F. Ehlers
Except for Inverse Fisher Transform, all Normalization algorithms can have Length parameter. If it is not specified (set to 0), then the calculated Oscillator length is used.
More information on the algorithms is given in the code for the libraries used. I am also very grateful to other TradingView community members (they are also mentioned in the library code) without whom this script would not have been possible. インジケーター

Efficiency RatioThe efficiency ratio (ER) is described by Perry Kaufman in his book, Trading Systems and Methods.
It works by measuring the momentum of the market, that is, the absolute change from the current price to a past price, and divides it by the volatility, which is the sum of the absolute changes of each bar. That makes this a bounded indicator, going from 0 to 100, like an oscillator. Higher values mean less noise, while lower values mean more.
Eg.: if the market moves from 10.0 to 15.0 in a directional manner, with every bar up, the ER is going to be at 100. However, if it moves up and down, and goes all over the place until finally reaching 15.0, the ER is going to be at around 20. It is very difficult for the ER to be at zero, because that would require 0 volatility, which is almost impossible to occur.
This indicator is useful when planning for trades. If you notice the ER being higher than average, you may choose to increase the position size, because that would mean that the market is directional and has less chance of a whipsaw. インジケーター

インジケーター

RedK Volume-Weighted Directional Efficiency Index (DXF)RedK Volume-Weighted Directional Efficiency Index (DXF) is a momentum indicator - that builds on Kaufman's Efficiency Ratio (ER) concept.
DXF utilizes a restricted +100/-100 oscillator to represent the "quality" of a trend, and does a good job in detecting the possibility of an upcoming trend change (in both direction and quality), improving our ability to make decisions on trade entries and exits.
Here's a quick background on Kaufman's Efficiency Ratio (ER)
------------------------------------------------------------------------------- Copied from internet sources -----------------------------
Developed by Perry Kaufman and introduced in his book “New Trading Systems and Methods”, the Efficiency Ratio reflects relative market speed to volatility. There are cases, when it is used as a filter, which helps a trader to avoid ”choppy” markets or trading ranges and to identify smoother trends.
ER is the result of dividing the net change in price movement during n-periods by the sum of all bar-to-bar price changes during the same n-periods. In case the market is trending smoother, then the ratio will be higher. In case the ratio shows readings in proximity to zero, this implies that market movement is inefficient and ”choppy”.
If the Efficiency Ratio shows a reading of +100, this means that the trading instrument is in a bull trend and trending with perfect efficiency.
If the Efficiency Ratio shows a reading of -100, this means that the trading instrument is in a bear trend and trending with perfect efficiency.
It is impossible for any instrument to have a perfect Efficiency ratio, because any movement against the major trend during the examined period of time would cause the ratio to drop.
If the Efficiency Ratio shows a reading above +30 (common setting for the "Significant Level"), this is indicative of a quality bull trend. If the ratio shows a reading below -30, this is indicative of a quality bear trend.
------------------------------------------------------------------------------- End of Copy -------------------------------------------------------------------------------------------------------
Kaufman also used the ER as basis for his famous Kaufman Adaptive Moving Average (KAMA).
Read more on ER & Kama here
How is DXF different from other ER-based indicators?
------------------------------------------------------------------
- Let's get the easy part out of the way: DXF has a "volume-weighting" option ✔
This option is OFF by default (to avoid errors with instruments with no volume data)
- once this option is applied, it provides the benefit of combining the volume effect into the calculation - those who appreciate the effect of volume on price action will hopefully find this option valuable
- The calculation of ER and how it can be "best utilized":
Let's examine the ER concept a bit closer: as a (math) concept, the (original) Efficiency Ratio (ER) takes the positive change of the price of an instrument during a certain period, and divide it by the sum of (absolute) price moves that were observed during that same period.
So, in the trader's language, we will be saying "out of a total of $20 moves (up and down) that MSFT did in the past 10 days, MSFT only made a net change of $5 up during that period" - so the "10-day ER" for MSFT in that case is 5/20 = 25% -- then we continue to observe that ongoing "10-day ER" and if it increases, we can expect that MSFT is going to establish a strong move (trend) up --- right?
the magic word here is to "observe the ongoing ER" - many of the ER based indicators just use the ER as calculated by Kaufman's original method. IMHO, these are just "point-in-time readings" - if we hope to get real insights from the ER, we need to take an average of that reading - for our "time window" we're interested in - and only then we can identify trends and patterns in the ER value as it changes during that windowss- DXF does that - and that allows a trader to say "the (weighted) 5-day average of the 10-day ER for MSFT is increasing, and that why i expect an up-trend" -- makes sense ? both the "Lookback" used to calculate the ER, and the Length of observed "window" for the Average ER are adjustable in DXF settings
Other Uses and Settings :
---------------------------------
- As a momentum indicator, DXF can predict an upcoming change of trend - cause that will reflect on the average ER value. There are few examples in the chart where the price move and ER trend *do not agree* - The trader can see these signs and take decisions accordingly
- DXF can help reveal best entries and exits: assume we are long-term bullish on MSFT, and we want to "buy the dip" - DXF can help reveal the time where price is recovering from extreme weakness - and that would be the ideal buy opportunities for us - exampled marked on the chart
- the Stepping & Smoothing options enable better visualization of the DXF plot. the "raw" DXF is still shown as a silver line.
- The "Significant Levels" option is available and is set to -20/+20 by default .. also adjustable in indicator settings.
- Please use DXF in combination with other trend and volume indicators, and with thorough chart / price action analysis and not in isolation to ensure you get proper signal confirmation for trades. In the chart above, you can see DXF combined with a moving average that can act as a filter and to confirm the price moves.
---------------------------------------------------
As usual, feedback & comments are welcome - if you find this work useful in your trading arsenal, please share a comment - i would be more than happy to learn about that. Good luck! インジケーター

インジケーター

インジケーター

Trending True RangeDisplay a smoothed true range during trending markets, thus filtering any measurement occurring during ranging markets. Whether the market is trending or ranging is determined by the position of the efficiency ratio relative to its Wilder moving average.
Settings
Resolution : resolution of the indicator
Length : period of the efficiency ratio and the Wilder moving averages used in the script
Usage
If you are not interested in volatility during ranging markets, this indicator might result useful to you. An interesting aspect is that it both measures volatility, but also determine whether the market is trending or ranging, with a zero value indicating a ranging market.
Indicator against Atr, with both length = 14, our indicator might be easier to interpret.
Note
Thx to my twitter followers for their suggestions regarding this indicator. I apologize if it's a bit short, the original code was longer and included more options, but forcing a script to be lengthy is a really bad idea, so I stayed with something less flashy but certainly more practical, "classic Grover" some might say.
Thx for reading!
インジケーター

Efficient Trend Step ChannelIntroduction
The efficient trend-step indicator is a trend indicator that make use of the efficiency ratio in order to adapt to the market trend strength, this indicator originally aimed to remain static during ranging states while fitting the price only when large variations occur. The trend step indicator family unlike most moving averages has a boxy appearance and could therefore not be classified as smooth, this makes it an indicator relatively uninteresting to use as input for other non-trending indicators such as oscillators.
Today a channel indicator making use of the efficient trend-step is proposed, the indicator has an upper and a lower extremity who can be used for breakout or support and resistance methodologies, however we will see that the indicator is sometimes able to return accurate support and resistance levels.
The Indicator
The indicator has the same settings has the efficient trend step indicator, length control the period of the efficiency ratio, fast control the period of the rolling standard deviation used for trending states, slow control the period of the rolling standard deviation used for ranging states, fast should be lower than slow , if both are equal then the indicator is equal to the classical trend step indicator and length does no longer affect the indicator output. Lower values of fast/slow will make the indicator more reactive to small variations thus changing direction more often.
The color changes you can see on the indicator are changed depending on the prior direction took by the indicator output, if the indicator where higher than its precedent value, then the color will be blue until the indicator is lower than its precedent value. Those colors help you have an estimate of the current trend direction.
Channel Calculation And Role
The extremities made from the efficient trend step allow for more advanced trading rules, they can act as stop/target level and can also give a rough estimate of the current market volatility, with wider extremities indicating a more volatile market.
The extremities are made directly from the dev element used by the efficient trend-step, the upper extremity is made by summing the efficient trend step with the value of dev when the efficient trend step change, the lower extremity is made the same way but the value is subtracted instead.
Is it a weird choice ? It sure is strange to see such approach, the absolute rolling average error between the price and the efficient trend step could have been a logical measure but using dev instead is more efficient and also allow for a more adaptive approach which can benefit the support and resistance methodology, the last reason is because i didn't wanted to "denature" the trend-step signature of the indicator.
The figure above represent the measurement used for making the extremities (in green).
Since the previously described measure change only when the efficient trend step change, we can conclude that such measure is representative of a relatively large variation, since the efficient trend step aim to only change when a large variations appear.
We can see that the upper extremity acted as an accurate resistance in this upper variation of AMD,
Here as well, however like other bands indicators it is safer to take into account the current trend direction, a strong uptrend will have less difficulties crossing the upper extremity, therefore it might be better to rely on the support (lower extremity) on an up-trending market (indicator in blue), and on the resistance (upper extremity) on an down-trending market (indicator in orange).
The figure above show support and resistances signals, a cross represent a false signal, while green arrows represent correct ones with their respective direction.
Conclusion
The presented indicator add more possibilities to the interpretation of the efficient trend step, the extremities can act as stop/target level, however this use has to be controlled, and the level should be in accordance to your risk/reward ratio.
Showcasing another trend-step indicator was a real pleasure. Thanks for reading :)
インジケーター

インジケーター
