Hlaiman Random Forest Indicator
This indicator is based on the Random Forest machine learning algorithm, and it has been created using a software package for developing artificial intelligence systems for trading - Hlaiman EA Generator. In this version, all calculations of price patterns and generation of the indicator trade signals are performed by means of 32 Decision Trees, each of which is implemented as a separate MQL function. The number of trees may be changed during the course of further studies. At the moment, it is dictated by the reasonable sufficiency and minimization of the source code, which currently comprises approximately 3 MB. The indicator predicts the reversal points and the price movement direction, and also displays the corresponding BUY and SELL signals. In addition, the indicator can display the statistics on the number of signals and the number of price points, which can be traded using the predicted signals.
- Threshold BUY - threshold value for calculating buy signals in %.
- Threshold SELL - threshold value for calculating sell signals in %.
- Bit Mask for Forest Trees - enable/disable the decision trees in the indicator functions. Each of 32 bits of this value is responsible for the corresponding tree. Default value is "-1" (0xFFFFFFFF), every bit = 1, all 32 trees are enabled.
- Statistics - Mode for displaying statistics on predicted signals, available options:
- Don't Show - do not display statistics,
- Current Day - display statistics for the current day,
- Current Month - display statistics for the current month,
- Current Year - display statistics for the current year,
- All History - display statistics for all available chart data.
Tips on the Indicator Use
Before using the indicator signal in trading, try to configure their maximum possible statistically average size in points by selecting the optimal BUY and SELL threshold values and bitmask. It is recommended to obtain these values for the nearest trading period.
The period is selected in the Statistics setting and can be smaller or greater in accordance with the timeframe, but keep in mind that Selecting the All History value with a very large number of bars on the chart can lead to delays and hangs of the terminal.
In addition, do not forget to consider the spread losses and/or broker commission when predicting the potential profit factor of the trades opened according to the indicator's signals. Also note that the point values displayed in the indicator statistics are calculated approximately, using the average bar prices.
To extend the indicator customization capabilities, added an option for enabling disabling the Decision Trees in the indicator functions.
The option is represented by an external variable - Bit Mask for Forest Trees, each of 32 bits of which is responsible for the corresponding tree.
A bit value of 1 - enabled, 0 - disabled. By default, the variable is equal to 0xFFFFFFFF (-1). All bits are enabled, and all 32 trees are should work.