- Andriy Konovalov
- Version: 1.1
- Updated: 2 January 2021
- Activations: 5
This indicator predicts the nearest bars of the chart based on the search of up to three best coincided patterns (a sequence of bars of a given length) in the history of the current instrument of the current timeframe.
The found patterns are aligned with the current pattern at the opening price of the current (last) bar. The predicted bars are bars following immediately for patterns found in history.
Pattern search is performed once every time a new bar of the current timeframe opens. The indicator is not redrawn during the formation of a bar.
The coincidence error (in points) and the time of the pattern found are displayed in the lower right corner of the chart in the corresponding color. The coincidence error is calculated as the square root of the averaged sum of squared deviations of all OHLC prices of all bars in the pattern.
The indicator works with any timeframes and instruments (including stock exchange). It can be useful for predicting the market behavior and making decisions on trading operations.
For the indicator to find the most closely coincided patterns, it is necessary to provide the greatest possible depth of bars history.
You can test the operation of the indicator for free in the tester of the MetaTrader 5 terminal by downloading a demo version of the indicator.
- Pattern length - pattern length (positive integer value), i.e. the number of coincided bars of the desired pattern.
- Count of predicted bars - the number of predicted bars (positive integer value).
- Search for patterns - enumeration type parameter with the values one_best_coincided, two_best_coincided, three_best_coincided, which allows setting the number of the best coincided patterns to be searched in history (up to three).
- Visualization mode of prediction - enumeration type parameter with the values show_bars_only, show_big_candle_only, show_big_candle_and_bars, which allows setting a visualization mode of prediction in the form of bars only, of big candle only (for Count of predicted bars > 1) or of bars and big candle at the same time (see screenshots below).
- Show patterns - boolean parameter (true/false), indicating the need to display the found patterns.
- History depth to search patterns (0 - all available) - history depth (the number of last bars) to search for patterns. If the parameter is set to 0, them all available history of bars is used. Keep in mind that increasing the history depth increases the time of finding patterns.
- A set of parameters for setting the colors and line widths using to draw big candles. By default, the predicted bars are displayed in lighter tones relative to the colors of the corresponding patterns. The thickness of lines used to plot the bars of all three patterns are set to a single fixed value of 2. It is also possible to set different line widths (for example, 1, 3, 5) to display the full shape of bars of all three patterns (see screenshots below).
The indicator plots
- 1st best pattern - the found best coincided pattern with the least coincidence error with the current pattern. The indicator buffers 10 - 14 are used for plotting the bars of the pattern.
- 2nd best pattern - the second best coincided pattern with the next lowest coincidence error with the current pattern (indicator buffers 5 - 9).
- 3rd best pattern - the third best coincided pattern with the highest coincidence error with the current pattern of the three (indicator buffers 5 - 9).
User didn't leave any comment to the rating