Skip to content
All library documents

Building a Moving Average Crossover Robot with a Visual MetaTrader Editor

Article MQL5 articles

Summary

The document explains how to use BotBrains, a block-based editor for creating MetaTrader trading robots without writing code. It surveys the editor’s logic, interface, and code modes, and describes blocks for indicators, orders, chart and market-depth data, variables, notifications, and debugging. It also notes that robots can use controls and Telegram messages to interact with users while running.

Its worked example implements a moving average crossover: on each new tick, the robot reads fast and slow moving average values for the current and preceding bars, then compares those values to identify a crossing. The example includes configurable periods, symbol, and trade size, and shows how timer and debug blocks can help inspect variable values. The document is primarily a platform walkthrough; the supplied text is truncated before the crossover conditions and trade rules are fully shown. It provides no performance results, risk controls, or evidence that the example is profitable.

Key ideas

  • A block-based editor can connect trading logic, interface controls, indicators, and order operations without requiring the user to write the robot’s code directly.
  • The crossover example tracks fast and slow moving averages on the current and prior bars.
  • Indicator shift settings select which bar’s value the robot reads.
  • Timer and debug blocks can help inspect variables during development.
  • The example does not provide complete trading rules or performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.