Loading…

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

SettingDefaultWhat it does
Use spread gatetrueEnable maximum spread gate
Max spread pips3.0Maximum allowed spread, pips
Use session gatetrueEnable trading-hours gate
Session start hour7Session start hour, server time (0-23)
Session end hour21Session end hour, server time (0-23)
Use weekday gatetrueEnable weekday gate
Allow mondaytrue
Allow tuesdaytrue
Allow wednesdaytrue
Allow thursdaytrue
Allow fridaytrue
Use equity floor gatetrueEnable equity floor gate
Equity floor0.0Minimum equity to allow trading, 0 = disabled
Use position cap gatetrueEnable open-position count gate
Max open positions3Maximum simultaneous open positions across all symbols
Use trade allowed gatetrueEnable terminal/account trade-allowed gate
Panel x20Panel X offset, pixels
Panel y30Panel Y offset, pixels
Light radius26Light circle radius, pixels (drawn as a filled square proxy)

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Trading Sessions · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria