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.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.