Manual Backtest Practice Panel
- Utilities
-
Kazuma Uezono
MQL5 / MQL4 / Pine Script v6 developer and active trader.
Seller on the MQL5 Market (indicators for MT4/MT5).
Services:
- TradingView Pine Script to MT5/MT4 conversion (bar-by-bar matching, with tester report)
- MT4 to MT5 migration - Version: 1.2
Manual Backtest Panel is a free utility Expert Advisor for MetaTrader 5 for practising manual trading on historical data in the visual mode of the Strategy Tester. You start a visual test, watch the chart move and open and close trades yourself with the panel buttons. The panel calculates the lot from a risk % or uses a fixed lot, sets SL and TP, keeps your settings, and records every closed trade in a results table and in CSV and HTML files.
It is a practice tool, not a trading strategy. It gives no buy or sell signals, does not choose entries or exits and does not judge whether your method is good. The figures describe only the practice trades you made in the tester. Results in the tester differ from live trading, and past results, real or simulated, do not guarantee future results.
It works only in the visual mode of the Strategy Tester. On a live chart (real or demo account) it only shows the notice "Works in the Strategy Tester (visual mode) only." and never opens, closes or changes an order or a position. In the visual mode it trades only when you press the panel buttons. In the tester without visual mode (optimization, automatic checks) the panel is not used; the EA only opens small demonstration trades to show that it works: minimum lot, magic 26111399, at most one per day, buy and sell in turn, each with a stop loss and take profit and closed after about 3 hours. They are not a trading method, not a signal and not aimed at any market time (none are opened around the day change, when spreads are wide). The tester report then shows only these trades and is not a trading result; it can be a loss. These trades do not affect the panel's results, files or settings, and they are never opened in the visual mode or on a real or demo account.
Features
- Buttons BUY, SELL and CLOSE ALL. CLOSE ALL closes only the positions of this panel (chart symbol and the panel's magic number).
- Lot: risk % of balance (the lot is calculated from the distance to the SL and rounded down to the lot step) or a fixed lot. If the risk mode has no SL, the fixed lot is used and the panel says so.
- SL and TP in pips or as a price, chosen with buttons: up to 5 value buttons per row and << < > >> to step the value (<< and >> move 10 steps). 0 = no SL or no TP.
- SL or TP by clicking the chart: press "SL by click" or "TP by click", then click the chart at the price you want. Press Esc or the same button again to cancel. With an open position it moves the SL or TP of the open positions of this panel in the same direction; without a position it sets the value for the next order.
- "SL to entry" moves the SL of the open positions to the entry price when the price is far enough from the entry.
- Preview line: lot of the next order with the risk in % and money; open positions and floating P/L.
- Results of the closed trades of this panel: trades, win rate, net, profit factor, maximum drawdown, average R and a yearly table (latest 8 years on the panel, all years in the HTML).
- CSV and HTML are saved automatically after every closed trade; the "Export" button saves them at any time. The CSV has 32 columns: open and close, initial SL and TP, profit, commission, swap, net, pips, holding time, MAE and MFE (Maximum Adverse / Favorable Excursion: how far the price went against and in favour of the trade), risk money, R multiple and more.
- Settings are saved automatically when you change them and loaded at the next start: lot mode, unit, risk %, fixed lot and the SL/TP distances per symbol.
- Panel in English or Japanese (automatic from the terminal language).
Main Inputs
- Order size: Lot mode (Risk % / Fixed lot), Risk per trade (% of balance, 0.01 - 20, default 1), Fixed lot (default 0.10, also used when the risk mode has no SL), Risk % value buttons (InpRiskPre, default "0.25,0.5,1,2,3"), Fixed lot value buttons (InpLotPre, default "0.01,0.05,0.1,0.5,1").
- SL / TP for new orders: Input unit (pips / price), SL distance in pips (default 20, 0 = no SL), TP distance in pips (default 40, 0 = no TP), Step of the < > buttons (default 1 pip), SL value buttons (InpSlPre, default "0,10,20,30,50"), TP value buttons (InpTpPre, default "0,20,40,60,100"). Each value-button input takes 1 to 5 values separated by commas; they set the buttons and the values you start with.
- Settings file: Load the last saved settings at start (default ON; saved values replace the order size and SL/TP inputs, turn it OFF to start from the inputs), Auto-save CSV / HTML after each closed trade (default ON).
- Orders: Magic number (default 26111300; only positions with this number are handled), Max slippage (points), Order comment.
- Panel: Language, Panel X offset (InpX), Panel Y offset (InpY), Font size (InpFont, 7 - 16, default 9). Use them to move the panel or make it larger or smaller.
- 20 inputs in 5 groups.
How It Works
- Start: open the Strategy Tester, choose Manual Backtest Panel, the symbol, timeframe and dates, turn on visual mode and start. Use the panel on the visual chart.
- Speed: do not move the speed slider of the visual tester to the far right (maximum). At maximum the tester leaves almost no time to read the clicks and the buttons hardly react. One step below the maximum or slower works.
- Why buttons instead of typing: in the visual chart of the tester, text typed into input boxes and the dragging of lines do not reach an Expert Advisor (we checked this behaviour of MetaTrader 5). Values are therefore chosen with buttons, and the SL/TP lines cannot be dragged; use "SL by click" and "TP by click" instead.
- Clicks are read about every 0.1 second of real time. If you click while the tester chart is paused or stands still for a moment (for example while data is loaded around a year change), the click is handled when the test runs again, and an SL/TP set by a chart click is measured from the price at that moment. Check the value on the panel after the test runs again.
- Tooltips: when the mouse rests on a button for about half a second, MetaTrader 5 shows a small tooltip to the right of and below the cursor, and a click on that spot can be lost. The rows of the panel are spaced so that the button below is normally free; if a click does not react, move the mouse a little and click again.
- Price unit: values chosen with the value buttons stay distances and follow the price. The value box and the dashed line show them in the buy form (SL below, TP above), and the panel adds "SL/TP shown: buy". When you press SELL, SL and TP are calculated for the sell from the current price. A price fixed with < > or by a chart click stays at that price; it fits only one direction, and an order in the other direction is refused with a message (for example "SL must be above Ask"). In the pips unit the distances work for both directions.
- Pips: 1 pip = 10 points for all symbols on the panel (0.0001 on a 5-digit EURUSD, 0.01 on a 3-digit USDJPY). For other symbols the panel writes "pips(10pt)"; check the point size of the symbol. In the CSV the pips columns are filled only for symbols with 3 or 5 digits.
- Lot by risk: lot = balance x risk % / loss of one lot at the SL, rounded down to the lot step, so the real risk is the same or a little lower. If even the minimum lot is above your risk %, no order is sent and the panel shows the risk of the minimum lot.
- Statistics: net = profit + commission + swap; a win is net > 0. Profit factor = sum of winning nets / sum of losing nets, shown as "-" when there is no losing trade. Maximum drawdown = largest fall of the balance line built from closed trades, from the start balance (floating P/L is not included). R = net / money at risk to the initial SL (trades without SL have no R). MAE and MFE come from the ticks the tester gives the EA, so they depend on the tester's modelling mode. The yearly table uses the close time.
- Files: Common\Files\ManualBacktestPanel\ in the common data folder of the terminals. settings.txt holds the settings. Each test run gets its own folder Exports\<symbol>_<timeframe>_<test start date>_<number>\ with journal.csv and journal.html. Because the files are written after every closed trade, they remain even when you stop the test with the Stop button.
Notes and Limits
- A practice tool only: no signals, no advice, no forecast. Practice results depend on the price data, spread, commission and modelling mode of the test and differ from live trading (execution, slippage, emotions). Past results do not guarantee future results.
- Visual mode of the Strategy Tester only. On live charts the EA does not trade and writes no files.
- Do not use the maximum speed of the visual tester.
- On small screens (for example 1366 x 768) the lower part of the panel can extend below the chart. Then set InpFont to 7 or 8 and move the panel with InpX and InpY. The buttons and the main figures are in the upper part.
- Netting accounts have not been tested. We recommend a hedging account in the tester.
- One panel handles one symbol (the chart symbol) and only positions with its magic number.
- If the broker has a stop level or freeze level, SL/TP closer than that level are refused with a message on the panel.
- Each test run creates a new export folder; old folders are not deleted.
Compatibility and Support
- MetaTrader 5, Strategy Tester in visual mode. Any symbol and timeframe available in your tester. Tested on hedging accounts.
- No DLLs, no internet, no outside server. Files are written only in Common\Files\ManualBacktestPanel.
- Free.
- Support through MQL5 messages, reply within 3 business days: installation, settings, files and bug reports. We cannot suggest entries, exits, SL or TP levels, give market views or review your trades.
- No result of your trading is promised or implied.
- If the panel helps your practice, a short review helps other traders find it.
