OPEN-SOURCE SCRIPT

Moving Average Cross; Linear Regression

797
This Pine Script is designed to display smoothed linear regression lines on a chart, with an option to adjust the regression period lengths and smoothing factor. The script calculates short-term and long-term linear regression lines based on the selected timeframe. These regression lines act as a regressed moving average cross, visually representing the interaction between the two smoothed linear regressions.

Short Regression Line: A linear regression line based on a short lookback period, colored blue for an uptrend and orange for a downtrend.

Long Regression Line: A linear regression line based on a longer lookback period, similarly colored blue for an uptrend and orange for a downtrend.

The script provides input options to adjust:

The length of short and long regression periods.
The smoothing length for the regression lines.
The timeframe for the linear regression calculations.

This tool can help traders observe the crossovers between the two smoothed linear regression lines, which are similar to moving average crossovers, but with the added benefit of regression-based smoothing to reduce noise. The color-coding allows for easy trend identification, with blue indicating an uptrend and orange indicating a downtrend.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.