First Test Time Tracker
Prior-day high and low are two of the most watched intraday reference levels, and how long they stay untested says something about the day's character: a level that is still untested well past its normal time often means the session is trending away from it, or that liquidity is thin. The naive version of this idea picks a fixed threshold, e.g. "alert after 4 hours untested" - but that number means something different on a symbol that typically tests its prior-day levels within an hour than on one that regularly runs the whole session without touching them. This tracker instead builds a rolling history of how many hours after each day's open the prior day's high and low were first touched, then ranks today's current untested age as a percentile within that history. The panel reports both levels' test status and their percentile, and colours the panel amber past the 80th percentile and red past the 95th - thresholds relative to the symbol's own behaviour, not an arbitrary clock reading that would misfire on a different instrument. A day where a level is never tested at all is scored as having reached that day's full elapsed span, so it still contributes a meaningful (long) sample to the history rather than being silently excluded, which would otherwise understate how often the level goes untested for that symbol. Notes and limitations - History is rebuilt once per day from visible chart bars, so it is bounded by how much history the terminal has actually downloaded for this symbol/period; a freshly opened chart may need more bars loaded before the full InpHistoryDays window is available. - "First test" is detected from bar High/Low reaching the prior day's level, at whatever timeframe the indicator is attached to - a lower timeframe gives finer test-time resolution than a higher one. - The percentile is a plain rank-based percentile, not a smoothed distribution fit; with fewer than 5 history days it is not shown at all rather than reported on too small a sample. - This is a read-only observational tool; it places no orders and sends no alerts.
Indicator · MT4 · v1.0 · Free
About First Test Time Tracker
First Test Time Tracker is an indicator for MetaTrader 4. It has 9 settings, such as History days, Daily open hour and Corner. MQL source code included.
Files in the download: FirstTestTimeTracker.ex4, FirstTestTimeTracker.mq4, FirstTestTimeTracker.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| History days | 60 | Number of completed days kept in the test-time history |
| Daily open hour | 0 | Server-time hour (0-23) the trading day is considered to start |
| Corner | 1 | Panel corner (0=TL,1=TR,2=BL,3=BR) |
| X offset | 10 | Panel horizontal offset in pixels |
| Y offset | 20 | Panel vertical offset in pixels |
| Font size | 9 | Panel text size |
| Text color | clrWhite | Normal text colour |
| Warn color | clrOrange | Colour when today's untested age exceeds the 80th percentile |
| Crit color | clrTomato | Colour when today's untested age exceeds the 95th percentile |
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: Alerts · Trend · Trading Sessions · MT4 Indicator · MQL4 Source Code