Vol Normalisation System
A bar whose true range blows out well beyond its recent average is a poor base rate for continuation. Most such bars are news or liquidity events that get partly retraced as range "normalises" back toward its recent mean, rather than the start of a sustained expansion. This system compares the range of the last closed bar to the average range of the InpRangeLookback bars before it (excluding the spike bar from its own baseline); once that ratio clears InpSpikeMultiple, it fades the direction the spike bar closed in. The stop sits beyond the spike bar's own extreme by a fraction of that same bar's range, and the target is a configurable reward:risk multiple of the resulting stop distance - both derived from the spike's actual size rather than a fixed pip value, so a small spike and a large spike each get a proportionate trade. A bar-count time-stop closes the position if neither level is reached within InpMaxHoldingBars, since a normalisation trade that still hasn't worked after that many bars has likely stopped being one. Notes and limitations - Trades one position at a time; a new spike is ignored while a trade from a previous spike is still open. - A market that is genuinely trending can produce a run of spike bars that keep extending rather than normalising - the time-stop bounds the damage but does not prevent a losing streak in that regime. - Range comparison uses simple High-Low per bar, not a smoothed volatility measure like ATR, so a single wide-wick bar with an otherwise ordinary body still counts as a spike. - Lot sizing uses MODE_TICKVALUE/MODE_TICKSIZE, not a hardcoded contract size.
Expert advisor · MT4 · v1.0 · Free
About Vol Normalisation System
Vol Normalisation System is an expert advisor (trading robot) for MetaTrader 4. It can size trades from your balance and risk percent. It has 12 settings, such as Range lookback, Spike multiple and Stop range frac. MQL source code included.
Files in the download: VolNormalisationSystem.ex4, VolNormalisationSystem.mq4, VolNormalisationSystem.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 |
|---|---|---|
| Range lookback | 20 | Bars used to compute the trailing average range (excludes the spike bar) |
| Spike multiple | 2.5 | Spike bar range must exceed average range by this multiple |
| Stop range frac | 0.50 | Stop distance beyond the spike extreme, as a fraction of the spike's own range |
| Target rr | 1.5 | Target distance as a multiple of the stop distance (reward:risk) |
| Max holding bars | 12 | Close the trade if neither stop nor target is hit within this many bars |
| Use risk sizing | true | Size by percent risk to the stop instead of a fixed lot |
| Risk percent | 1.0 | Percent of equity risked per trade, when risk sizing is on |
| Fixed lots | 0.10 | Lot size when risk sizing is off, or as a sizing fallback |
| Magic number | 35301 | 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 4 open File → Open Data Folder, then go to MQL4 → Experts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 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: News Trading · Risk & Lot Size · MT4 Expert Advisor · MQL4 Source Code