Articles

Market Simulation (Part 20): First steps with SQL (III) for MetaTrader 5

Although we can perform operations on a database containing about 10 records, the material is absorbed much better when we work with a file that contains more than 15 thousand records. That is, if we tried to create such a database manually, this task would be enormous. However, it is difficult to

Market Simulation (Part 19): First Steps with SQL (II) for MetaTrader 5

As we explained in the first article about SQL, there is no point in spending time programming procedures to do what is already built into SQL. However, without knowing the basics, you won’t be able to do anything with SQL or take full advantage of everything this tool offers. Therefore, in this

Market Simulation (Part 18): First Steps with SQL (I) for MetaTrader 5

It doesn't matter which SQL program we use: MySQL, SQL Server, SQLite, OpenSQL, or another. They all have something in common, and the common element is the SQL language. Even if we do not intend to use Workbench, we can manipulate or work with the database directly in MetaEditor or through MQL5 to

Market Simulation (Part 17): Sockets (XI) for MetaTrader 5

The implementation of the part of the code that will run in MetaTrader 5 does not present any difficulty. However, there are several points that need to be taken into account. This is necessary so that you can make the system work. Remember one important thing: not just one program will be running

Market Simulation (Part 16): Sockets (X) for MetaTrader 5

We are close to completing this challenge. However, before we begin, I want you to try to understand these two articles—this one and the previous one. That way, you will truly understand the next article, in which I will cover exclusively the part related to MQL5 programming. But I will also try to

Market Simulation (Part 15): Sockets (IX) for MetaTrader 5

In this article, we will discuss one of the possible solutions to what we have been trying to demonstrate—namely, how to allow an Excel user to perform an action in MetaTrader 5 without sending orders or opening or closing positions. The idea is that the user employs Excel to conduct fundamental

Market Simulation (Part 14): Sockets (VIII) for MetaTrader 5

Many programmers might assume we should abandon using Excel and move directly to Python, using some packages that allow Python to generate an Excel file for later analysis of results. However, as mentioned in the previous article, although this solution is the simplest for many programmers, it will

Market Simulation (Part 13): Sockets (VII) for MetaTrader 5

When we develop something in xlwings or any other package that allows reading and writing directly to Excel, we must note that all programs, functions, or procedures execute and then complete their task. They do not remain in a loop, no matter how hard we try to do things differently

Market Simulation (Part 12): Sockets (VI) for MetaTrader 5

In this article, we will look at how to solve certain problems and issues that arise when using Python code within other programs. More specifically, we will demonstrate a common issue encountered when using Excel in conjunction with MetaTrader 5, although we will be using Python to facilitate this

Market Simulation: (Part 11): Sockets (V) for MetaTrader 5

We are beginning to implement the connection between Excel and MetaTrader 5, but first we need to understand some key points. This way, you won't have to rack your brains trying to figure out why something works or doesn't. And before you frown at the prospect of integrating Python and Excel, let's