OPEN-SOURCE SCRIPT
Telah dikemas kini

Buy & Sell Signal Indicator based on 9 ema

222
Script Summary: Buy & Sell Signal Indicator
This Pine Script v5 indicator is designed to generate buy and sell signals based on the relationship between the 9-period EMA (Exponential Moving Average) and trend structure (higher highs, higher lows for buy signals; lower highs, lower lows for sell signals).

Main Components:
9 EMA Calculation

ema9 = ta.ema(close, 9)
Acts as a trend filter for trade signals.
Trend Identification:

Higher Highs & Higher Lows → Indicates an uptrend
Lower Highs & Lower Lows → Indicates a downtrend
Buy Signal Condition:

close > ema9 and close[1] > ema9 (above EMA)
Presence of higher highs and higher lows
Indicates a bullish trend → Plots a green "BUY" label below bars.
Sell Signal Condition:

close < ema9 and close[1] < ema9 (below EMA)
Presence of lower highs and lower lows
Indicates a bearish trend → Plots a red "SELL" label above bars.
Chart Visuals:

Green "BUY" label below bars for buy signals.
Red "SELL" label above bars for sell signals.
Blue 9 EMA line for trend reference.
Usage & Interpretation:
Buy signals suggest potential long entries in an uptrend.
Sell signals suggest potential short entries in a downtrend.
Works best in trending markets rather than ranging conditions.
Nota Keluaran
New Features & Enhancements:
✅ Added Checkboxes to Enable/Disable Tickers

You can now toggle each ticker ON/OFF with a checkbox.
If disabled, the ticker is ignored in the confirmation logic.
✅ User-Friendly Inputs:

Customizable tickers and EMA periods for each selected asset.
✅ Buy & Sell Signals Based on Active Tickers:

If a ticker is enabled, it must be above/below its EMA for a signal.
If a ticker is disabled, it is ignored, making the script more flexible.
✅ Replaced "BUY" and "SELL" with "B" and "S" for a cleaner look.

How to Use:
Check or Uncheck tickers to enable/disable them.
Enter up to three tickers (e.g., "ADD", "QQQ", "SPY").
Adjust EMA periods for each ticker and the main chart.
Run the script on a 1-minute chart for real-time signals.
Look for "B" and "S" signals to confirm trade opportunities.
📈 This script helps filter high-probability trades by ensuring multiple assets align in the same trend direction! 🚀

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.