OPEN-SOURCE SCRIPT
SGM Gold Day Trading EMAs

What it does
This tool plots four Exponential Moving Averages (EMAs) with practical default periods for gold intraday analysis: 9 (Momentum), 21 (Pullback), 50 (Trend Filter), and 200 (Macro). The goal is to provide a clear, multi-horizon structure so traders can quickly assess momentum, pullbacks, intermediate trend, and long-term bias on the same chart.
How it works (method)
Each line is a standard EMA computed on the close price.
The defaults map to common roles:
EMA 9 – Momentum: immediate changes in short-term flow.
EMA 21 – Pullback: typical retracement area within ongoing trends.
EMA 50 – Trend Filter: medium-term confirmation of direction.
EMA 200 – Macro: long-term bias and market context.
Optional dynamic color for EMA9/EMA21 highlights whether EMA9 ≥ EMA21 (green) or not (red). This is a visual aid only; it does not generate signals.
Originality & usefulness
The script focuses on clarity and control rather than automation. It combines a neutral, high-contrast palette with independent line thickness per EMA and an optional visual crossover mode. The configuration encourages disciplined analysis across time horizons without embedding opaque entry/exit logic.
Inputs & customization:
Periods: 9, 21, 50, 200 (all adjustable).
Colors: fully customizable for each EMA; optional crossover color mode for 9/21.
Line thickness: set individually per EMA to emphasize your primary reference.
How to use:
Add the script on any timeframe/asset (gold defaults are provided but not required).
Use EMA 200 for long-term bias; trade with caution against it.
Use EMA 50 to filter intermediate trend; prefer setups aligned with it.
Watch EMA 21 as a pullback reference within trends.
Use EMA 9 to gauge momentum around pullbacks/breakouts.
(Optional) Enable the crossover color to quickly see when momentum (9) is above/below pullback (21).
Notes & limitations:
This script does not produce buy/sell signals or alerts.
It is intended as a visual framework to support analysis and risk management.
Always validate with your own rules, risk controls, and market conditions.
This tool plots four Exponential Moving Averages (EMAs) with practical default periods for gold intraday analysis: 9 (Momentum), 21 (Pullback), 50 (Trend Filter), and 200 (Macro). The goal is to provide a clear, multi-horizon structure so traders can quickly assess momentum, pullbacks, intermediate trend, and long-term bias on the same chart.
How it works (method)
Each line is a standard EMA computed on the close price.
The defaults map to common roles:
EMA 9 – Momentum: immediate changes in short-term flow.
EMA 21 – Pullback: typical retracement area within ongoing trends.
EMA 50 – Trend Filter: medium-term confirmation of direction.
EMA 200 – Macro: long-term bias and market context.
Optional dynamic color for EMA9/EMA21 highlights whether EMA9 ≥ EMA21 (green) or not (red). This is a visual aid only; it does not generate signals.
Originality & usefulness
The script focuses on clarity and control rather than automation. It combines a neutral, high-contrast palette with independent line thickness per EMA and an optional visual crossover mode. The configuration encourages disciplined analysis across time horizons without embedding opaque entry/exit logic.
Inputs & customization:
Periods: 9, 21, 50, 200 (all adjustable).
Colors: fully customizable for each EMA; optional crossover color mode for 9/21.
Line thickness: set individually per EMA to emphasize your primary reference.
How to use:
Add the script on any timeframe/asset (gold defaults are provided but not required).
Use EMA 200 for long-term bias; trade with caution against it.
Use EMA 50 to filter intermediate trend; prefer setups aligned with it.
Watch EMA 21 as a pullback reference within trends.
Use EMA 9 to gauge momentum around pullbacks/breakouts.
(Optional) Enable the crossover color to quickly see when momentum (9) is above/below pullback (21).
Notes & limitations:
This script does not produce buy/sell signals or alerts.
It is intended as a visual framework to support analysis and risk management.
Always validate with your own rules, risk controls, and market conditions.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
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.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
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.