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

 

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

In the previous article, we considered how to implement a position indicator that allows you to close an open position directly from the chart by interacting with an object available on the chart. After completing and testing the first mechanism, we began making changes to ensure that take-profit and stop-loss levels could be removed for an open position. However, since the necessary changes required detailed explanations, in that same article I showed only the changes that needed to be made to the expert advisor; I still needed to show the changes that needed to be made to the position indicator.

In the previous article, " Market Modeling: Position View (VII)," we examined how to implement a position indicator that allows you to close an open position directly from the chart by interacting with an object available on the chart. After completing and testing the first mechanism, we began making changes to ensure that take-profit and stop-loss levels could be removed for an open position. However, since the necessary changes required detailed explanations, in that same article I showed only the changes that needed to be made to the expert advisor; I still needed to show the changes that needed to be made to the position indicator.

The changes to the code itself are relatively minor. Nevertheless, as I observed the audience that had shown interest in this replication/simulation system, I noticed that many—if not the vast majority—did not have much experience in programming, let alone in the type of programming that I teach and use. Therefore, in my opinion, a slightly more detailed explanation is needed so that everyone can understand the code and, if they wish, modify it to solve specific problems. The entire code presented here is intended solely for educational purposes. So try to examine both the code itself and the explanation I will provide, because we are about to get down to some serious work.


Author: Daniel Jose