OPEN-SOURCE SCRIPT

TRV & nTRV - Trimmed Range Volatility

71
Grid bots require stable volatility measurement - ATR becomes misleading when gaps and sudden spikes distort the average. TRV (Trimmed Range Volatility) is an advanced version of ATR: it filters outliers at the extremes (highest and lowest ranges) and remains unaffected by gaps. This provides real-time, accurate volatility measurement for grid bot setup.Grid bots require stable volatility measurement - ATR becomes misleading when gaps and sudden spikes distort the average. TRV (Trimmed Range Volatility) is an advanced version of ATR: it filters outliers at the extremes (highest and lowest ranges) and remains unaffected by gaps. This provides real-time, accurate volatility measurement for grid bot setup.

Why We Developed TRV?
When a gap or sudden spike occurs in the morning, this extreme movement affects standard ATR calculations for an extended period. Even if the price moves sideways for the rest of the day, ATR remains elevated. This causes grid bots to operate with unnecessarily wide spacing and execute fewer trades.
TRV Advantages:
Unaffected by Gaps: Opening gaps don't distort the calculation
Extreme Point Elimination: Filters the largest and smallest outlier candles
Real-Time Accuracy: Shows current market volatility
Grid Bot Optimization: Enables tighter and more efficient grid spacing
Comparison Capability: Compare different stocks and timeframes with nTRV
Grid Bot Usage:
The TRV value is used directly to calculate the number of grid lines:
(Resistance - Support) / TRV = Number of Grid Lines
Example:

Resistance: $110
Support: $90
TRV: $2
Grid Count: (110-90)/2 = 10 grid lines

Features:

Two Filtering Modes: Manual (enter number) or Percentage-Based (automatic ratio)
Four Indicators in One: nTRV, TRV, ATR, and nATR all displayed on the same panel
nTRV: Normalized value (percentage-based, for stock comparison)
TRV: Absolute value (currency-based, for grid calculation)
ATR & nATR Included: Standard ATR and nATR for direct comparison with TRV
Comprehensive Analysis: Compare filtered (TRV) vs unfiltered (ATR) volatility side-by-side
Default: 10% top, 10% bottom outlier elimination

Conclusion:
TRV is an advanced version of ATR specifically designed for grid bot traders. By filtering outlier movements, it provides more stable and reliable volatility measurement. The indicator includes both TRV (filtered) and ATR (unfiltered) on the same chart, giving traders a comprehensive view to make informed decisions. This dual-display approach enables more efficient grid strategies and increased trading frequency.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน