Dry Run Order Preview
The safest way to validate an EA's entry logic is to run the real code path and stop one line before the call that actually risks money. This tool does exactly that: click Preview Buy or Preview Sell and it computes lot size (fixed, or risk-percent using the symbol's own tick value and tick size scaled by the intended lot size - never a hardcoded contract size), the stop and target price, and checks the result against the broker's minimum stop and freeze distances, exactly as a live entry function would. It then prints the trade call it would have made, draws the three price levels on the chart, and stops there. This exists because the two most common ways an EA misbehaves live - silent broker rejection from a stop set too close, and a lot size that comes out wrong from a sizing formula - are both invisible until an order has already been sent. Previewing surfaces both before either one costs anything. Notes and limitations - Never sends, modifies or closes a trade under any input combination on either platform. It is a read-and-display tool only. - The previewed lot size and prices are computed from current market data at the moment of the click; they will differ from what a live entry sees a moment later as price moves. - Slippage in the printed call is a fixed illustrative 3 pips, not an input - this tool previews sizing and distance validation, not execution behaviour.
Expert advisor · MT4 · v1.0 · Free
About Dry Run Order Preview
Dry Run Order Preview is an expert advisor (trading robot) for MetaTrader 4. It can size trades from your balance and risk percent. It has 6 settings, such as Use risk sizing, Risk percent and Fixed lots. MQL source code included.
Files in the download: DryRunOrderPreview.ex4, DryRunOrderPreview.mq4, DryRunOrderPreview.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 |
|---|---|---|
| Use risk sizing | true | Preview risk-percent sizing instead of a fixed lot |
| Risk percent | 1.0 | Percent of equity risked, used only when risk sizing is on |
| Fixed lots | 0.10 | Lot size previewed when risk sizing is off |
| Stop loss pips | 50 | Stop loss distance, in pips |
| Take profit pips | 100 | Take profit distance, in pips (0 = none) |
| Magic number | 20260821 | Magic number the preview shows in the would-be OrderSend call |
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: Risk & Lot Size · MT4 Expert Advisor · MQL4 Source Code