OPEN-SOURCE SCRIPT
CHAN CRYPTO RS

🩷 ATR RS (Crypto / High-based 2.1x, Decimal Safe v2)
This indicator is designed for crypto position sizing and stop calculation using ATR-based risk management. It helps traders automatically determine the stop price, per-unit risk, and optimal position size based on a fixed risk amount in USDT.
🔧 Core Logic
ATR Length (Daily RMA) — calculates the daily Average True Range (ATR) using RMA smoothing.
ATR Multiplier (2.1× default) — defines how far the stop is placed from the daily high.
Stop Price (for Longs) = Daily High − ATR × Multiplier
Per-Unit Risk = (Entry − Stop) × Point Value
Position Size = Risk Amount ÷ Per-Unit Risk
Automatically handles decimal precision for micro-priced crypto assets (e.g., PEPE, SHIB).
Includes safeguards for minimum size and maximum position caps.
💡 Features
Uses Daily ATR without lookahead (no repainting).
Dynamically switches between current and previous ATR for stable results when the daily bar isn’t yet confirmed.
“Snap to tick” ensures stop prices align with the symbol’s tick size.
Table display summarizes ATR, stop price, per-unit risk, total risk, size, and bet amount.
Optional stop label on the chart for visual clarity.
🧮 Output Table
Metric Description
ATR(10) Daily RMA-based ATR
ATR used Chosen ATR (current or previous)
Stop Calculated stop price
Per-unit Risk per coin/unit
Risk Total risk in USDT
Size Optimal position size
Bet Total position value (Entry × Size)
🧠 Ideal For
Crypto traders who use fixed-risk ATR strategies and need precise, decimal-safe position sizing even for ultra-low-priced tokens.
This indicator is designed for crypto position sizing and stop calculation using ATR-based risk management. It helps traders automatically determine the stop price, per-unit risk, and optimal position size based on a fixed risk amount in USDT.
🔧 Core Logic
ATR Length (Daily RMA) — calculates the daily Average True Range (ATR) using RMA smoothing.
ATR Multiplier (2.1× default) — defines how far the stop is placed from the daily high.
Stop Price (for Longs) = Daily High − ATR × Multiplier
Per-Unit Risk = (Entry − Stop) × Point Value
Position Size = Risk Amount ÷ Per-Unit Risk
Automatically handles decimal precision for micro-priced crypto assets (e.g., PEPE, SHIB).
Includes safeguards for minimum size and maximum position caps.
💡 Features
Uses Daily ATR without lookahead (no repainting).
Dynamically switches between current and previous ATR for stable results when the daily bar isn’t yet confirmed.
“Snap to tick” ensures stop prices align with the symbol’s tick size.
Table display summarizes ATR, stop price, per-unit risk, total risk, size, and bet amount.
Optional stop label on the chart for visual clarity.
🧮 Output Table
Metric Description
ATR(10) Daily RMA-based ATR
ATR used Chosen ATR (current or previous)
Stop Calculated stop price
Per-unit Risk per coin/unit
Risk Total risk in USDT
Size Optimal position size
Bet Total position value (Entry × Size)
🧠 Ideal For
Crypto traders who use fixed-risk ATR strategies and need precise, decimal-safe position sizing even for ultra-low-priced tokens.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.