How to start with MQL5 - page 47

 
Introduction to MQL5 (Part 29): Mastering API and WebRequest Function in MQL5 (III)

Introduction to MQL5 (Part 29): Mastering API and WebRequest Function in MQL5 (III)

Greetings and welcome back to Part 29 of  the Introduction to MQL5 series! In the previous article, we covered the elements of a URL and discovered how to use MQL5's API to get the most recent prices from external platforms. Additionally, you learned how to read the JSON response and retrieve the precise information you require.

Introduction to MQL5 (Part 29): Mastering API and WebRequest Function in MQL5 (III)
Introduction to MQL5 (Part 29): Mastering API and WebRequest Function in MQL5 (III)
  • 2025.11.27
  • www.mql5.com
In this article, we continue mastering API and WebRequest in MQL5 by retrieving candlestick data from an external source. We focus on splitting the server response, cleaning the data, and extracting essential elements such as opening time and OHLC values for multiple daily candles, preparing the data for further analysis.
 

Introduction to MQL5 (Part 30): Mastering API and WebRequest Function in MQL5 (IV)

Introduction to MQL5 (Part 30): Mastering API and WebRequest Function in MQL5 (IV)

You will learn how to organize comparable elements from various candles into their own dedicated arrays, rather than working with each candle individually. For instance, a single array will have all the opening times from each candle. The open prices, high prices, low prices, close prices, volumes, and any other candle components you like to examine will all be subject to the same analysis. Comparing numbers across days, identifying trends, performing computations, and preparing the data for indicators or trading logic are all made simpler by this methodical approach. After reading this article, you will have a clear and effective method for arranging API candle data, which will improve the readability, scalability, and readability of your MQL5 code and prepare it for more complex analysis.
Introduction to MQL5 (Part 30): Mastering API and WebRequest Function in MQL5 (IV)
Introduction to MQL5 (Part 30): Mastering API and WebRequest Function in MQL5 (IV)
  • 2025.12.03
  • www.mql5.com
Discover a step-by-step tutorial that simplifies the extraction, conversion, and organization of candle data from API responses within the MQL5 environment. This guide is perfect for newcomers looking to enhance their coding skills and develop robust strategies for managing market data efficiently.
 

Introduction to MQL5 (Part 31): Mastering API and WebRequest Function in MQL5 (V)

Introduction to MQL5 (Part 31): Mastering API and WebRequest Function in MQL5 (V)

Welcome back to Part 31 of the Introduction to MQL5 series! In the previous articles, we covered the basics of the API and WebRequest function in MQL5. I showed you how to send a request to a server, receive a response, and sort the server response to retrieve important information. Specifically, in the previous article, we retrieved the candle data for the last 5 daily candles of BTCUSDT using the Binance API. We also discussed how to classify related data into separate arrays, such as open, high, low, and close prices. With this organized data, you can build both Expert Advisors and indicators.

 

Introduction to MQL5 (Part 32): Mastering API and WebRequest Function in MQL5 (VI)

Introduction to MQL5 (Part 32): Mastering API and WebRequest Function in MQL5 (VI)

Welcome back to Part 32 of the Introduction to MQL5 series! I explained how to use the WebRequest function and API to request candle data from external sources in the previous article. We went over how to get the server response as raw text, how to carefully separate it into individual candles, and how to store the cleaned and arranged candle values on your PC in a structured file. By the end, you had a comprehensive file with well-organized candle data that you could use again at any moment without contacting the server.
Introduction to MQL5 (Part 32): Mastering API and WebRequest Function in MQL5 (VI)
Introduction to MQL5 (Part 32): Mastering API and WebRequest Function in MQL5 (VI)
  • 2025.12.16
  • www.mql5.com
This article will show you how to visualize candle data obtained via the WebRequest function and API in candle format. We'll use MQL5 to read the candle data from a CSV file and display it as custom candles on the chart, since indicators cannot directly use the WebRequest function.
 

Introduction to MQL5 (Part 33): Mastering API and WebRequest Function in MQL5 (VII)

Introduction to MQL5 (Part 33): Mastering API and WebRequest Function in MQL5 (VII)

Welcome back to Part 33 of the Introduction to MQL5 series. In the previous parts of this journey, we focused on how MQL5 can communicate with external platforms using APIs and the WebRequest function. You learned how to send HTTP requests, receive and interpret server responses, organize candle data, save it into files, and visualize that data inside custom indicators. These steps helped build a strong foundation for working with external data in MetaTrader 5.

 

Introduction to MQL5 (Part 34): Mastering API and WebRequest Function in MQL5 (VIII)

Introduction to MQL5 (Part 34): Mastering API and WebRequest Function in MQL5 (VIII)

Welcome back to Part 34 of the Introduction to MQL5 series! In the previous article, we focused on the fundamentals of sending API requests from MetaTrader 5 to Google Generative AI. We looked at the structure of requests, how responses are received, and how the WebRequest function operates. There was no direct contact with the chart itself at that point; all communication with the AI was done in code. 

In this article, we’ll develop an interactive control panel directly on the MetaTrader 5 chart, which is a practical advancement. This panel will enable users to enter a query, send it to the AI, and view the outcome within the terminal. Since this series has not yet covered graphical panels in MQL5, we will present the basic concepts required to create and manage them. We won't, however, explore deeply the entirety of graphical interface development. We will only discuss the panel features required for this project because this article is still primarily focused on APIs and the WebRequest function in MQL5.

