Volatility Scaled Momentum System
A plain "biggest movers" momentum scanner is misleading across instruments with different typical volatility: a 150-pip move on a naturally volatile pair and a 40-pip move on a quiet one can represent the same underlying strength, or the opposite, and raw pips or percent cannot tell them apart. This EA scores every candidate symbol as score = (Close[1] - Close[1 + InpMomentumBars]) / ATR(InpAtrPeriod) which expresses the InpMomentumBars-bar move in units of "how many ATRs", a common, size-independent scale that a raw price-change ranking does not have. The InpTopN symbols with the largest |score| get a position in the score's own direction; a symbol that drops out of the top N on a later scan, or whose score flips sign, has its position closed on that same scan. This is a single EA managing a whole basket from one chart, not one instance per symbol - every order is sent with its target symbol passed explicitly to OrderSend, never the chart's own Symbol(), and every position lookup filters the order pool by that same explicit symbol plus this EA's magic number so it never touches a position on a different symbol or opened by something else. Notes and limitations A symbol newly added to Market Watch needs its history to sync before it produces a usable score; the EA calls SymbolSelect(symbol, true) to start that sync as early as possible but will simply skip a symbol on any scan where its history is not ready yet rather than blocking. There is no explicit take-profit; a ranked position is held until it drops out of the top N or its score flips sign, so the effective exit timing depends entirely on how the basket re-ranks over time, not a fixed target. InpRiskPercentEach is risked independently PER open slot, not shared across the basket - with InpTopN positions open simultaneously, total basket risk can reach roughly InpTopN times InpRiskPercentEach of equity if every slot is filled and every stop is hit; size InpRiskPercentEach with that multiplication in mind. No correlation control exists between candidates - several highly correlated pairs (e.g. multiple EUR crosses) can occupy multiple ranked slots at once, effectively concentrating risk in one underlying move rather than diversifying it.
Expert advisor · MT5 · v1.0 · Free
About Volatility Scaled Momentum System
Volatility Scaled Momentum System is an expert advisor (trading robot) for MetaTrader 5 based on ATR. It can size trades from your balance and risk percent. It has 14 settings, such as Symbol list, Momentum bars and Atr period. MQL source code included.
Files in the download: VolScaledMomentumSystem.ex5, VolScaledMomentumSystem.mq5, VolScaledMomentumSystem.txt.
Trading robots can lose money. Check every setting and test on a demo account before using real funds.
Settings
| Setting | Default | What it does |
|---|---|---|
| Symbol list | EURUSD,GBPUSD,USDJPY,USDCHF,AUDUSD,USDCA | Comma-separated candidate symbols |
| Momentum bars | 20 | Lookback bars for the momentum leg of the score |
| Atr period | 14 | ATR period used to volatility-scale the momentum |
| Top n | 3 | Number of top-ranked symbols to hold at once |
| Min abs score | 0.5 | Minimum |score| (in ATRs) required to qualify at all |
| Scan every seconds | 60 | Minimum seconds between full basket re-scans |
| Use risk sizing | true | Size by percent risk to the stop instead of a fixed lot |
| Risk percent each | 0.5 | Percent of equity risked per open slot, when risk sizing is on |
| Fixed lots | 0.10 | Lot size when risk sizing is off, or as a sizing fallback |
| Atr mult sl | 2.0 | Stop loss distance, multiples of that symbol's ATR |
| Magic number | 33401 | Magic number for orders opened by this EA |
| Slippage pips | 3 | Slippage tolerance, in pips |
| Max retries | 5 | Attempts per trade action before giving up |
| Retry wait ms | 500 | Pause between attempts, milliseconds |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Experts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
- Test it first on a demo account or in the Strategy Tester.
Tags: ATR · Momentum · Dashboards & Scanners · Multi-Currency · Risk & Lot Size · MT5 Expert Advisor · MQL5 Source Code