MQL4: Writing an Advisor on the indicator of open positions of traders
Not so long ago, an indicator of open positions of traders appeared on the site. I liked it because you can simultaneously receive data from several sources. In addition, as part of writing this article, I tested this indicator a little visually, and the result seemed promising to me. And today we will work with this indicator to use its data in our adviser.
So, today we will write an adviser that will take data from the site and use it in the analysis. I would divide all the expert’s work into several tasks: receiving data from the site as a string, parsing the data we need from the received string, analyzing these data and making transactions, writing statistics to a file for detailed analysis.
We will use the wininet.dll library, which just allows you to receive data from the network. We will also work closely with strings using functions such as StringFind, StringSubstr, StringConcatenate, StrToDouble and others.
The adviser turned out to be rather voluminous, therefore it will not be practical to provide a specific code within the framework of the article. All this along with detailed explanations can be seen in the video tutorial.
So, we wrote an adviser that takes data from the network, analyzes it and makes transactions based on this analysis. You can receive absolutely any data that you require and which is publicly available. By and large, the difficulty here is only in correctly converting them from a string for further analysis.
In the meantime, I will install this adviser on my account and start collecting statistics in order to continue the analysis later - to choose the optimal levels, data sources and position tracking.