SmartMA/README.md

128 lines
4.9 KiB
Text
Raw Permalink Normal View History

2025-07-20 08:53:18 +00:00
# SmartMA MT5
Context-Adaptive, Self-Explaining Moving Average for MetaTrader 5
2025-07-20 08:44:48 +00:00
2025-07-20 08:53:18 +00:00
by Steve Rosenstock
Open Source Project – https://forge.mql5.io/steverosenstock/SmartMA
2025-07-20 08:44:48 +00:00
---
2025-07-20 08:53:18 +00:00
## Tags
MT5 · indicator · moving-average · adaptive · context-aware · news · session · volatility · regime · open-source · trading · technical-analysis · forex · alerts · community
2025-07-20 08:44:48 +00:00
---
2025-07-20 08:53:18 +00:00
## About
2025-07-20 08:44:48 +00:00
2025-07-20 08:53:18 +00:00
**SmartMA MT5** is a professional, open-source indicator for MetaTrader 5 that redefines the classic Moving Average (MA) for modern markets:
2025-07-20 08:44:48 +00:00
2025-07-20 08:53:18 +00:00
- **Context-aware:** Adapts automatically to trading session (Asia, London, New York), economic news, volatility regime, and volume spikes
- **Self-explaining:** Shows real-time chart comments explaining *why* MA adapts its settings (e.g., "MA frozen during ECB news")
- **Dual Output:** Main SmartMA (context-driven) plus a "Ghost" MA line (shows how MA would look without news bars)
- **Dynamic risk band:** Overlays SmartATR-style band for stop and risk visualization
- **Fully documented, open code:** Made for traders, strategists, and developers
2025-07-20 08:44:48 +00:00
2025-07-20 08:53:18 +00:00
**SmartMA MT5 is built for anyone who wants real context and transparency from their moving averages—no more "blind" signals.**
2025-07-20 08:44:48 +00:00
---
2025-07-20 08:53:18 +00:00
## Features
2025-07-20 08:44:48 +00:00
2025-07-20 08:53:18 +00:00
- **Adaptive period & type:** EMA, SMA, or VWMA—selected live based on regime
- **Session detection:** Recognizes Asian, London, and NY market hours
- **News integration:** Detects and reacts to economic news (native MT5 calendar)
- **Volume-driven:** Faster response to high-volume bars
- **Trend/range regime switching:** Adjusts smoothing in real time
- **Ghost MA:** "What-if" line excluding news bars
- **Dynamic risk band:** ATR-style overlay for stops/targets
- **Self-explaining logic:** Chart comments detail current regime and MA behavior
- **Visual overlays:** Line color/thickness/style reflect market phase and context
- **Alerts:** Regime change, news freeze, and high volatility
- **100% open source:** Fully transparent, ready for your strategies, EAs, or extensions
2025-07-20 08:44:48 +00:00
---
2025-07-20 08:53:18 +00:00
## Repository
- Project page: [SmartMA on forge.mql5.io](https://forge.mql5.io/steverosenstock/SmartMA)
- Git URL: https://forge.mql5.io/steverosenstock/SmartMA.git
- Author: Steve Rosenstock
2025-07-20 08:44:48 +00:00
---
2025-07-20 08:53:18 +00:00
## Installation
1. Download `SmartMA.mq5` from this repository
2. Copy to your MetaTrader 5 `/MQL5/Indicators/` folder
3. Open MetaEditor, compile the indicator
4. Attach SmartMA to any chart – all timeframes and assets supported
2025-07-20 08:44:48 +00:00
2025-07-20 08:53:18 +00:00
---
2025-07-20 08:44:48 +00:00
2025-07-20 08:53:18 +00:00
## Inputs
2025-07-20 08:44:48 +00:00
2025-07-20 08:53:18 +00:00
| Name | Description | Default |
|----------------|------------------------------------------------------|---------------|
| MA_Period | Initial MA period (adaptive logic applies) | 20 |
| ATR_Period | Period for risk band (ATR overlay) | 14 |
| Use_Volume | Enable volume-weighted MA | true |
| Use_News | Enable economic news detection (native MT5 calendar) | true |
| Show_Risk_Band | Show ATR-style risk band overlay | true |
| Show_Ghost | Show "Ghost" MA (excludes news bars) | true |
| Enable_Alerts | Pop-up/sound alerts for regime/news changes | true |
2025-07-20 08:44:48 +00:00
---
2025-07-20 08:53:18 +00:00
## How SmartMA MT5 Works
2025-07-20 08:44:48 +00:00
2025-07-20 08:53:18 +00:00
- **Calculates adaptive MA** using EMA logic, adjusted live for volume, session, and regime
- **Detects market context:**
- Session (Asia, London, NY) and news via MT5’s economic calendar
- Changes color/thickness per regime (trend, range, news, etc.)
- **Shows chart comments:** Explains regime, period, session, news events—fully transparent
- **Overlays risk band:** ±ATR for stops and position sizing
- **Dual output:** Main MA (contextual), and "Ghost" MA (without news impact)
- **Alerts:** Pop-up (and/or sound) for regime switches, news freezes, and unusual volatility
2025-07-20 08:44:48 +00:00
---
2025-07-20 08:53:18 +00:00
## Example Output
2025-07-20 08:44:48 +00:00
2025-07-20 08:53:18 +00:00
- **Blue line:** Context-adaptive SmartMA
- **Gray line:** "Ghost" MA (excludes news bars)
- **Yellow band:** Risk overlay (ATR-based)
- **Chart comment:** Explains current context (session, regime, news, period, etc.)
- **Alerts:** Real-time notifications on key context shifts
2025-07-20 08:44:48 +00:00
---
2025-07-20 08:53:18 +00:00
## For Developers
2025-07-20 08:44:48 +00:00
2025-07-20 08:53:18 +00:00
- Code is modular and fully commented—ready for custom regimes, overlays, and integration in EAs
- Add your own context profiles, visual themes, or alert logic
- Forks, pull requests, bug reports, and suggestions are very welcome!
2025-07-20 08:44:48 +00:00
---
2025-07-20 08:53:18 +00:00
## Repository
2025-07-20 08:44:48 +00:00
2025-07-20 08:53:18 +00:00
https://forge.mql5.io/steverosenstock/SmartMA
https://forge.mql5.io/steverosenstock/SmartMA.git
2025-07-20 08:44:48 +00:00
---
## License
2025-07-20 08:53:18 +00:00
MIT License – Free for all personal, professional, and commercial use.
2025-07-20 08:44:48 +00:00
---
## About the Author
Developed and maintained by **Steve Rosenstock**
2025-07-20 08:53:18 +00:00
If you like this project or have ideas for improvements, your contribution is always welcome!
2025-07-20 08:44:48 +00:00
---
2025-07-20 08:53:18 +00:00
**SmartMA MT5 – The open-source, context-driven Moving Average for serious MetaTrader traders.
Don't follow the herd—trade with context!**