OPEN-SOURCE SCRIPT

n-Day Stock Return with MAs and Slopes

33
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. קרא עוד ב־תנאי השימוש.