OPEN-SOURCE SCRIPT
Market Efficiency Ratio [Interakktive]

The Market Efficiency Ratio decomposes price movement into two components: net progress vs wasted movement. This tool exposes the underlying math that most traders never see, helping you understand when price is moving efficiently versus chopping sideways.
Unlike simple trend indicators, this shows you WHY price movement matters — not just whether it's up or down, but how much of that movement was useful directional progress versus noisy oscillation.
█ WHAT IT DOES
• Calculates Efficiency Ratio (0–1 or 0–100) measuring directional progress
• Exposes Net Displacement (how far price actually moved)
• Exposes Path Length (total distance price traveled)
• Calculates Chop Cost (wasted movement)
• Visual zones for high/mid/low efficiency states
█ WHAT IT DOES NOT DO
• NO signals, NO entries/exits, NO buy/sell
• NO performance claims
• NO predictions — purely diagnostic
• This is a tool for understanding price behavior
█ HOW IT WORKS

The efficiency ratio answers one question: "Of all the movement price made, how much was useful progress?"
🔹 THE MATH
Over a lookback period of N bars:
Net Displacement = |Close[0] - Close[N]|
Path Length = Σ |Close - Close[i+1]| for all bars
Efficiency Ratio = Net Displacement / Path Length
🔹 INTERPRETATION
• Efficiency = 1.0 (100%): Price moved in a straight line — every tick was progress
• Efficiency = 0.5 (50%): Half the movement was wasted in back-and-forth chop
• Efficiency = 0.0 (0%): Price ended exactly where it started — all movement was noise
🔹 CHOP COST
This is the "wasted movement" — how much price traveled without making progress:
Chop Cost = Path Length - Net Displacement
Chop % = Chop Cost / Path Length
High chop cost means lots of effort for little result — a warning sign for trend traders.
█ VISUAL GUIDE

Three efficiency zones:
• GREEN (≥70): High efficiency — strong directional movement
• YELLOW (30-70): Mixed efficiency — some progress, some chop
• RED (<30): Low efficiency — mostly noise, little progress
█ INPUTS
Lookback Length (default: 14)
Number of bars to calculate efficiency over. Higher values produce smoother readings but respond slower to changes.
Smoothing Length (default: 5)
EMA smoothing applied to the output. Reduces noise in the efficiency reading.
Apply Smoothing (default: true)
Toggle EMA smoothing on/off.
Scale Mode (default: 0–100)
Display as percentage (0-100) or decimal ratio (0-1).
Show Reference Bands (default: true)
Display the high/low efficiency threshold lines.
Low/High Efficiency Level (default: 30/70)
Thresholds for classifying efficiency zones.
Overlay Effect (default: None)
• None: No overlay
• Background Tint: Subtle chart background color in high/low zones
• Bar Highlight: Color bars during low efficiency periods
Show Data Window Values (default: true)
Export all raw values (Net Displacement, Path Length, Efficiency, Chop Cost, Chop %) to the data window for analysis.
█ USE CASES
This indicator helps traders understand:
• Why some trends are "clean" and others are "messy"
• When price is consolidating vs trending (without using volume)
• The relationship between movement and progress
• Why high-chop environments are difficult to trade
This is the foundational concept behind more advanced regime detection systems.
█ SUITABLE MARKETS
Works on: Stocks, Futures, Forex, Crypto
Timeframes: All timeframes
Note: This is a price-only indicator — no volume required
█ DISCLAIMER
This indicator is for informational and educational purposes only. It does not constitute financial advice. It does not generate trading signals. Past performance does not guarantee future results. Always conduct your own analysis.
Unlike simple trend indicators, this shows you WHY price movement matters — not just whether it's up or down, but how much of that movement was useful directional progress versus noisy oscillation.
█ WHAT IT DOES
• Calculates Efficiency Ratio (0–1 or 0–100) measuring directional progress
• Exposes Net Displacement (how far price actually moved)
• Exposes Path Length (total distance price traveled)
• Calculates Chop Cost (wasted movement)
• Visual zones for high/mid/low efficiency states
█ WHAT IT DOES NOT DO
• NO signals, NO entries/exits, NO buy/sell
• NO performance claims
• NO predictions — purely diagnostic
• This is a tool for understanding price behavior
█ HOW IT WORKS
The efficiency ratio answers one question: "Of all the movement price made, how much was useful progress?"
🔹 THE MATH
Over a lookback period of N bars:
Net Displacement = |Close[0] - Close[N]|
Path Length = Σ |Close - Close[i+1]| for all bars
Efficiency Ratio = Net Displacement / Path Length
🔹 INTERPRETATION
• Efficiency = 1.0 (100%): Price moved in a straight line — every tick was progress
• Efficiency = 0.5 (50%): Half the movement was wasted in back-and-forth chop
• Efficiency = 0.0 (0%): Price ended exactly where it started — all movement was noise
🔹 CHOP COST
This is the "wasted movement" — how much price traveled without making progress:
Chop Cost = Path Length - Net Displacement
Chop % = Chop Cost / Path Length
High chop cost means lots of effort for little result — a warning sign for trend traders.
█ VISUAL GUIDE
Three efficiency zones:
• GREEN (≥70): High efficiency — strong directional movement
• YELLOW (30-70): Mixed efficiency — some progress, some chop
• RED (<30): Low efficiency — mostly noise, little progress
█ INPUTS
Lookback Length (default: 14)
Number of bars to calculate efficiency over. Higher values produce smoother readings but respond slower to changes.
Smoothing Length (default: 5)
EMA smoothing applied to the output. Reduces noise in the efficiency reading.
Apply Smoothing (default: true)
Toggle EMA smoothing on/off.
Scale Mode (default: 0–100)
Display as percentage (0-100) or decimal ratio (0-1).
Show Reference Bands (default: true)
Display the high/low efficiency threshold lines.
Low/High Efficiency Level (default: 30/70)
Thresholds for classifying efficiency zones.
Overlay Effect (default: None)
• None: No overlay
• Background Tint: Subtle chart background color in high/low zones
• Bar Highlight: Color bars during low efficiency periods
Show Data Window Values (default: true)
Export all raw values (Net Displacement, Path Length, Efficiency, Chop Cost, Chop %) to the data window for analysis.
█ USE CASES
This indicator helps traders understand:
• Why some trends are "clean" and others are "messy"
• When price is consolidating vs trending (without using volume)
• The relationship between movement and progress
• Why high-chop environments are difficult to trade
This is the foundational concept behind more advanced regime detection systems.
█ SUITABLE MARKETS
Works on: Stocks, Futures, Forex, Crypto
Timeframes: All timeframes
Note: This is a price-only indicator — no volume required
█ DISCLAIMER
This indicator is for informational and educational purposes only. It does not constitute financial advice. It does not generate trading signals. Past performance does not guarantee future results. Always conduct your own analysis.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Interakktive — Next-Generation Trading Intelligence
Precision Structure • Institutional Logic • Zero Noise
Precision Structure • Institutional Logic • Zero Noise
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Interakktive — Next-Generation Trading Intelligence
Precision Structure • Institutional Logic • Zero Noise
Precision Structure • Institutional Logic • Zero Noise
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.