Decision Snapshot Recorder
A trading diary built only from trades actually taken cannot answer the question that matters most when reviewing a strategy: was the signal even there on the bars that got skipped? This EA closes that gap by evaluating a documented moving-average crossover on every new bar and writing one CSV row for every single evaluation - bar time, bid, ask, spread, both MA values and their prior-bar readings, and whether a BUY_CROSS, SELL_CROSS or no signal was present - regardless of outcome. On top of the log, it can capture a chart screenshot with WindowScreenShot at the moments that matter. By default a screenshot is only taken when the signal actually fires, throttled by a minimum spacing so a busy signal cannot flood the sandbox with images; InpScreenshotEveryBar switches this to capture every evaluated bar instead, for a complete visual record rather than a signal-only one. The base signal is deliberately simple - a two-MA crossover, read one and two bars back so the comparison never touches a still-forming bar - because the point of this tool is the recording discipline, not signal sophistication. Swap in any other signal logic and the same complete-record principle still applies. Notes and limitations - Only evaluates once per new bar, matching the crossover's own bar-close nature - it does not re-evaluate mid-bar. - The base signal is a plain two-MA crossover. It is a vehicle for the recording behaviour this tool demonstrates, not a strategy recommendation. - WindowScreenShot captures the chart as currently rendered on screen - templates, indicators and window size all affect what ends up in the PNG. A minimised or covered chart window can produce a blank or wrong capture. - This EA never places, modifies or closes any order.
Expert advisor · MT4 · v1.0 · Free
About Decision Snapshot Recorder
Decision Snapshot Recorder is a script for MetaTrader 4 based on Moving Average. It can alert you with a pop-up, sound, email or push message. It has 9 settings, such as Fast ma period, Slow ma period and Ma method. MQL source code included.
Files in the download: DecisionSnapshotRecorder.ex4, DecisionSnapshotRecorder.mq4, DecisionSnapshotRecorder.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Fast ma period | 10 | Fast MA period (the base signal) |
| Slow ma period | 30 | Slow MA period (the base signal) |
| Ma method | MODE_EMA | MA method applied to both MAs |
| Applied price | PRICE_CLOSE | Price series both MAs are built on |
| Log file name | DecisionSnapshotRecorder.csv | CSV log, in MQL4\Files\ |
| Screenshot every bar | false | Screenshot every evaluated bar, not only on-signal bars |
| Min seconds between shots | 60 | Minimum spacing between screenshots, to bound disk use |
| Screenshot width | 800 | Screenshot width in pixels |
| Screenshot height | 600 | Screenshot height in pixels |
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 → Scripts.
- 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 script onto a chart to run it once.
Tags: Moving Average · Buy/Sell Arrows · Alerts · MT4 Expert Advisor · MQL4 Source Code