Discussing the article: "Market Simulation: Position View (IV)"

 

Check out the new article: Market Simulation: Position View (IV).

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 positions open on the trading server, which are often managed through a system of opposing orders. From this point on, this becomes possible, opening the way for various ideas and future implementations. Although we are only beginning to put these components into operation, we already have a direction for further development.

At the current stage of development, the position indicator is little more than an interesting application. But if we combine it with the three other applications that have already been created, the whole system becomes much more interesting. However, you may be wondering: how are we going to do this? Are we going to use the C_IndicatorPosition class in the Expert Advisor? No, we are not going to do that. We will keep the position indicator separate from the Expert Advisor. This way, you can add it to your own Expert Advisor.

Of course, you will need to make some adjustments so that your Expert Advisor can use the position indicator. But believe me, this will be much easier than creating several Expert Advisors with the same operational capabilities. Any changes to the position indicator will immediately be reflected in all Expert Advisors that use it. This is unlike a situation where each Expert Advisor would have its own position indicator.

The idea I am proposing, and the demonstration of how to implement it, is nothing new. In fact, this is exactly what allows different programs to use shared components. It is somewhat similar to computer games that use DirectX. When DirectX receives an update, all games and programs that use the DirectX library are also updated. Now imagine if each application had to be updated manually whenever the DirectX library was improved. That would be completely impractical. So this model should not be seen as a potential problem. It can be seen as a solution that, over time, will allow us to create increasingly useful and secure applications. Any fix or improvement in one application will affect the entire chain of applications used in MetaTrader 5. So let us begin.

Market Simulation: Position View (IV)


Author: Daniel Jose