Loading…

News Risk Traffic Lights

Reading a calendar website mid-session to check "is anything due on GBP in the next half hour" breaks focus at exactly the moment focus matters most. News Risk Traffic Lights reads a plain calendar CSV from the sandbox once, then turns it into eight small always-on lights - USD, EUR, GBP, JPY, CHF, CAD, AUD, NZD - each independently red, amber or green based on how close that currency's nearest high- or medium-impact event is to the current time. Red means a High-impact event for that currency falls inside the narrow window either side of now (InpRedMinutes). Amber covers two separate cases: a High-impact event further out but still inside the wider window (InpAmberMinutes), or a Medium-impact event inside the narrow window. Low- impact events never change a light. This two-tier design means a currency never falsely reds out over a minor release, but a major release still gives enough amber lead time to close out or avoid opening new risk before the red window begins. The calendar file convention deliberately extends the Date/Title/Impact CSV shape already used by NewsBlackoutShader and EventCountdownPanel elsewhere in this catalogue, inserting a Currency column, so the same calendar export already being maintained for those tools drives this one too with no reformatting. Notes and limitations This is a read-only display; it does not close trades or block new ones - pair it with NewsBlackoutShader or a trading rule of your own if you want the warning enforced automatically. The calendar file must be maintained by hand or by an external export process; this indicator only reads it, it does not fetch calendar data from any online source. An unrecognised Impact value is treated as Low (never lights up), so a malformed export fails silently toward "all clear" rather than falsely alarming - keep that in mind when validating a new export source.

Indicator · MT5 · v1.0 · Free

About News Risk Traffic Lights

News Risk Traffic Lights is an indicator for MetaTrader 5. It has 10 settings, such as File name, Red minutes and Amber minutes. MQL source code included.

Files in the download: NewsRiskTrafficLights.ex5, NewsRiskTrafficLights.mq5, NewsRiskTrafficLights.txt.

Settings

SettingDefaultWhat it does
File nameNewsRiskTrafficLights.csvFile in MQL5\Files\ (Date Time,Currency,Impact,Title)
Red minutes15Minutes either side of a High-impact event that count as RED
Amber minutes60Minutes either side of a High-impact event, or the RED window for Medium, that count as AMBER
Refresh seconds20Seconds between file re-read checks
CornerCORNER_RIGHT_UPPERPanel corner (ENUM_BASE_CORNER)
X offset12
Y offset18
Red colorclrRedColour on the chart
Amber colorclrOrangeColour on the chart
Green colorclrLimeGreenColour on the chart

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 · News Trading · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria