You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Market Simulation: Position View (XV).
In the previous article “Market Simulation: Position View (XIV)”, I showed how to add the necessary details so that the Take Profit / Stop Loss lines display the result associated with their triggering. In other words, when the price reached one of these levels — either Stop Loss or Take Profit — we could determine whether it would result in a profit or a loss and what its amount would be. For now, this result is measured in points, since we are not yet working with monetary amounts.
In that same article, I promised to explain in detail how messaging and event-driven programming make it possible for code like the code I am presenting here to work, as anyone can easily verify. I include executable files in the attachment once they become stable enough, and I also provide the complete source code so that other programmers have access to the information and can see exactly what is being implemented.
Although the code presented in the previous article works perfectly, we can take it much further. To make the explanation easier to follow, I decided to publish the same code again, but with updated calls. It works the same way as the previous version. Although the implementation has changed slightly, there is no need to explain it separately: if you understand what I will explain in this article, you will also be able to understand the code, provided you have been following the series up to this point. Let's get started.
Author: Daniel Jose