Ghost Scenario Projection
Planning a trade or explaining a scenario to someone else often means sketching "if this keeps going the way it has" or "here's the range this could realistically land in" by hand, on top of a screenshot, or verbally. This tool draws that sketch mechanically instead: a row of faint rectangles beyond the current bar showing one of three simple, explicit rules extrapolated forward. Flat continuation projects the current close forward unchanged - the "nothing happens" baseline. Linear trend measures the slope over a lookback window and projects that same rate of change forward bar by bar - the "if the recent move just continues" scenario. The ATR fan instead widens symmetrically around the current close, with the half-width scaled by the square root of how many bars ahead the projection sits, matching the way volatility genuinely compounds over multiple periods rather than growing in a straight line - the "here is a plausible range, not a specific path" scenario. None of the three scenarios predicts anything. Each is a stated, visible rule applied mechanically to the current bar; the value is in having a shared, precise visual to point at during a planning conversation, not in any claim about what price will actually do. Notes and limitations - This is a planning aid, not a forecast. No scenario here has any predictive claim - each is a stated mechanical rule, and the chart labels it as a "ghost" projection deliberately to keep that clear. - The trend scenario's slope is a simple two-point measurement (current close vs. the close InpTrendLookback bars back), not a fitted regression - a single large move at either end of the lookback window can swing the projected slope noticeably. - The ATR fan's sqrt(step) scaling assumes roughly independent, similarly-sized moves bar to bar, the same simplifying assumption behind most volatility-scaling formulas - real markets can trend or cluster in ways that make the fan too narrow or too wide in practice. - Ghost boxes are chart objects only; they do not affect any buffer, are not readable by another program via iCustom, and never repaint historical bars - only the drawn objects beyond the current bar are touched. - The colour "opacity" input is a width proxy, not real transparency - MQL4 chart objects do not support an alpha channel.
Indicator · MT5 · v1.0 · Free
About Ghost Scenario Projection
Ghost Scenario Projection is an indicator for MetaTrader 5 based on ATR. It has 9 settings, such as Scenario, Projection bars and Trend lookback. MQL source code included.
Files in the download: GhostScenarioProjection.ex5, GhostScenarioProjection.mq5, GhostScenarioProjection.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Scenario | GHOST_TREND | Which scenario to project |
| Projection bars | 10 | How many bars ahead to project |
| Trend lookback | 20 | Bars used to measure slope (GHOST_TREND only) |
| Atr multiplier | 2.0 | Fan half-width in ATR multiples (GHOST_ATRFAN only) |
| Atr period | 14 | ATR period (GHOST_ATRFAN only) |
| Ghost color | clrSilver | Ghost bar / fan colour |
| Ghost opacity | 60 | Fill style intensity proxy, 0-100 (higher = more solid look via width) |
| Show centre line | true | Draw a centre dotted line through the projection |
| Rebuild every bar | true | Rebuild the projection on every new bar (false = only on attach/param change) |
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: ATR · Buy/Sell Arrows · Trend · MT5 Indicator · MQL5 Source Code