alexgrover

Linear Quadratic Convergence Divergence Oscillator

Introduction

I inspired myself from the MACD to present a different oscillator aiming to show more reactive/predictive information. The MACD originally show the relationship between two moving averages by subtracting one of fast period and another one of slow period. In my indicator i will use a similar concept, i will subtract a quadratic least squares moving average with a linear least squares moving average of same period, since the quadratic least squares moving average is faster than the linear one and both methods have low-lag this will result in a reactive oscillator.

LQCD In Details

A quadratic least squares moving average try to fit a quadratic function (parabola) to the price by using the method of least squares, the linear least squares moving average try to fit a line. Non-linear fit tend to minimize the sum of squares in non-linear data, this is why a quadratic method is more reactive. The difference of both filters give us an oscillator, then we apply a simple moving average to this oscillator to provide the signal line, subtracting the oscillator and its signal line give us the histogram, those two last steps are the same used in the MACD .

Length control the period of the quadratic/linear moving average. While the MACD use a signal line for plotting the histogram i also added the option to plot the momentum of the quadratic moving average instead, the result is smoother and reduce irregularities, in order to do so just check the differential option in the parameter box.


The period of the signal line and the momentum are both controlled by the signal parameter.

A predictive approach can be made by subtracting the histogram with the signal line, this process make the histogram way more predictive, in order to do so just check the predictive histogram option in the parameter box.


Predictive histogram with simple histogram option. The differential mode can also be used with the predictive parameter, this result in a smoother but less reactive prediction.

Information Interpretation

The amount of information the MACD can give us is high. We can use the histogram as signal generator, or the if the oscillator is over/under 0, combine the oscillator/signal line with histogram, combinations can provide various systems. Some traders use the histogram as signal generator and use the cross between the histogram and the signal line as a stop signal, this method can avoid some whipsaw trades. The study of divergences with the price is also another method.

Conclusion

This oscillator aim to show the same amount of information as the MACD with a similar calculation method but using different kind of filters as well as eliminating the need to use two separates periods for the moving averages calculation, its still possible to use different periods for the quadratic/linear moving average but the results can be less accurate. This indicator can be used like the MACD .





Gỡ bỏ khỏi Script Ưa thích Thêm vào Script Ưa thích
As allways, excellent stuff!! Great man!
+2 Phản hồi
@Duyck, Thank you so much for the support :)
+1 Phản hồi
Thanks for the share. Great tool!!!
If I am not asking too much, can you make it with alerts?
+1 Phản hồi
alexgrover StelianStefan
@StelianStefan, Thanks for the support :) Ff you mean by "alerts" arrows or any kind of symbols then yes, if you mean alerts that notify you then no i can't, pine can't program alerts, you need to create them yourself from the alerts panel.
Phản hồi
That very cool Alex; I love the predictive items; thanks for shared in public =D
+3 Phản hồi
@ICEKI, You are very welcome :) I don't consider sharing in private, i love open source.
+1 Phản hồi
ICEKI alexgrover
@alexgrover, Sweet generous heart; SALUTE =D
+2 Phản hồi
wroclai alexgrover
@alexgrover, you are my open source hero!
+1 Phản hồi
alexgrover wroclai
@wroclai, Thats good to hear :) thanks for the support
Phản hồi
Very nice Alex, I look forward to messing around with this. Are there any other types of LSMAs that TradingView doesn't provide that could be realised in Pine?
+2 Phản hồi
Trang chủ Bộ lọc cổ phiếu Bộ lọc Forex Bộ lọc Tiền điện tử Lịch kinh tế Cách thức hoạt động Tính năng Biểu đồ Giá Quy tắc Áp dụng Người điều hành Giải pháp cho Website & Nhà môi giới Widget Giải pháp biểu đồ Nhận trợ giúp Yêu cầu tính năng Blog & Tin tức Câu hỏi thường gặp Wiki Twitter
Hồ sơ Tùy chỉnh Hồ sơ Tài khoản và Thanh toán Đồng TradingView Ticket Hỗ trợ của tôi Nhận trợ giúp Các ý tưởng đã đăng Người theo dõi Đang theo dõi Tin nhắn riêng Trò chuyện Đăng xuất