OPEN-SOURCE SCRIPT
CHOP-O-METER - Multi-Factor Choppiness Detector

A composite indicator that quantifies market choppiness using four independent measurements, helping you identify when to trade trends vs. when to sit out or fade moves.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW IT WORKS
The Chop-O-Meter combines four normalized components (each scaled 0-100) into a single weighted score:
1. Price Efficiency (Kaufman-style)
Measures how efficiently price moved from point A to B. If price travels far but nets little distance, efficiency is low = high chop.
2. Direction Change Frequency
Counts how often price direction flips within the lookback period. More flips = more chop.
3. Mean Reversion Intensity
Tracks how often price crosses its moving average. Frequent crosses indicate a ranging, choppy market.
4. ATR Expansion Ratio
Compares the sum of individual bar ranges to the total period range. High ratio means lots of movement within a tight overall range = chop.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
READING THE INDICATOR
Above 65 (Red Zone): High chop — avoid trend-following, consider mean-reversion or staying flat
Below 35 (Green Zone): Trending — momentum strategies more likely to succeed
35-65 (Orange): Transitional/uncertain regime
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SIGNALS
🔻 Green triangle (top): Chop breaking down — potential trend starting
🔺 Red triangle (bottom): Trend exhausting — chop may be returning
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS
Lookback Period: Number of bars to analyze (default 20)
Component Weights: Adjust influence of each factor
Thresholds: Customize high/low chop boundaries
Show Components: Toggle individual factor plots for debugging
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
USE CASES
Filter out trend trades when chop score is high
Reduce position size in choppy regimes
Switch between mean-reversion and momentum strategies
Identify regime transitions early
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ALERTS INCLUDED
Entering High Chop
Entering Trend
Chop Breaking Down
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW IT WORKS
The Chop-O-Meter combines four normalized components (each scaled 0-100) into a single weighted score:
1. Price Efficiency (Kaufman-style)
Measures how efficiently price moved from point A to B. If price travels far but nets little distance, efficiency is low = high chop.
2. Direction Change Frequency
Counts how often price direction flips within the lookback period. More flips = more chop.
3. Mean Reversion Intensity
Tracks how often price crosses its moving average. Frequent crosses indicate a ranging, choppy market.
4. ATR Expansion Ratio
Compares the sum of individual bar ranges to the total period range. High ratio means lots of movement within a tight overall range = chop.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
READING THE INDICATOR
Above 65 (Red Zone): High chop — avoid trend-following, consider mean-reversion or staying flat
Below 35 (Green Zone): Trending — momentum strategies more likely to succeed
35-65 (Orange): Transitional/uncertain regime
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SIGNALS
🔻 Green triangle (top): Chop breaking down — potential trend starting
🔺 Red triangle (bottom): Trend exhausting — chop may be returning
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS
Lookback Period: Number of bars to analyze (default 20)
Component Weights: Adjust influence of each factor
Thresholds: Customize high/low chop boundaries
Show Components: Toggle individual factor plots for debugging
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
USE CASES
Filter out trend trades when chop score is high
Reduce position size in choppy regimes
Switch between mean-reversion and momentum strategies
Identify regime transitions early
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ALERTS INCLUDED
Entering High Chop
Entering Trend
Chop Breaking Down
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.