OPEN-SOURCE SCRIPT

New Trading

100
// This indicator plots a Simple Moving Average (SMA) directly on the price chart.
// The line color changes dynamically based on the SMA's direction:
// green when the average is rising, red when it is falling.
// Use the "Length" input to control the smoothing period, and the "Source"
// input to choose which price series (close, open, hl2, etc.) the SMA is calculated on.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.