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

 

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

In the previous article, we configured the indicator to display the financial result. However, not everyone likes using this display mode. The reasons differ from one trader to another, although in some cases they seem quite reasonable and justified to me. Adapting the code to provide this capability is by no means one of the most difficult tasks. It's actually pretty simple. In this article, we'll look at how to do this.

In the previous article “Market Simulation: Position View (XVI)”, we configured the position indicator to display the financial result of an open position. However, not all traders like using this display mode. The reasons may vary, although in some cases, in my opinion, they are quite understandable and justified: to prevent greed or fear from reaching excessive levels during a trade. When they see the amounts of money involved, some traders fear losing even more or giving back to the market the profits they have already made. In some situations, this can be seriously detrimental to a trader. That is why some traders prefer to keep their distance and avoid looking at an open position, so as not to give in to the temptation to close it prematurely.

Although this approach may be justified, it is not appropriate, since some symbols may go through periods of high volatility. Under such circumstances, Stop Loss and Take Profit levels may fail to trigger, which could lead to an unexpected outcome of the trade—that is, a result that differs from what was expected. When the Take Profit turns out to be higher than expected, I don't see anyone complaining on social media or other platforms for discussion. However, when the loss exceeds the planned amount, everyone starts swearing and bad-mouthing everything. In such cases, the responsibility lies solely with the trader, who should have remained vigilant because they were holding an open position during a period of high volatility.

However, I'm not here to discuss that issue. I just wanted to explain why we should offer different ways to display position data, since a trader might find one option or another inconvenient.

Adapting the code to provide this capability is by no means one of the most difficult tasks. It's actually quite simple, but explaining it is also interesting. This can be very helpful for enthusiasts who use these articles as supplementary material for studying MQL5 and gaining a deeper understanding of it. So, let's get right to the point.


Author: Daniel Jose