Discussion of article "Library for easy and quick development of MetaTrader programs (part XIV): Symbol object"
Hello Artyom -- is there an easy way to extract or compute the average spread for a given symbol using your library, or it is something you recommend I code externally myself?
The average spread of a bar is recorded by the terminal in the parameters of each bar. It can be found by requesting bar data from MqlRates. The library contains this data for each bar.
Add up all the spreads of all bars in the sample under study and divide by their number.
I will not do automatic determination of the average spread for a symbol. Because it will slow down the library, and this is not a frequent need. You can easily implement this yourself if you wish.
The average spread of a bar is recorded by the terminal in the parameters of each bar. It can be found by requesting bar data from MqlRates. The library contains this data for each bar.
Add up all the spreads of all bars in the sample under study and divide by their number.
That's perfect, thank you!
Do you know how reliable is the spread data for each bar when in testing mode? Is this consistent across different brokers, or quality of spread data can vary?
That's perfect, thank you!
Do you know how reliable is the spread data for each bar when in testing mode ? Is this consistent across different brokers, or quality of spread data can vary?
No, unfortunately I do not know.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Library for easy and quick development of MetaTrader programs (part XIV): Symbol object has been published:
In this article, we will create the class of a symbol object that is to be the basic object for creating the symbol collection. The class will allow us to obtain data on the necessary symbols for their further analysis and comparison.
Launch the EA on a symbol chart in MetaTrader 5.
All symbol object properties are sent to the journal:
Author: Artyom Trishkin