Repository navigation
Development Guide
FXNews intentionally keeps its implementation in FXNews.mq5. Prefer focused function-level changes unless a larger refactor has a clear maintenance benefit. Preserve #property strict, chart-window indicator behavior, and the timer-driven scan path unless the product design changes deliberately.
- Edit
FXNews.mq5or the relevant wiki page. - Compile. On macOS run
./tools/build-macos.sh; elsewhere compileFXNews.mq5in MetaEditor. - Attach the indicator to a chart in a demo or other non-production terminal.
- Run the focused checks described in Testing and Validation.
- Keep generated MetaTrader artifacts out of Git.
tools/build-macos.sh drives MetaEditor through the Wine bundle that ships inside the MetaQuotes macOS build of MetaTrader 5. It resolves the compiler and prefix, converts macOS paths to the prefix's Z: drive mapping, decodes MetaEditor's UTF-16LE log, and exits non-zero on any error or warning, so it is usable as a commit gate. It is macOS-only and assumes the standard install locations:
wine64 /Applications/MetaTrader 5.app/Contents/SharedSupport/wine/bin/wine64
compiler ~/Library/Application Support/net.metaquotes.wine.metatrader5/
drive_c/Program Files/MetaTrader 5/MetaEditor64.exe
Beyond that there is no repository-local install, lint, typecheck, format, test, migration, Docker, or deployment command. MetaEditor compilation is the available syntax and type validation path. The release and distribution process is not currently documented.
The MQL5 compiler warns only about a variable that is never touched at all. Anything that is written — including by an initialiser — counts as used. Verified by probe: an initialised-but-unread local, a struct copied into a local and never read, a struct field assigned but never read, a tautological comparison, and an unreachable statement after return all compile with zero warnings. Three real defects fixed in 1.4 lived in exactly that gap. Do not treat a clean build as dead-code clearance; run the census in Testing and Validation.
Review the input declarations, InitializeRuntimeSettings(), and ValidateInputs(). Defaults affect every symbol/timeframe profile and the historical-validation baseline. Update Configuration when user-visible settings change.
Review SymbolsToScan, TimeframesToScan, ParseSymbols(), ParseTimeframes(), ParseTimeframeToken(), TimeframeMinutes(), and FindBrokerSymbolMatch(). Keep parsing, labels, duplicate detection, broker suffix/prefix handling, and historical aggregation aligned.
Start with the relevant evaluator and then inspect BuildCompositeSignalScore() for weights and caps. Keep compact tags, human-readable reasons, live scoring, and historical scoring aligned where their models are intended to match. Material changes require both live observation and historical validation.
Review dashboard constants plus UpdateDashboard(), CollectDashboardSignals(), SortDashboardSignals(), formatting helpers, FitDashboardText(), and CleanupDashboardObjects(). Test different chart widths, row limits, diagnostics, blocked-signal mode, and recent-history fallback.
Review EnableSoundAlert, EnablePushNotification, alert state, cooldowns, and SendOptionalAlert(). Alerts must remain opt-in. Test deliberately in a non-production terminal and check for duplicate or repeated notifications.
Review RunHistoricalOperatingMode(), RunHistoricalBacktest(), historical score helpers, candidate construction, the objective function, and Journal report builders. Autotune recommendations must remain advisory; results depend on broker history quality and must not be presented as proof of future performance.
- Use source code as the authority when documentation differs.
- Never let a component that could not be evaluated read as confirmation. A neutral placeholder value must not be able to satisfy a threshold that means "confirmed": carry an explicit availability flag and gate the tag and the wording on it.
- No placeholder or filler text in anything the user sees. A format slot with a constant in it is a defect, not a label.
- Keep score wording factual: the percentage is an event-quality ranking, not a win probability or trade recommendation.
- Avoid unbounded work in
OnTimer()andScanAll(). - Validate
CopyRatesandCopyTicksresults before accessing returned arrays. - Keep chart-object names scoped through the indicator's per-chart prefix.
- Do not commit
*.ex5, logs, tester output, profiles, caches, or temporary files. - Update the wiki when behavior, settings, safety boundaries, validation, or operating procedures change.
- Complete the Release Checklist before publishing a production revision.