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.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.