OPEN-SOURCE SCRIPT

Price vs 10/50DMA (%) — single label

38
This TradingView script shows how far the current price is from its 10-day and 50-day moving averages (DMAs), expressed as percentages, and displays both values as a single label near the latest candle — for example, “+3% vs 10DMA | +8% vs 50DMA.” You can switch between simple and exponential moving averages using the “Use EMA” checkbox, and adjust the period lengths in the input panel. To use it, simply copy the code into TradingView’s Pine Editor, click Add to chart, and you’ll see one live label updating each bar along with the plotted 10- and 50-day average lines.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。