OPEN-SOURCE SCRIPT

200-Day SMA & EMA with StdDev Bands and Cross Tracking

46
Locks everything to the daily chart, regardless of which timeframe you’re viewing.

Plots two main moving averages:

A 200‑period Simple Moving Average (SMA).

A 200‑period Exponential Moving Average (EMA).

Draws shaded “bands” around each average at ±0.5σ, ±1σ, ±1.5σ, ±2σ, ±2.5σ, and ±3σ, with progressively fainter lines as you move farther from the mean.

Highlights a “stable zone” in the background when price has stayed within one standard deviation of the SMA for more than a user‑defined number of bars.

Detects and marks “deviation crossovers” between the SMA and EMA bands at 2σ, 2.5σ, and 3σ levels:

Draws a small circle at the crossover point.

Extends a line forward 500 bars at that price.

Automatically removes that line if price later touches it.

Marks Golden and Death Crosses (when the 50‑day EMA crosses the 200‑day EMA):

“GC” for Golden Cross, plotted in green.

“DC” for Death Cross, plotted in red, with the same forward‑extending line logic.

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.