SessionChannelExpansion
- Indicatori
- Versione: 1.0
- Attivazioni: 5
How to use: copy the file to MQL5/Indicators, compile it, and drag it onto the chart.
What it does
Sessions and time zones: Asia, London, and NY operate independently. There are four time modes: server time, UTC, local market time (Tokyo, London, NY, with automatic daylight saving time adjustment), and manual time zone. To convert to server time, it uses a configurable daylight saving time model (InpServerGMTStd and InpServerDST). Upon initialization, it compares this model with your terminal's actual offset and issues a warning in the Experts tab if there is a discrepancy.
Channel and slices: TOP, BOTTOM, and RANGE, with configurable fill and slices (2 to 50).
Expansion: levels based on multiples of the RANGE (configurable) and slice counts, including the time each level was reached.
Breakout: five confirmation methods, measured on the M1 timeframe by default to ensure precise timing regardless of the chart's timeframe.
Retracement: classifies each day as no breakout, no return, return, return with new expansion, or false breakout.
Panel, buttons, and statistics: a SESSION | RANGE | BREAK | EXPANSION | SLICES panel, buttons to show or hide each session, and a statistics panel for the last N days. The L/A, NY/L, and NY/A ratios appear on the panel (based on the last day where both sessions were fully formed) and as averages in the statistics panel.
No signals: the indicator only measures and plots data; it does not generate alerts or trade entries. The logic is organized into separate modules (time, analysis, statistics, plotting, interface).
Interpretation of specifications (please verify if this matches your requirements)
Channel formation: by default, the channel encompasses the entire session (formation = 0), and expansion is tracked for the subsequent 8 hours. If you want the channel to apply only to the first X minutes of the session, adjust InpFormAsia, InpFormLondon, and InpFormNY.
Standard times: Asia 09:00–17:00 (Tokyo), London 08:00–16:00, and NY 08:00–17:00 (all in local market time).
“Candle close above/below”: implemented as the entire candle body being outside the channel.
Unit: defaults to pips. To use points, change InpUnit.
False breakout: defined as a return to the channel within 60 minutes, with an expansion of up to 2 slices before the return. Both values are inputs.
