Visual Test Annotator
Watching a Strategy Tester Visual mode replay normally tells you that a trade happened, not why the ten bars before it didn't. This EA closes that gap. The underlying strategy - a fast/slow MA cross filtered by spread, a trading-session window and an RSI trend filter - is deliberately plain; it exists to generate signals for the annotation layer to explain, not to be a strong system on its own. Every signal bar runs through a fixed, ordered chain of filters: spread, session hour, then RSI direction, then whether automated trading is even enabled. The FIRST filter that fails is the one reported, both in an on-chart Comment block and as a small text object anchored to that exact bar, so scrubbing back through a Visual mode run shows a readable trail of "cross happened, RSI blocked it" or "cross happened, spread too wide" rather than a gap with no explanation. Bars that pass every filter get an entry marker instead. Objects are prefixed and cleaned up in OnDeinit. Notes and limitations - The strategy itself (MA cross + RSI + session + spread) is a teaching vehicle for the annotation layer, not a tuned system - do not expect it to be profitable out of the box. - Only one position at a time; a fresh signal while already in a position is logged as "managed to its own stop", not acted on. - Text objects accumulate for the length of the run; on a very long backtest with frequent signals this can add many objects. Turn off InpDrawRejections for long unattended runs. - No hardcoded contract size; lot sizing is fixed (InpFixedLots) and normalised to the symbol's MODE_LOTSTEP/MIN/MAXLOT.
Expert advisor · MT4 · v1.0 · Free
About Visual Test Annotator
Visual Test Annotator is an expert advisor (trading robot) for MetaTrader 4 based on RSI, Moving Average and ATR. It trades only in the hours you set (time filter). It has 17 settings, such as Fast ma period, Slow ma period and Ma method. MQL source code included.
Files in the download: VisualTestAnnotator.ex4, VisualTestAnnotator.mq4, VisualTestAnnotator.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 |
|---|---|---|
| Fast ma period | 10 | Fast MA period |
| Slow ma period | 30 | Slow MA period |
| Ma method | MODE_EMA | MA method (0 SMA,1 EMA,2 SMMA,3 LWMA) |
| Rsi period | 14 | RSI period used as a trend filter |
| Rsi long floor | 50.0 | RSI must be above this to allow a long |
| Rsi short ceil | 50.0 | RSI must be below this to allow a short |
| Max spread pips | 3.0 | Reject signals when spread exceeds this, in pips |
| Session start hour | 0 | Trading session start hour, server time (0-23) |
| Session end hour | 23 | Trading session end hour, server time (0-23), inclusive |
| Atr stop multiple | 2.0 | Stop distance, ATR multiples |
| Atr period | 14 | ATR period for the stop |
| Fixed lots | 0.10 | Fixed lot size |
| Magic number | 20260413 | Magic number for orders opened by this EA |
| Slippage pips | 3 | Slippage tolerance, in pips |
| Max retries | 5 | Order-send attempts before giving up |
| Retry wait ms | 500 | Pause between attempts, milliseconds |
| Draw rejections | true | Draw a marker + reason for every rejected signal |
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: RSI · Moving Average · Buy/Sell Arrows · Trend · Trading Sessions · Time Filter · ATR · MT4 Expert Advisor · MQL4 Source Code