Loading…

Trade Replay Practice Tool

Practising discretionary entries on a chart that already shows the whole future is not practice, it is hindsight. This tool draws a solid mask rectangle over the chart starting just ahead of the newest bar, redrawn every tick so it always stays glued to "now" as the Strategy Tester's visual mode replays history. Buy, Sell and Close buttons let a trader take and manage practice positions against that masked chart exactly as they would live, and an End Session button closes everything still open and prints how the session actually went - trade count, win rate and net result. The one safety guarantee this tool makes is unconditional: sending an order is refused outright unless the program is running inside the Strategy Tester (IsTesting() on MQL4, MQLInfoInteger(MQL_TESTER) on MQL5). Attach it to a live or demo chart and the mask still works for looking at old charts blind, but every Buy and Sell click is rejected with a plain alert instead of quietly routing to a real account. Practice tools that can accidentally place a real order are the reason this rule exists as code, not just as advice in the description. Practice trades carry their own magic number so the session summary at the end only ever counts what this tool itself opened, never a position that happened to already be open on the account. Notes and limitations - Sending an order is refused unconditionally outside the Strategy Tester. This is enforced in code, not left as a suggestion - the tool cannot place a real order by mistake. - The mask is a chart object, not a data restriction - it hides the visual, but history for the masked bars is still loaded in the terminal. It is a practice aid against impulsive glancing ahead, not a cryptographic guarantee against looking. - Session statistics only include trades tagged with InpMagicNumber and closed after the EA was attached; anything already open on the account is left alone by Close All and excluded from the summary. - Requires AutoTrading enabled and IsTradeAllowed() true inside the Tester for practice trades to be accepted.

Expert advisor · MT5 · v1.0 · Free

About Trade Replay Practice Tool

Trade Replay Practice Tool is an expert advisor (trading robot) for MetaTrader 5. It has 6 settings, such as Practice lots, Stop loss pips and Take profit pips. MQL source code included.

Files in the download: TradeReplayPracticeTool.ex5, TradeReplayPracticeTool.mq5, TradeReplayPracticeTool.txt.

Trading robots can lose money. Check every setting and test on a demo account before using real funds.

Settings

SettingDefaultWhat it does
Practice lots0.10Lot size for every practice trade
Stop loss pips30Practice stop loss distance, in pips (0 = none)
Take profit pips60Practice take profit distance, in pips (0 = none)
Magic number20260820Magic number tagging every practice trade this session opens
Mask bars ahead1Bars ahead of "now" the mask starts covering
Mask colorclrWhiteSmokeMask colour - match it to your chart background

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Experts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 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: Buy/Sell Arrows · Trading Sessions · MT5 Expert Advisor · MQL5 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria