STRATEGIES | ||
CHANGELOG.md | ||
README.md | ||
SmartATR.mq5 |
SmartATR MT5
Adaptive, Volume & News-Weighted ATR Indicator for MetaTrader 5
by Steve Rosenstock
Open Source Project – https://forge.mql5.io/steverosenstock/SmartATR
Tags
MT5 · indicator · volatility · ATR · adaptive · news · volume · alerts · open-source · trading · technical-analysis · forex · context · community
About
SmartATR MT5 is a next-generation, open-source volatility indicator for MetaTrader 5 that upgrades the classic Average True Range (ATR) for modern traders:
- Adaptive period: Automatically adjusts ATR length to market regime (volatile = faster, calm = smoother)
- Volume weighting: True Range is weighted by tick volume to emphasize real price moves
- News detection: Bars with medium/high-impact economic events are detected using native MT5 calendar
- Visual overlays: News bars are highlighted directly in the indicator window
- Pro-level alerts: Real-time pop-up and sound alerts when volatility spikes
- Fully documented, open code: Ideal for risk management, strategy design, and learning
SmartATR MT5 is built for professional, transparent, and community-driven trading.
No more “blind” volatility measures—see what the market really does!
Features
- Adaptive ATR period: Period shortens/lengthens with market volatility
- Volume weighting: Counts only significant, high-volume true ranges
- News detection: Bars with medium/high-impact news are flagged (native MT5 calendar)
- Chart overlay: Highlights news events for instant visual reference
- Pop-up & sound alerts: Notified instantly when ATR exceeds defined threshold
- Modular, commented code: Made for further extension and automation
- Open source: For real traders, strategists, and developers
Repository
- Project page: SmartATR on forge.mql5.io
- Git URL: https://forge.mql5.io/steverosenstock/SmartATR.git
- Author: Steve Rosenstock
Installation
- Download
SmartATR.mq5
from this repository - Copy the file into your MetaTrader 5
/MQL5/Indicators/
folder - Open MetaEditor, compile the indicator
- Attach SmartATR to any chart (all asset classes and timeframes supported)
Inputs
Name | Description | Default |
---|---|---|
ATR_Period | Initial ATR period (adaptive logic applies) | 14 |
Adaptive_Mode | Enable adaptive period adjustment | true |
Min_Period | Minimum ATR period (adaptive mode) | 7 |
Max_Period | Maximum ATR period (adaptive mode) | 28 |
Volume_Filter | Enable volume weighting of True Range | true |
News_Filter | Enable economic news bar detection (MT5 calendar) | true |
Alert_Threshold | Multiplier for ATR alerts (spike vs. mean) | 2.0 |
Enable_Alerts | Enable pop-up & sound alerts for high volatility | true |
How SmartATR MT5 Works
- ATR calculation: EMA-style smoothing of True Range
- Adaptive logic: Period shortens in high volatility, lengthens in low volatility
- Volume weighting: True Range is weighted by recent tick volume
- News detection: Flags bars with economic news using the MT5 calendar API
- Alerts: Pop-up (and/or sound) if ATR exceeds a multiple of the rolling average
Example Output
- Blue line: SmartATR value (real-time volatility)
- Red/orange bars: Overlay on bars with news events (impact: medium/high)
- Alerts: Pop-up and/or sound on abnormal volatility
For Developers
- Code is modular, clear, and fully commented for custom overlays, alerts, and more
- Hooks for integrating into your EAs, strategies, and trading dashboards
- Forks, pull requests, bug reports, and suggestions always welcome!
Repository
https://forge.mql5.io/steverosenstock/SmartATR
https://forge.mql5.io/steverosenstock/SmartATR.git
License
MIT License – Free for all personal, professional, and commercial use.
About the Author
Developed and maintained by Steve Rosenstock
If you like this project or have ideas for improvements, your contribution is always welcome!
SmartATR MT5 – The open-source, adaptive volatility tool for serious MetaTrader traders.
Know your risk. Trade with context!