This advisor is designed to collect tick statistics andd spread values based on it. Program allows to receive notifications about minimum and maximum spread valus and collects spread statistics for different time periods.
It is necessary to use advisor on accounts with floating spread – Market Pro.
1. Configuring advisor with external variables.
• H1_Log – collecting statistics for the 1 hour period , possible values: true - yes, false - no;
• H4_Log – collecting statistics for the 4 hour period , possible values: true - yes, false - no;
• D1_Log – collecting statistics for the 1 dayperiod , possible values: true - yes, false - no;
• ShowAlert – way to inform about the event, possible values: true - show the «Alert» window , false - show in the log;
Advisor uses predefined symbol specification taken from «SpreadStatOptions.csv» file, which should be placed in a folder «experts\files».
Example of the file
2. Collection and recording of atatistic values to the file
Advisor collects and records statistic values to the CSV file, where each string is a value for a certain period, file format:
Start time, End time, Minimum spread, Average spread, Maximum spread, Amount of ticks, Amount of bars
Statistics file gets automatically created in folder «experts\files», located in the MetaTrader installation folder. File name is generated on the basis of a symbol and time period, for example: «(SS) GBPUSD_m Real H1 Statistics.csv».
3. Determination of maximum spreads
Advisor calculates xamimum spread based on vlaues, specified in the configuration file. Detecting maximum spread value, advisor records this in the log, for example: «MAX spread on AUDCHF_m 5п (0.97225->0.97218 / 0.97278->0.97271)» and indicates this on the chart. Adviser plots vertical rectangle, where the lower level is a Bid price, upper - Ask price. If advisor detects maximum spread several times on the same candle, it plots only the latest one, all previous rectangles get removed.
4. Determination of minimumspreads
Advisor calculates the minumum spread, based on spread values specified in the configuration file. If minimum spread lasts for more than 3 minutes - advisor records this in the log, for examply: «MIN spread on AUDCHF_m 1p (0.97225->0.97218 / 0.97278->0.97271)» and indicates that on the chart. Adviser plots a horizontal rectangle that indicates the time when minimum spread was holded continously.