Entry Location Heat Map
Traders rarely pick entries uniformly at random, but the pattern in where and when those entries actually land is hard to see from a trade list. This panel builds a two-axis grid from your closed (and, optionally, open) trade history on the current symbol: columns group entries by hour of day (server time), rows group entries by where the entry price sat within the recent trading range at the time of entry, from the bottom decile to the top. Cell shading runs from cold (few entries) to hot (many entries), so a cluster - always buying near the top of the range in a particular hour window, for example - stands out immediately. Bucketing an entry's price requires a range to measure it against, and a single "today's range" is not enough over a long trade history on a trending instrument - an entry from two years ago and one from yesterday would not be comparable on one shared axis if the instrument has moved a long way since. Instead, each entry is scored against the InpRangeLookback bars of InpRangeTimeframe measured AROUND THAT ENTRY'S OWN TIME, so "top of the range" always means the range that existed when the trade was actually opened, keeping the row meaning stable across the whole history. This is deliberately a fixed pixel-grid panel, not objects overlaid on the price/time chart axes - a genuine price/time overlay would need to solve the same "whose range" problem directly on the chart, which is far messier than a panel grid with a documented axis definition. Notes and limitations An entry whose lookback range could not be measured (insufficient history on that symbol/timeframe around that entry's time) is skipped from the grid entirely rather than guessed at; the title's entry count reflects only entries that were actually placed. The grid is restricted to the chart's own symbol - run one instance per symbol to compare habits across instruments. The full grid is only rebuilt on a new closed bar (not every tick), since history changes rarely; it also rebuilds once on attach. This is a descriptive tool only - it draws no conclusions about whether a visible cluster is good or bad, that judgement is left to the trader.
Indicator · MT4 · v1.0 · Free
About Entry Location Heat Map
Entry Location Heat Map is an indicator for MetaTrader 4. It has 12 settings, such as Magic filter, Max history orders and Include open trades. MQL source code included.
Files in the download: EntryLocationHeatMap.ex4, EntryLocationHeatMap.mq4, EntryLocationHeatMap.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Magic filter | -1 | Only include orders with this magic number, -1 = include all |
| Max history orders | 2000 | Safety cap on closed orders scanned |
| Include open trades | true | Also include currently open trades' entries |
| Range timeframe | PERIOD_D1 | Timeframe used to measure "recent range" around each entry |
| Range lookback bars | 20 | Bars of InpRangeTimeframe looked back from each entry to build its range |
| Hour group size | 4 | Hours per column (e.g. 4 = six 4-hour columns covering the day) |
| Cell width | 26 | Pixel width of one grid cell |
| Cell height | 16 | Pixel height of one grid cell |
| Corner | CORNER_LEFT_UPPER | Panel corner |
| X offset | 10 | Horizontal offset, pixels |
| Y offset | 20 | Vertical offset, pixels |
| Font size | 7 | Cell/label font size |
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 → Indicators.
- 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 indicator from the Navigator onto a chart and adjust the settings.
Tags: Grid · MT4 Indicator · MQL4 Source Code