Fast Polynom moving average and channel
The use of a polynomial expansion of data opens up new possibilities for analysis and decision making. But the problem of all existing algorithms is a very slow computation.
The main feature of this indicator is its fast algorithm. The speed of calculation of the polynomial algorithm and its standard deviation values is several thousand times faster than conventional algorithms. So this is a convenient algorithm for use without the need to apply supercomputers.
Beginning with the version 1.4, the indicator provides a built-in strategy tester with trade visualization and simultaneous calculation of profit (in pips), of maximal drawdown (in pips), of the total number of trades and the Profit Factor (total profit/total loss), and display of this data as a table. 10 strategy examples are available: 5 channel and 5 non-channel, as well as their inverse strategies (Sell and Buy are reversed). The Tester features can be further expanded by applying the indicator to another indicator, e.g. RSI. In order to access the tester, press "T" (Tester). In order to select a strategy, hover the mouse pointer on the strategy information line. A brief description of the strategy is displayed in the popup menu. You can switch between channel and non-channel strategies by pressing on "C" (Channel). Further we plan to add a simple visual strategy constructor, which allows to create custom strategies straight from the indicator window.
Another notable feature is the ability to configure parameters from the indicator window using the key and the mouse. This method is more intuitive, fast and easy. Press "H" (Help) for hot key tips, as well as watch the attached video.
Language support has been added (8 languages), to be improved and expanded further. You can select a language from the properties window or by pressing "L" (Language).
- Yellow lines - redrawn with every tick of the polynomial channel. Green dashed lines - the polynomial extrapolation into the future.
- Two-color lines - non-redrawing channel, traces of a yellow polynomial Yellow. The line is blue when the polynomial lines are directed upwards, purple - when downwards.
- Red line - Sell, blue line - Buy. Displayed when the Tester is switched on.
- Select Language - language selection option.
- Degree of a polynomial - 0 to 20.
- 0 - simple MA (Bollinger Bands channel)
- 1 - linear regression
- 2 - non-linear regression without inflection points (arc)
- 3 - non-linear regression with one inflection point (wave)
- Number of bars for the calculation (period).
- Width of the channel, 0-no channel, 1-width=standard deviation:
- 0 - no channel
- 1 - the channel width is equal to the standard deviation of the polynomial.
- Bars to extrapolate in the future.
- Show Polynom? - show/hide polynomial.
- Spread for Tester. - choose spread value to test.
The degree of a polynomial is limited to 20. as increase in their number causes the problem of lower precision and overflow of the maximum value of type double, inasmuch as its maximum value is 1.7976931348623158e+308, and accuracy is 15 meaningful digits after the decimal point. The higher the Degree of polynomial and its Period, the higher the probability of overflow and the indicator will fail to perform calculations or its data will be incorrect. This problem can be easily solved through the use of special highly precise libraries with dll. But that's another story, and I am not sure if you need this. To my mind it will be enough to use the indicator with the polynomial degree below 10. I recommend not to exceed this value, because it may significantly reduce the indicator performance speed.
2. Added ability to change the font size. Press F and move your mouse up and down.
3. P key - show/hide the Polynom
4. С key - switch Channel/Line
5. G key - show/hide Grid and (or) Period Separator
6. Added the powerful visual tool – the Strategy Tester (T key). It allows users to visualize deals, calculate profit, maximum drawdown, and profit factor using 10 simple strategies as examples - 5 channel strategies and 5 strategies involving the polynomial moving averages (switch by С key). Each of the 10 strategies is complemented by the inverse strategy (when Sell and Buy are reversed). You can view a brief description of each strategy as a tooltip when hovering a mouse cursor over the information line. Transactions are displayed. Sell - red dotted line. Buy - blue dotted line.
7. You can use several instances of the indicator on a single window. In this case, managing visualization and parameters via keyboard and mouse is possible only for the first indicator, while the properties of other indicators can be changed only via the parameter window.
2. Fixed the conflict between adjusting the indicator using the properties window and using the keys.
2. Added dynamic configuration of parameters (H - help, I - information, W - change the channel width, Ctrl - change the polynom initial position, Shift - change the polynom calculation period, 0-9 - amount of polynom harmonics).
3. Changed the polynom extrapolation algorithm.