Discussing the article: "Market Simulation (Part 01): Cross Orders (I)"

 

Check out the new article: Market Simulation (Part 01): Cross Orders (I).

Today we will begin the second stage, where we will look at the market replay/simulation system. First, we will show a possible solution for cross orders. I will show you the solution, but it is not final yet. It will be a possible solution to a problem that we will need to solve in the near future.

In the previous article "Developing a Replay System (Part 78): New Chart Trade (V), I showed how the Expert Advisor is able to interpret the instructions sent by Chart Trade. The information that Chart Trade actually transmits to the Expert Advisor depends on the user's interaction with it. In other words, when the user clicks on the buy, sell, or close position button, a message is sent to the chart. One of the Expert Advisor's tasks, when attached to this chart, is to intercept, decode, and execute the instructions contained in that message.

Although this mechanism is simple and quite reliable, we face a small issue. Well, it is not exactly a problem, more of an inconvenience. And this inconvenience needs to be resolved before we can actually start sending orders to the trading server.

In the video below, you can see how the process looks directly on the chart.


Author: Daniel Jose