Loading…

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

SettingDefaultWhat it does
Fast ma period10Fast MA period (the base signal)
Slow ma period30Slow MA period (the base signal)
Ma methodMODE_EMAMA method applied to both MAs
Applied pricePRICE_CLOSEPrice series both MAs are built on
Log file nameDecisionSnapshotRecorder.csvCSV log, in MQL4\Files\
Screenshot every barfalseScreenshot every evaluated bar, not only on-signal bars
Min seconds between shots60Minimum spacing between screenshots, to bound disk use
Screenshot width800Screenshot width in pixels
Screenshot height600Screenshot height in pixels

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 → Scripts.
  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 script onto a chart to run it once.

Download the PDF guide

Tags: Moving Average · Buy/Sell Arrows · Alerts · MT4 Expert Advisor · MQL4 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria