Building an MQL5 EA That Fetches Binance Candles and Places Orders
Summary
This project explains how an MQL5 Expert Advisor can use Binance’s API to retrieve candlestick data for an asset that is not available in the MetaTrader terminal. It parses the returned candle fields, including OHLC prices and opening times, then checks recent completed 30-minute candles for a bullish engulfing pattern. Requests are scheduled at the start of each new candle so the EA avoids repeatedly querying unchanged or incomplete data and reduces unnecessary API traffic.
The workflow continues from market-data retrieval to authenticated requests and order submission, including creation of a signed request. It illustrates a practical bridge between MetaTrader and an external exchange, but the material is primarily an implementation tutorial rather than a performance study: it provides no evidence that the pattern is profitable. API rate limits, request timing, and the risks of live execution remain relevant, and the article labels its examples educational rather than trading advice.
Key ideas
- The EA obtains exchange candles through an external API because the asset may be absent from MetaTrader’s price series.
- It extracts candle fields from the response and evaluates completed bars for a bullish engulfing pattern.
- Tracking the current 30-minute bar time lets the EA request data once per new candle.
- Authenticated order requests require generating a signature and sending it with the exchange request.
- The article demonstrates integration mechanics but does not establish that the pattern produces profitable trades.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.