Articles with MQL5 programming examples

icon

Access a huge collection of articles with code examples showing how to create indicators and trading robots for the MetaTrader platform in the MQL5 language. Source codes are attached to the articles, so you can open them in MetaEditor and run them to see how the applications work.

These articles will be useful both for those who have just started exploring automated trading and for professional traders with programming experience. They feature not only examples, but also contain new ideas.

Add a new article
latest | best
preview
Chart Synchronization in MQL5 (Part 2): Building an Interactive Multi-Chart Tool

Chart Synchronization in MQL5 (Part 2): Building an Interactive Multi-Chart Tool

This article turns the Part 1 prototype into an interactive MetaTrader 5 indicator that synchronizes charts of the same symbol across different timeframes. It handles keyboard input and drag events via OnChartEvent, traverses charts with ChartFirst/ChartNext, and maps time using iBarShift and ChartNavigate. A draggable vertical line keeps the selected time near the chart center, while a horizontal line propagates a chosen price level. The result streamlines multi-timeframe comparison.
preview
Developing Statistical Market Inflection Forecasting Indicator

Developing Statistical Market Inflection Forecasting Indicator

An MQL5 indicator forecasts where a movement is likely to terminate and how far the opposite leg has typically traveled, using statistics from completed moves on the same symbol and timeframe. It detects confirmed pivots, takes a single snapshot, selects similar historical observations, and reads entry, stop loss, and take profit from their distributions. Empirical hit rates come from a chronological replay without look‑ahead, and resolved forecasts leave the chart with an option to review them.