Session Range Desk is an educational, source-available session-range breakout Expert Advisor for MetaTrader 5 hedging accounts. It combines a range filter, stop-distance position sizing and a chart panel. Copies on different symbols can display a shared desk view through terminal global variables. It uses no grid, martingale or averaging scheme.
At the first eligible tick at or after the configured server start time, the EA takes the highest high and lowest low of the previous LookbackCandles completed bars on the chart timeframe. This is a trailing-bar range, not a continuously accumulated opening session. If its width is outside the configured ATR band, that day's signal is skipped. Otherwise, price touching the boundary or a completed bar closing beyond it can trigger a market order. The opposite range edge is supplied as the stop. The intended limit is one successful entry per symbol per server day during uninterrupted operation.
Optional management includes an R-multiple target, break-even and partial close. R refers to the initial entry-to-stop distance. At the configured end time, the EA attempts to close its matching position on an incoming tick. Execution remains subject to the broker and available prices.
Place SessionRangeDesk.mq5 under MQL5/Experts and compile it in MetaEditor. Only the standard Trade, PositionInfo, SymbolInfo and Canvas include files supplied with MetaTrader 5 are needed. Begin in the Strategy Tester and on a hedging demo account. The supplied screenshot illustrates the panel on a USDJPY M15 custom-symbol test; it is not a recommended production preset or proof of profitability. No optimized set files are distributed.
This release is a programming example, not a certified account-protection system. The desk bus is not an atomic cross-chart risk reservation: simultaneous signals, stale heartbeats, volume rounding and execution costs can make actual exposure differ from the threshold. It does not enforce account-wide equity or third-party prop-firm rules. Single-symbol optimization does not validate multi-chart coordination.
The day-end close is a tick-driven attempt. Version 4.01 marks the day-end action complete even if the broker rejects that close, so it must not be relied upon as a guaranteed flattening mechanism. Restart recovery does not establish a persistent once-per-day entry lock for all situations. Test these failure modes before considering unattended use. Netting partial-close behavior is not supported by this release.
Local regression tests compared trade records with graphics enabled and disabled, and the stored standalone compilation log reports zero errors and zero warnings. These checks are not live or real-tick performance validation. Earlier synthetic cost assumptions were corrected during research; no historical profit, drawdown or speed claims are made in this publication. Broker-specific spread, commission, swap, slippage, volume steps and stop restrictions require separate checks.
AI tools assisted code revision, research review and preparation of this description. The source and limitations are provided for inspection and testing; no return, safety or platform acceptance is guaranteed. 
Change in State of Delivery
Concept: Identifies market microstructure turning points based on ICT/SMC principles.
Order Block Detector
Detects order blocks — the last opposing candle before an impulsive move that breaks market structure — and draws them as zones that extend live until price returns and mitigates them. Structure breaks and mitigation are both evaluated only on closed bars, so nothing repaints.
Position Peak Logger - how far your trades actually travelled, in R
Records the maximum favourable and adverse excursion of every position in R multiples and writes one CSV row per closed trade.
TradeHistoryLogger
Exporting your deal history is easy and a dozen scripts already do it..