OPEN-SOURCE SCRIPT
Telah dikemas kini EMA6 or SMA6 Touch Alert

This script monitors the market and notifies you whenever the price touches either the 6-period EMA or the 6-period SMA.
It helps identify potential pullbacks, reaction points, or entry zones, as price interaction with these moving averages often signals short-term market shifts.
What the script does:
Calculates the EMA 6 and SMA 6
Detects if price touches either moving average within the candle
Plots both lines on the chart for visibility
Allows you to set alerts to receive automatic notifications
Best suited for:
Scalping
Day Trading
Pullback Entries
Short-term trend reactions
It helps identify potential pullbacks, reaction points, or entry zones, as price interaction with these moving averages often signals short-term market shifts.
What the script does:
Calculates the EMA 6 and SMA 6
Detects if price touches either moving average within the candle
Plots both lines on the chart for visibility
Allows you to set alerts to receive automatic notifications
Best suited for:
Scalping
Day Trading
Pullback Entries
Short-term trend reactions
Nota Keluaran
This Pine Script for TradingView is designed to help traders catch important short-term market touches on moving averages. It monitors both EMA (Exponential Moving Average) and SMA (Simple Moving Average) with fully customizable periods.Whether you are scalping, day trading, or monitoring pullbacks, this script notifies you when the price touches your selected EMA or SMA, giving you a timely opportunity to analyze or enter trades.
Key Features:
Customizable EMA & SMA lengths – adjust the periods to your trading strategy.
Alerts once per candle – avoids multiple alerts from the same price action.
Live or Close alert option – trigger alerts immediately when price touches, or wait until the candle closes for confirmation.
Pause alerts toggle – easily enable or disable alerts without removing the script.
Visual plots – EMA (red) and SMA (blue) displayed on the chart for quick reference.
This script is ideal for traders who want precise alerts on short-term movements while maintaining flexibility and control over notifications.
Nota Keluaran
This script triggers an alert when the price touches either an Exponential Moving Average (EMA), a Simple Moving Average (SMA), or both, based on your settings.It offers full flexibility while remaining lightweight and efficient — no visual plots, just pure alert logic.
Features
⚙️ Customizable Lengths – Choose separate lengths for EMA and SMA.
⏱️ Flexible Timeframe Selection – Calculate moving averages on any timeframe (e.g., 1m, 15m, 1h, Daily).
🔔 Selective Alerts – Choose whether to trigger alerts for EMA only, SMA only, or both.
🕐 Alert Timing – Option to alert live during the candle or only after candle close.
🚫 Single Alert per Bar – Prevents multiple alerts on the same candle.
💡 Minimal & Efficient – No chart plots, designed purely for alert logic.
Usage
Add the script to your chart.
Adjust EMA/SMA lengths, timeframe, and alert mode in the settings.
Create an alert using “Any alert() function call”.
Relax — you’ll get notified only when price touches your chosen MA(s) under your selected 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.