OPEN-SOURCE SCRIPT
Cập nhật MACD 6-20 Fast MACD with Signal Arrows

MACD 6/20 — Fast MACD with Signal Arrows
A faster MACD variant using EMA 6/20 instead of the standard 12/26 settings, with a 9-period signal line. Designed for traders who want earlier trend detection and quicker crossover signals.
What it does:
This indicator plots the MACD line (EMA 6 minus EMA 20) against a 9-period EMA signal line, with a color-coded histogram and visual crossover arrows.
Features:
- MACD line (blue) and Signal line (orange)
- Histogram: green when MACD > Signal, red when MACD < Signal
- Green triangle arrows at bullish crossovers (MACD crosses above Signal)
- Red triangle arrows at bearish crossovers (MACD crosses below Signal)
- All parameters adjustable (Fast Length, Slow Length, Signal Smoothing)
- Histogram can be toggled on/off
Why 6/20 instead of 12/26?
The shorter EMA periods make the indicator more responsive to price changes. The 6/20 combination catches trend shifts earlier than the standard MACD, which is useful for swing trading and intraday setups. The trade-off is more signals — filter with higher timeframe context or price action confirmation.
How to use:
- Bullish signal: green arrow (MACD crosses above Signal)
- Bearish signal: red arrow (MACD crosses below Signal)
- Histogram expansion confirms momentum
- Works on all timeframes — best combined with multi-timeframe analysis (e.g. Weekly/Daily for direction, 5min for entries)
Settings:
- Fast Length: 6 (default)
- Slow Length: 20 (default)
- Signal Smoothing: 9 (default)
- Source: Close (default)
A faster MACD variant using EMA 6/20 instead of the standard 12/26 settings, with a 9-period signal line. Designed for traders who want earlier trend detection and quicker crossover signals.
What it does:
This indicator plots the MACD line (EMA 6 minus EMA 20) against a 9-period EMA signal line, with a color-coded histogram and visual crossover arrows.
Features:
- MACD line (blue) and Signal line (orange)
- Histogram: green when MACD > Signal, red when MACD < Signal
- Green triangle arrows at bullish crossovers (MACD crosses above Signal)
- Red triangle arrows at bearish crossovers (MACD crosses below Signal)
- All parameters adjustable (Fast Length, Slow Length, Signal Smoothing)
- Histogram can be toggled on/off
Why 6/20 instead of 12/26?
The shorter EMA periods make the indicator more responsive to price changes. The 6/20 combination catches trend shifts earlier than the standard MACD, which is useful for swing trading and intraday setups. The trade-off is more signals — filter with higher timeframe context or price action confirmation.
How to use:
- Bullish signal: green arrow (MACD crosses above Signal)
- Bearish signal: red arrow (MACD crosses below Signal)
- Histogram expansion confirms momentum
- Works on all timeframes — best combined with multi-timeframe analysis (e.g. Weekly/Daily for direction, 5min for entries)
Settings:
- Fast Length: 6 (default)
- Slow Length: 20 (default)
- Signal Smoothing: 9 (default)
- Source: Close (default)
Phát hành các Ghi chú
Update: MACD line now changes color based on signal crossover:
- Green when MACD is above signal line, red when below.
- Signal line changed to gray for better contrast.
- Arrow signals unchanged.
Phát hành các Ghi chú
minor Colour updatesPhát hành các Ghi chú
layoutMã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.