Articles

Market Simulation: Position View (V) for MetaTrader 5

Despite what was shown in the previous article, all of this may seem simple at first. In reality, several problems remain, along with many tasks that still need to be completed. You, dear reader, may imagine that everything is easy and straightforward. Out of inexperience, you may simply accept

Market Simulation: Position View (IV) for MetaTrader 5

Here we will start bringing together different components or applications that were previously completely isolated from each other. Chart Trade, the mouse indicator, and the Expert Advisor had already been linked to one another, but there was still no way to directly display on the chart the

Market Simulation: Position View (III) for MetaTrader 5

In previous articles, we mentioned that sometimes we need to set a value for the ZOrder property. But why? The reason is that many pieces of code that add objects to a chart simply do not use, or more precisely do not define, a value for this property. The point is that I am not here to say what

Market Simulation (Part 24): Position View (II) for MetaTrader 5

In this article, I will show how to use an indicator to track open positions on the trading server in the simplest and most practical way possible. I am doing this step by step to show that you do not necessarily have to move all of this into an Expert Advisor. Many of you have probably become used

Market Simulation (Part 23): Position View (I) for MetaTrader 5

The content we will cover from this point on is much more complex in terms of theory and concepts. I will try to make the material as simple as possible. The programming part itself is quite simple and straightforward. But if you do not understand the theory behind it, you will be left with no

Market Simulation: Getting Started with SQL in MQL5 (V) for MetaTrader 5

In the previous article, I showed how to proceed in order to add a query mechanism. This was needed so that, inside MQL5 code, you could fully use SQL and retrieve results using an SQL SELECT query. But there is still one last function we need to implement. This is the DatabaseReadBind function

Market Simulation: Getting started with SQL in MQL5 (IV) for MetaTrader 5

Many people tend to underestimate SQL, or even not use it at all, because they do not fully understand how it actually works. When running queries against an SQL database, we are not always looking for a universal answer; in some cases, we need a very specific and practical answer. If a database is

Market Simulation: Getting started with SQL in MQL5 (I) for MetaTrader 5

In today's article we will begin studying the use of SQL in MQL5 code. We will also look at how to create a database. Or, more precisely, how to create a SQLite database file using the features built into MQL5. We will also see how to create a table, and then how to establish a relationship between

Market Simulation (Part 24): Getting Started with SQL (VII) for MetaTrader 5

In the previous article, we completed the necessary introduction to SQL. And, in my opinion, we properly clarified what we wanted to show and explain about SQL. This was done so that anyone who comes to look at the market replay/simulation system being built can at least get an idea of what may be

Market Simulation (Part 23): Getting Started with SQL (VI) for MetaTrader 5

In this article, we will see how to visualize a database and, from that, understand how it is structured. This is done by analyzing the database’s internal structure. Although this may seem unnecessary at first, it is fully justified if we really want to become database administrators. After all