Introduction to MQL5 (Part 34): Mastering API and WebRequest Function in MQL5 (VIII)
Introduction to MQL5 (Part 34): Mastering API and WebRequest Function in MQL5 (VIII)
  • 2026.01.15
  • www.mql5.com
In this article, you will learn how to create an interactive control panel in MetaTrader 5. We cover the basics of adding input fields, action buttons, and labels to display text. Using a project-based approach, you will see how to set up a panel where users can type messages and eventually display server responses from an API.
 

Introduction to MQL5 (Part 35): Mastering API and WebRequest Function in MQL5 (IX)

Introduction to MQL5 (Part 35): Mastering API and WebRequest Function in MQL5 (IX)

Welcome back to Part 35 of the Introduction to MQL5 series! In the last article we concentrated on developing the MetaTrader 5 chart's interactive control panel as the project's front end. We learned how to create the panel's layout, incorporate buttons and input boxes, and show text within the panel. The panel did not yet communicate with any external services and was only visual at that point. By linking that control panel to the backend logic, we take the project one step further in this section. This article's primary focus is on managing user interaction using chart events, identifying when the send button is clicked, and utilizing the WebRequest function to get user data ready for sending to an external API.
Introduction to MQL5 (Part 34): Mastering API and WebRequest Function in MQL5 (VIII)
Introduction to MQL5 (Part 34): Mastering API and WebRequest Function in MQL5 (VIII)
  • 2026.01.15
  • www.mql5.com
In this article, you will learn how to create an interactive control panel in MetaTrader 5. We cover the basics of adding input fields, action buttons, and labels to display text. Using a project-based approach, you will see how to set up a panel where users can type messages and eventually display server responses from an API.
 

Introduction to MQL5 (Part 36): Mastering API and WebRequest Function in MQL5 (X)

Welcome back to Part 36 of the Introduction to MQL5 series! In Part 31 of this series, we discussed how to communicate with external platforms like Binance, but the communication was direct and did not involve exchanging any sensitive information. We’ll get into the security aspect of API connectivity in this article. We go over key subjects including signatures, HMAC (Hash-based Message Authentication Code), and SHA256 hashing, which are used to authenticate requests, confirm request integrity, and stop tampering. When making critical API calls, like placing orders or managing trades, these security measures are extremely crucial. 

Introduction to MQL5 (Part 36): Mastering API and WebRequest Function in MQL5 (X)
Introduction to MQL5 (Part 36): Mastering API and WebRequest Function in MQL5 (X)
  • 2026.01.22
  • www.mql5.com
This article introduces the basic concepts behind HMAC-SHA256 and API signatures in MQL5, explaining how messages and secret keys are combined to securely authenticate requests. It lays the foundation for signing API calls without exposing sensitive data.
 

Introduction to MQL5 (Part 37): Mastering API and WebRequest Function in MQL5 (XI)

Introduction to MQL5 (Part 37): Mastering API and WebRequest Function in MQL5 (XI)

Welcome back to Part 37 of the Introduction to MQL5 series! In the previous article, we introduced the basics of API signatures and explored how secure requests are created in MQL5 using hashing and HMAC-based techniques. We focused on why signatures are necessary, how they protect sensitive requests, and how MQL5 handles signature generation at a conceptual level.

This article builds on that foundation by taking the next useful step. Here, we will write an MQL5 script that retrieves account balance data for every asset that is accessible by sending authenticated API queries to Binance. This will compile all the previously discussed topics, such as using WebRequest, handling timestamps, creating signatures, and interacting with private API endpoints. You will have a firm grasp of how to safely interact with Binance and retrieve actual account information straight from MQL5 at the end of this article.

Introduction to MQL5 (Part 37): Mastering API and WebRequest Function in MQL5 (XI)
Introduction to MQL5 (Part 37): Mastering API and WebRequest Function in MQL5 (XI)
  • 2026.01.27
  • www.mql5.com
In this article, we show how to send authenticated requests to the Binance API using MQL5 to retrieve your account balance for all assets. Learn how to use your API key, server time, and signature to securely access account data, and how to save the response to a file for future use.
 

Introduction to MQL5 (Part 38): Mastering API and WebRequest Function in MQL5 (XII)

Introduction to MQL5 (Part 38): Mastering API and WebRequest Function in MQL5 (XII)

Welcome back to Part 38 of the Introduction to MQL5 series! In the previous article, we concentrated on creating a strong framework for utilizing MQL5 to communicate with external systems. We looked at the creation of API endpoints, the operation of the WebRequest function, the preparation of authentication components like timestamps and signatures, and the reception and interpretation of server responses. When working with any private or confidential API interaction, these ideas are essential. 

This article uses an entirely project-based methodology, just like the previous sections of this series. Instead of talking about theory in isolation, we will put each idea into practice in a real-world process. This approach aids in your comprehension of both the functioning of separate parts and how they interact in an actual integration situation. This article brings the API series to a close and completes the journey.

Introduction to MQL5 (Part 37): Mastering API and WebRequest Function in MQL5 (XI)
Introduction to MQL5 (Part 37): Mastering API and WebRequest Function in MQL5 (XI)
  • 2026.01.27
  • www.mql5.com
In this article, we show how to send authenticated requests to the Binance API using MQL5 to retrieve your account balance for all assets. Learn how to use your API key, server time, and signature to securely access account data, and how to save the response to a file for future use.