Session Retest Levels for MT5
- インディケータ
- バージョン: 1.0
- アクティベーション: 5
Session and previous day levels from closed bars, with one break alert and one retest alert per level. No repaint.
What it does
Session Retest Levels draws the high and low of the Asian, London and New York sessions and of the previous day. It tells you when a closed bar breaks a level, and when price comes back to that level and holds on the break side.
It is an indicator. It does not trade, and it gives no signals or advice.
No repaint
- A level appears only after its session has closed. Its price never changes after that.
- Events use closed bars of one alert timeframe, so they do not change with the chart timeframe.
- Everything is worked out again from closed bars at start, with the same result.
London levels therefore appear at the London close, not during London. While a session is open, the panel shows its range so far, marked "forming". That number changes, so it is not drawn on the chart.
One alert per level
- Break: a closed bar closes past the level, plus a buffer you can set.
- Retest: after the break, within a number of closed bars you set, a closed bar touches the level within a tolerance and closes on the break side.
Each level gives at most one break alert and one retest alert, then it is silent. Past events are not alerted when the indicator starts, so no alerts pile up after a restart.
Alerts can be popup, push or email, each with its own switch. A message gives the symbol, level name, price, event and bar time.
Automatic summer time
Session times follow the clock in Tokyo, London and New York. The indicator reads your broker's offset from UTC while ticks are live, and works out the broker's summer time rule from history. The panel always shows the offset in use and whether it is automatic. You can also set the offsets by hand.
The panel
A small, display-only panel shows:
- the latest Asian range against the daily ATR, as a value and a percent
- the range so far of the open session, marked "forming"
- the current session, the next session and the time until it starts
- the broker offset
Symbols and timeframes
Levels come from closed M1 bars, so they are the same on every chart timeframe. If M1 history is short, the indicator uses the lowest timeframe that has enough bars and says so on the panel. A session with no bars gives no level and no error.
It was tested on XAUUSD, EURUSD, US500 and a custom BTCUSD symbol built from public 1-minute bars. Crypto was not tested on a broker's own symbol.
The colours are picked for a dark or light chart and can be edited.
Settings
| Group | Main inputs and defaults |
|---|---|
| Sessions | Each session on or off, start and end in local city time. Asian 08:00 to 15:00 Tokyo, London 08:00 to 17:00 London, New York 08:00 to 17:00 New York. |
| Previous day | On or off, broker day or New York 17:00 day, Sunday added to Friday, days of levels to draw (1 to 30, default 5). |
| Broker time zone | Automatic or Manual, winter offset (2), summer offset (3), summer time rule (United States dates, European dates or none). |
| Alerts | Alert timeframe, H4 or lower (M15). Popup on, push off, email off. Break buffer (0 points), retest window (24 closed bars), retest tolerance (5% of daily ATR), daily ATR period (14). |
| Look | Colours, line width, labels, panel on or off, panel corner and margin. |
Good to know
- Past levels and events do not guarantee anything about future price. This tool shows levels. Decisions stay with you.
- A level comes after its session closes, so it is never available during that session.
- After you attach it, check the Broker row on the panel. It should show your broker's offset from UTC.
- The Strategy Tester has no live broker offset, so the tester uses the manual values. Set them to your broker's offsets before testing.
- On a chart that is not a forex pair, the indicator reads a forex pair's history to work out the summer time rule. That pair may be added to your Market Watch.
- Push alerts need your MetaQuotes ID in the terminal options. Email alerts need your mail settings there.
What was tested
All tests ran on one demo server on UTC+2 in winter and UTC+3 in summer, on MetaTrader 5 build 6304.
- 56 Strategy Tester runs on 4 symbols, M1 to D1, with 0 error lines.
- Repaint check: every level and alert was logged as it happened, then rebuilt from history and compared. All 6 runs matched exactly, 6,770 items in total.
- Session times: 2,110 of 2,110 match the official time zone tables, including the weeks when US and EU clocks differ.
- Level prices: 684 of 684 match a recount from raw bars.
- Live demo chart: 38 alerts, no level alerted twice, and no repeat or backlog after a restart, a timeframe change or a reconnect.
- The panel fits in all 4 corners, on dark and light charts, at 100% and 150% Windows scaling.
What was not tested
- Real push and email delivery. Only the failure handling was tested. The 7-second send queue was read in the code, not tested against the real push limit.
- Popup window. Popups were counted from the terminal log. Nobody watched the window.
- 200% Windows scaling. It is expected to fit, but that is unverified.
- Other brokers, including fixed-offset brokers. Only one demo server was used.
- A real closed market. Only a forced temporary test build was used.
- A 3-month run in the visual tester. The long repaint runs were non-visual.
- Alert completeness on the live chart. The live alerts were not recounted against raw bars. The event logic was checked in the tester.
- An event during a connection loss. By the code it is marked and not sent late. This was not seen in a run.
- Attaching by hand. Live runs used saved charts, with 0 slow warnings in about 4 hours 10 minutes. When a test expert added the indicator to 16 charts, the terminal logged slow warnings and some alerts came up to about 6 minutes late. The exact cause is not proven. Adding it from an expert is not supported.
