OPEN-SOURCE SCRIPT
RBM - Range Body Measure

RBM – Range Body Measure
A structural strength indicator for intraday trend filtering and noise avoidance
This indicator measures the quality of price movement using the Range Body Measure (RBM), a composite metric derived from normalized range expansion and candle body efficiency. RBM helps identify whether price action is clean and directional, or weak and choppy.
🔍 What RBM Measures
RBM is built from two key structural components:
RBM combines these to produce a smooth structural score typically between 0 and 1.
🎯 Trend & Chop Zones
Two adjustable thresholds define structural zones:
🔴 Chop Zone
Highlighted only when RBM < Chop Threshold
Only the area below the threshold is shaded
Indicates low-quality, non-directional movement
Useful to filter out no-trade periods
🟢 Trend Zone
Highlighted only when RBM > Trend Threshold
Only the area above the threshold is shaded
Indicates strong structure suitable for directional trades
The middle region is intentionally left unshaded to keep the chart clean.
🛡️ Built-In Safety
Trend threshold automatically adjusted to be ≥ Chop threshold
Chop shading disabled if threshold ≤ 0
Trend shading disabled if threshold ≥ 1
This ensures stable, predictable behavior regardless of user settings.
📌 Intended Use Cases
Filtering low-quality market structure before entering trades
Validating directional setups for CE/PE options or index futures
Avoiding chop-heavy intraday periods
Enhancing systems based on VWAP, MACD histogram
Building multi-layer conviction models for trend trading
A structural strength indicator for intraday trend filtering and noise avoidance
This indicator measures the quality of price movement using the Range Body Measure (RBM), a composite metric derived from normalized range expansion and candle body efficiency. RBM helps identify whether price action is clean and directional, or weak and choppy.
🔍 What RBM Measures
RBM is built from two key structural components:
- Range Expansion
- EMA of (High − Low), normalized by ATR
- Captures how meaningfully price is moving relative to volatility
- Body Efficiency
- EMA of (Candle Body / Total Range)
- Measures how directional each candle truly is
RBM combines these to produce a smooth structural score typically between 0 and 1.
- Low RBM = weak structure, chop, noise
- High RBM = strong directional structure, trend-friendly movement
🎯 Trend & Chop Zones
Two adjustable thresholds define structural zones:
🔴 Chop Zone
Highlighted only when RBM < Chop Threshold
Only the area below the threshold is shaded
Indicates low-quality, non-directional movement
Useful to filter out no-trade periods
🟢 Trend Zone
Highlighted only when RBM > Trend Threshold
Only the area above the threshold is shaded
Indicates strong structure suitable for directional trades
The middle region is intentionally left unshaded to keep the chart clean.
🛡️ Built-In Safety
Trend threshold automatically adjusted to be ≥ Chop threshold
Chop shading disabled if threshold ≤ 0
Trend shading disabled if threshold ≥ 1
This ensures stable, predictable behavior regardless of user settings.
📌 Intended Use Cases
Filtering low-quality market structure before entering trades
Validating directional setups for CE/PE options or index futures
Avoiding chop-heavy intraday periods
Enhancing systems based on VWAP, MACD histogram
Building multi-layer conviction models for trend trading
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Gokul Ramachandran – software architect, programmer. Interested in trading and investment. Currently trading and researching strategies that can be employed in NSE.
Contact: gokul4trading@gmail.com]
LinkedIn: linkedin.com/in/gokulramachandran/
Contact: gokul4trading@gmail.com]
LinkedIn: linkedin.com/in/gokulramachandran/
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Gokul Ramachandran – software architect, programmer. Interested in trading and investment. Currently trading and researching strategies that can be employed in NSE.
Contact: gokul4trading@gmail.com]
LinkedIn: linkedin.com/in/gokulramachandran/
Contact: gokul4trading@gmail.com]
LinkedIn: linkedin.com/in/gokulramachandran/
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.