OPEN-SOURCE SCRIPT

n-Day Stock Return with MAs and Slopes

40
This indicator calculates the n-day percentage return of a stock and visualizes it either as a histogram or line, with optional moving averages (MA1 and MA2) of the return and their slopes. The script highlights trend changes in the slopes of these moving averages by drawing colored horizontal markers at each reversal point—green for upward slope shifts, red for downward shifts, and gray when the slope turns flat—allowing users to quickly identify strengthening, weakening, or neutral return trends over time. It also includes optional slope plots for additional trend context and a zero reference line for distinguishing positive and negative performance.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。