Skip to content

Development Guide

André Borchert edited this page Aug 10, 2026 · 7 revisions

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.

Local Workflow

  1. Edit FXNews.mq5 or the relevant wiki page.
  2. Compile FXNews.mq5 in MetaEditor.
  3. Attach the indicator to a chart in a demo or other non-production terminal.
  4. Run the focused checks described in Testing and Validation.
  5. Keep generated MetaTrader artifacts out of Git.

There is no repository-local install, build, 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.

Change Areas

Inputs and Defaults

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.

Symbols and Timeframes

Review SymbolsToScan, TimeframesToScan, ParseSymbols(), ParseTimeframes(), ParseTimeframeToken(), TimeframeMinutes(), and FindBrokerSymbolMatch(). Keep parsing, labels, duplicate detection, broker suffix/prefix handling, and historical aggregation aligned.

Scoring

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.

Dashboard

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.

Alerts

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.

Validation and Autotune

Review RunHistoricalOperatingMode(), RunHistoricalBacktest(), historical score helpers, candidate construction, the objective function, runtime application, and Journal report builders. Results depend on broker history quality and must not be presented as proof of future performance.

Repository Conventions

  • Use source code as the authority when documentation differs.
  • Keep score wording factual: the percentage is an event-quality ranking, not a win probability or trade recommendation.
  • Avoid unbounded work in OnTimer() and ScanAll().
  • Validate CopyRates and CopyTicks results 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.

Clone this wiki locally