OPEN-SOURCE SCRIPT
ATR-Multiple from 50SMA

ATR-Multiple from 50SMA is a momentum extension indicator that measures how far price has traveled from the 50-day simple moving average, expressed as a multiple of the Average True Range (ATR). This normalized approach provides a volatility-adjusted view of price extension, making it comparable across different stocks and market conditions. The indicator displays as a histogram with intuitive color-coded zones: values below zero indicate price is trading under the 50SMA, the 0-4 range (green) represents optimal entry territory, 4-7 (yellow) signals it's time to prepare for profit-taking, 7-10 (orange) marks the profit-taking threshold where positions should be actively managed, and above 10 (red) indicates extreme extension where risk is elevated and new entries are typically unwise. Choose between smooth gradient colors or distinct step-based coloring to match your visual preference. Reference lines at 0, 4, 7, and 10 provide clear visual boundaries for each zone. By default, calculations use daily timeframe data regardless of your chart timeframe, ensuring consistent readings—though this can be toggled off for timeframe-specific analysis. Built-in alert conditions notify you when price reaches profit-taking (7+) or extreme extension (10+) levels. Ideal for swing traders and position traders looking to time entries, manage risk, and avoid chasing overextended moves.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội Quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội Quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.