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

 

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

In this turning-point article, we will begin to explore in greater depth the interaction between the applications we are developing to ensure full support for the replay/simulation system. Here we will analyze a problem that, on the one hand, is quite unpleasant, but on the other hand, is very interesting to explain and solve. The problem is this: how can we restore the take-profit and stop-loss lines after they have been deleted, and do so without using the terminal by performing the operation directly on the chart? At first glance, it seems simple. However, there are several obstacles that must be overcome.

Hello, dear readers! Welcome to a new article on creating a replay/simulation system.

In the previous article, Market Simulation: Position View (VIII), we showed how this can be implemented—or, more precisely, how we should modify the position indicator’s code so that, through interaction, it can remove take-profit and stop-loss lines and also allow us to close a position very easily. For those who have been following this series, I think it won't be hard to understand what is being implemented here. However, up to this point, we have not yet done anything regarding trade simulation. But don't worry about that for now. We are moving in that direction, even if it isn't always obvious.

Now we're faced with a problem that, on the one hand, is quite unpleasant, but on the other hand, is very interesting. The problem is this: how can we restore the take-profit and stop-loss lines after they have been deleted, and do so without using the terminal by performing the operation directly on the chart? At first glance, it seems simple. However, there are several obstacles that must be overcome.


Author: Daniel Jose