OPEN-SOURCE SCRIPT
ATR x Trend x Volume Signals

ATR x Trend x Volume Signals is a multi-factor indicator that combines volatility, trend, and volume analysis into one adaptive framework. It is designed for traders who use technical confluence and prefer clear, rule-based setups.
🎯 Purpose
This tool identifies high-probability market moments when volatility structure (ATR), momentum direction (CCI-based trend logic), and volume expansion all align. It helps filter out noise and focus on clean, actionable trade conditions.
⚙️ Structure
The indicator consists of three main analytical layers:
1️⃣ ATR Trailing Stop – calculates two adaptive ATR lines (fast and slow) that define volatility context, trend bias, and potential reversal points.
2️⃣ Trend Indicator (CCI + ATR) – uses a CCI-based logic combined with ATR smoothing to determine the dominant trend direction and reduce false flips.
3️⃣ Volume Analysis – evaluates volume deviations from their historical average using standard deviation. Bars are highlighted as medium, high, or extra-high volume depending on intensity.
💡 Signal Logic
A Buy Signal (green) appears when all of the following are true:
• The ATR (slow) line is green.
• The Trend Indicator is blue.
• A bullish candle closes above both the ATR (slow) and the Trend Indicator.
• The candle shows medium, high, or extra-high volume.
A Sell Signal (red) appears when:
• The ATR (slow) line is red.
• The Trend Indicator is red.
• A bearish candle closes below both the ATR (slow) and the Trend Indicator.
• The candle shows medium, high, or extra-high volume.
Only one signal can appear per ATR trend phase. A new signal is generated only after the ATR direction changes.
❌ Exit Logic
Exit markers are shown when price crosses the slow ATR line. This behavior simulates a trailing stop exit. The exit is triggered one bar after entry to prevent same-bar exits.
⏰ Session Filter
Signals are generated only between the user-defined session start and end times (default: 14:00–18:00 chart time). This allows the trader to limit signal generation to active trading hours.
💬 Practical Use
It is recommended to trade with a fixed risk-reward ratio such as 1 : 1.5. Stop-loss placement should be beyond the slow ATR line and adjusted gradually as the trade develops.
For better confirmation, the Trend Indicator timeframe should be higher than the chart timeframe (for example: trading on 1 min → set Trend Indicator timeframe to 15 min; trading on 5 min → set to 1 hour).
🧠 Main Features
• Dual ATR volatility structure (fast and slow)
• CCI-based trend direction filtering
• Volume deviation heatmap logic
• Time-restricted signal generation
• Dynamic trailing-stop exit system
• Non-repainting logic
• Fully optimized for Pine Script v6
📊 Usage Tip
Best results are achieved when combining this indicator with additional technical context such as support-resistance, higher-timeframe confirmation, or market structure analysis.
📈 Credits
Inspired by:
• ATR Trailing Stop by Ceyhun
• Trend Magic by Kivanc Ozbilgic
• Heatmap Volume by xdecow
🎯 Purpose
This tool identifies high-probability market moments when volatility structure (ATR), momentum direction (CCI-based trend logic), and volume expansion all align. It helps filter out noise and focus on clean, actionable trade conditions.
⚙️ Structure
The indicator consists of three main analytical layers:
1️⃣ ATR Trailing Stop – calculates two adaptive ATR lines (fast and slow) that define volatility context, trend bias, and potential reversal points.
2️⃣ Trend Indicator (CCI + ATR) – uses a CCI-based logic combined with ATR smoothing to determine the dominant trend direction and reduce false flips.
3️⃣ Volume Analysis – evaluates volume deviations from their historical average using standard deviation. Bars are highlighted as medium, high, or extra-high volume depending on intensity.
💡 Signal Logic
A Buy Signal (green) appears when all of the following are true:
• The ATR (slow) line is green.
• The Trend Indicator is blue.
• A bullish candle closes above both the ATR (slow) and the Trend Indicator.
• The candle shows medium, high, or extra-high volume.
A Sell Signal (red) appears when:
• The ATR (slow) line is red.
• The Trend Indicator is red.
• A bearish candle closes below both the ATR (slow) and the Trend Indicator.
• The candle shows medium, high, or extra-high volume.
Only one signal can appear per ATR trend phase. A new signal is generated only after the ATR direction changes.
❌ Exit Logic
Exit markers are shown when price crosses the slow ATR line. This behavior simulates a trailing stop exit. The exit is triggered one bar after entry to prevent same-bar exits.
⏰ Session Filter
Signals are generated only between the user-defined session start and end times (default: 14:00–18:00 chart time). This allows the trader to limit signal generation to active trading hours.
💬 Practical Use
It is recommended to trade with a fixed risk-reward ratio such as 1 : 1.5. Stop-loss placement should be beyond the slow ATR line and adjusted gradually as the trade develops.
For better confirmation, the Trend Indicator timeframe should be higher than the chart timeframe (for example: trading on 1 min → set Trend Indicator timeframe to 15 min; trading on 5 min → set to 1 hour).
🧠 Main Features
• Dual ATR volatility structure (fast and slow)
• CCI-based trend direction filtering
• Volume deviation heatmap logic
• Time-restricted signal generation
• Dynamic trailing-stop exit system
• Non-repainting logic
• Fully optimized for Pine Script v6
📊 Usage Tip
Best results are achieved when combining this indicator with additional technical context such as support-resistance, higher-timeframe confirmation, or market structure analysis.
📈 Credits
Inspired by:
• ATR Trailing Stop by Ceyhun
• Trend Magic by Kivanc Ozbilgic
• Heatmap Volume by xdecow
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
