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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Interakktive — Next-Generation Trading Intelligence
Precision Structure • Institutional Logic • Zero Noise
Precision Structure • Institutional Logic • Zero Noise
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Interakktive — Next-Generation Trading Intelligence
Precision Structure • Institutional Logic • Zero Noise
Precision Structure • Institutional Logic • Zero Noise
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.