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 (X).
In the previous article Market Simulation: Position View (IX), we began exploring how the Take Profit and Stop Loss lines should be moved. Since I want to explain to everyone—and make it as clear as possible—how and why changes are made to the code, in this article we will try to solve the problem presented in the previous article. The problem lies with ZOrder. If you're not sure what the ZOrder property means for objects, don't worry—just check out the previous articles in this series, where I explain why it's important to set this property correctly.
In addition, the question arises: how can we use ZOrder to our advantage? The answer is simple: we cannot. This seems absurd and completely pointless. Nevertheless, no matter how skilled a programmer you may be, dear reader, you will not be able to surpass what is already programmed in MetaTrader 5 for managing ZOrder.
To help you understand what we are going to do, we first need to look at a fairly simple piece of code that is, nonetheless, extremely useful for understanding how to approach our problem.
Author: Daniel Jose