Gate Status Light
Checklists work only if they get checked. This turns a short list of pre-trade conditions into a single glance: one light, green means every enabled gate currently passes, red means at least one does not - and the reasons are spelled out underneath rather than left for the trader to work out, because "it's red" without a reason just trains people to ignore the light. Each gate is independently enableable so the panel can be trimmed to whatever a particular trader actually checks before entering - some want a spread ceiling and nothing else, others want the full session/weekday/equity/position-count set. Every gate is re-evaluated fresh on each tick and on a five-second timer, so the light never shows a stale state on a quiet symbol. This is a passive display only - it does not block orders, modify anything, or place trades. It answers "should I be trading right now" so the trader can decide, rather than trying to enforce the decision for them. Notes and limitations The open-position count only counts market orders (OP_BUY/OP_SELL) on the account the chart is logged into, not pending orders, and is not filtered by symbol or magic number - it is a whole-account exposure count by design, matching how most traders think about "how many trades am I already in." This is read-only. It does not stop the Order dialog from opening, does not reject a manually placed trade, and has no effect on any EA running on the same or other charts. Wiring an EA to actually refuse trades on a red light would need its own implementation reading the same conditions independently. The spread gate reads the live MarketInfo spread for the CHART symbol only, not every symbol a multi-symbol strategy might trade.
Indicator · MT5 · v1.0 · Free
About Gate Status Light
Gate Status Light is an indicator for MetaTrader 5. It has 19 settings, such as Use spread gate, Max spread pips and Use session gate. MQL source code included.
Files in the download: GateStatusLight.ex5, GateStatusLight.mq5, GateStatusLight.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Use spread gate | true | Enable maximum spread gate |
| Max spread pips | 3.0 | Maximum allowed spread, pips |
| Use session gate | true | Enable trading-hours gate |
| Session start hour | 7 | Session start hour, server time (0-23) |
| Session end hour | 21 | Session end hour, server time (0-23) |
| Use weekday gate | true | Enable weekday gate |
| Allow monday | true | |
| Allow tuesday | true | |
| Allow wednesday | true | |
| Allow thursday | true | |
| Allow friday | true | |
| Use equity floor gate | true | Enable equity floor gate |
| Equity floor | 0.0 | Minimum equity to allow trading, 0 = disabled |
| Use position cap gate | true | Enable open-position count gate |
| Max open positions | 3 | Maximum simultaneous open positions across all symbols |
| Use trade allowed gate | true | Enable terminal/account trade-allowed gate |
| Panel x | 20 | Panel X offset, pixels |
| Panel y | 30 | Panel Y offset, pixels |
| Light radius | 26 | Light circle radius, pixels (drawn as a filled square proxy) |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 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: Trading Sessions · MT5 Indicator · MQL5 Source Code