Plan Versus Execution Ghost
Most traders believe they follow their plan more closely than they actually do. The gap between "what my rules say" and "what I actually did" is usually invisible, because the plan lives in the trader's head or a written checklist and the execution lives in the account history, and nothing puts the two side by side on the same chart. This indicator does exactly that: it draws pale, dotted "ghost" arrows at every point a simple, configurable rule would have signalled an entry, and solid arrows at every point the trader's own order history shows a real entry on the same symbol - both on the same timeline, so any late entry, early entry, skipped signal, or entirely off-plan trade is visible at a glance instead of requiring a manual side-by-side review of a trading journal against a chart. The plan side is deliberately a plain two-input moving average cross, not an attempt to encode any one trader's full discretionary rulebook. The point of the tool is to make ANY written rule's drift from actual behaviour visible, and a moving average cross is the simplest rule that still produces a genuine, checkable timestamp per signal - swap the fast/slow periods to roughly proxy a real system's timing if the exact indicator differs, or treat the ghost markers as a stand-in baseline for whatever the real rule is meant to be. Ghost signals are computed only from fully closed bars, never the forming one, so the plan side never repaints - a signal drawn today stays exactly where it was drawn tomorrow. Actual execution markers are pulled directly from both the open order pool and, optionally, full account history, filtered to the chart's own symbol and an optional magic number so a mixed manual/EA account can isolate one system's trades from the rest. Notes and limitations - The plan side is a generic MA cross proxy, not a re-implementation of any specific trader's or EA's real rules - treat drift measured against it as directional evidence, not a precise number. - Recomputed once per new bar, not every tick, since this is a retrospective comparison tool rather than a live signal generator; redrawing the whole lookback window on every tick would add object churn with no visible benefit. - Balance and credit history rows are excluded from the actual-execution side since they carry no open price to plot. - All markers are chart arrow objects, prefixed and removed cleanly in OnDeinit.
Indicator · MT5 · v1.0 · Free
About Plan Versus Execution Ghost
Plan Versus Execution Ghost is an indicator for MetaTrader 5 based on Moving Average. It draws buy and sell arrows on the chart and can alert you with a pop-up, sound, email or push message. It has 11 settings, such as Fast ma period, Slow ma period and Ma method. MQL source code included.
Files in the download: PlanVersusExecutionGhost.ex5, PlanVersusExecutionGhost.mq5, PlanVersusExecutionGhost.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Fast ma period | 10 | Fast MA period (plan side) |
| Slow ma period | 30 | Slow MA period (plan side) |
| Ma method | MODE_EMA | MA method used by both averages |
| Lookback bars | 500 | How many recent bars to compare |
| Magic filter | -1 | Only compare against trades with this magic number, -1 = all |
| Include closed | true | Include closed trades from history, not just currently open ones |
| Arrow gap | 15 | Vertical gap between price and the arrow, in points x10 |
| Ghost buy color | clrDeepSkyBlue | Ghost (plan) buy signal colour - pale/translucent look |
| Ghost sell color | clrLightSalmon | Ghost (plan) sell signal colour |
| Real buy color | clrLime | Actual executed buy colour |
| Real sell color | clrRed | Actual executed sell colour |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Moving Average · Buy/Sell Arrows · Alerts · MT5 Indicator · MQL5 Source Code