Loading…

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

SettingDefaultWhat it does
Fast ma period10Fast MA period
Slow ma period30Slow MA period
Ma methodMODE_EMAMA method (0 SMA,1 EMA,2 SMMA,3 LWMA)
Rsi period14RSI period used as a trend filter
Rsi long floor50.0RSI must be above this to allow a long
Rsi short ceil50.0RSI must be below this to allow a short
Max spread pips3.0Reject signals when spread exceeds this, in pips
Session start hour0Trading session start hour, server time (0-23)
Session end hour23Trading session end hour, server time (0-23), inclusive
Atr stop multiple2.0Stop distance, ATR multiples
Atr period14ATR period for the stop
Fixed lots0.10Fixed lot size
Magic number20260413Magic number for orders opened by this EA
Slippage pips3Slippage tolerance, in pips
Max retries5Order-send attempts before giving up
Retry wait ms500Pause between attempts, milliseconds
Draw rejectionstrueDraw a marker + reason for every rejected signal

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Experts.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
  6. Test it first on a demo account or in the Strategy Tester.

Download the PDF guide

Tags: RSI · Moving Average · Buy/Sell Arrows · Trend · Trading Sessions · Time Filter · ATR · MT4 Expert Advisor · MQL4 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria