LeafAlgo

Triple Quadratic Regression - Supplementary Underlay

This indicator is supplementary to our Triple Quadratic Regression overlaid indicator (which includes three step lines - a fast (fuchsia), a medium (yellow), and a slow (blue) quadratic regression line to help the user obtain a clearer picture of current trends).

Quadratic regression is better suited to determining (and predicting) trend than linear regression ; y = ax^2 + bx + c is better to use than a simple y = ax + b. Calculating the regression involves five summation equations that utilize the bar index (x1), the price source (defaulted to ohlc4), the desired lengths, and the square of x1. Determining the coefficient values requires an additional step that factors in the simple moving average of the source, bar index, and the squared bar index.

Instead of overlaying the three quadratic regression lines themselves, this underlaid indicator is used to show the normalized (-1 to +1) values of ax^2 and bx. The color of the lines and histogram match the associated lines on our overlaid indicator. Here, the solid fuchsia line is the fast QR's normalized ax^2 value, the solid yellow line is the mid QR's normalized ax^2 value, and the solid blue line is the slow QR's normalized ax^2 value. The histograms reflect the normalized bx values. In addition to these, the momentum of the ax^2 values was calculated and represented as a dotted line of the same colors.

Bar color is influenced by the values of ax^2 and bx of the fast and medium length regressions. If ax^2 and bx for both the fast and medium lengths are above 0, the bar color is green. If they are both under 0, the bar color is red. Otherwise, bars are colored gray.

When combined with our overlaid Triple Quadratic Regression indicator and the Triple Quadratic Regression Macro Score strategy (part of the LeafAlgo Premium Macro Strategies) to gather all of the information possible, your chart should look like this:

Take your trading to new heights with LeafAlgo Premium Indicators and Strategies. Use code SSMS4MGK at checkout for a 50% discount on your first purchase at www.LeafAlgo.com !

Join our Discord community today!
www.discord.gg/rNQ2QW59Pn
Скрипт с защищённым кодом
Этот скрипт опубликован с закрытым исходным кодом, вы можете свободно им пользоваться. Можно добавить его в избранное и использовать на графике. Вы не можете просматривать или менять его исходный код.
Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.

Хотите использовать этот скрипт на графике?