OPEN-SOURCE SCRIPT

MACD Linear Regression by zdmre

Updated
Both the Moving Average Convergence Divergence (MACD) and the Linear Regression (LR) rank among the most popular momentum indicators used in trading. When used in combination with other technical indicators, both MACD and LR can offer value in validating trade opportunities to optimize your risk management practices.

While they represent a similar approach to evaluating trades, the functions of both MACD and LR are distinct, which makes them useful indicators to combine in trade evaluation. Here’s a look at how to use MACD and LR as part of your trade analysis.

***Use it at your own risk

If you have new ideas to improve this indicator then let me know please.

Keep Learning, Keep Earning
Release Notes
Moved to below pane.
Release Notes
Pinescript Version 5
Release Notes
Added HH-HL-LH-LL for MACD.

*Can be used for divergence patterns.
Release Notes
Visual optimization.
Linear RegressionMoving Average Convergence / Divergence (MACD)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer