OPEN-SOURCE SCRIPT

MA with Difference GROK3

293
What This Indicator Does

This indicator enhances a simple moving average (SMA) with two key features:
Color-Changing Moving Average:
The moving average line changes color based on whether the current closing price is above or below it.
Green: Price is above the MA (potential bullish signal).
Red: Price is below the MA (potential bearish signal).
Dynamic Percentage Difference Label:
A label appears on the chart near the MA on the last bar, showing the percentage difference between the current closing price and the MA.
Positive percentage (e.g., "Diff: 2.34%"): Price is above the MA.
Negative percentage (e.g., "Diff: -1.87%"): Price is below the MA.

免責聲明

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