OPEN-SOURCE SCRIPT

Trend Signale: EMA Crossovers & Exit Signale

115
✅ Explanation of the Changes:

Uptrend:

Detected when EMA8 crosses above EMA20 (Condition: crossover_up).

Downtrend:

Detected when EMA8 crosses below EMA20 (Condition: crossunder_down).

Exit Signals:

Exit Uptrend: When the close falls below EMA20 (Condition: exit_uptrend).

Exit Downtrend: When the close rises above EMA20 (Condition: exit_downtrend).

Alerts:

Uptrend Alert: When EMA8 > EMA20.

Downtrend Alert: When EMA8 < EMA20.

Exit Uptrend Alert: When the close falls below EMA20.

Exit Downtrend Alert: When the close rises above EMA20.

✅ Alert Settings:

For the Uptrend:

Select the condition EMA Crossover Up and set the alert to “Once per bar.”

Message: “📈 Uptrend detected: EMA8 crosses above EMA20”

For the Downtrend:

Select the condition EMA Crossover Down and set the alert to “Once per bar.”

Message: “📉 Downtrend detected: EMA8 crosses below EMA20”

For the Exit Signal in an Uptrend:

Select the condition Exit Uptrend and set the alert to “Once per bar.”

Message: “⚠️ Exit Uptrend: Close below EMA20”

For the Exit Signal in a Downtrend:

Select the condition Exit Downtrend and set the alert to “Once per bar.”

Message: “⚠️ Exit Downtrend: Close above EMA20”

✅ Chart Visualization:

Uptrend: A green arrow “↑” below the candle.

Downtrend: A red arrow “↓” above the candle.

Exit Uptrend: An orange arrow “↓” above the candle.

Exit Downtrend: A purple arrow “↑” below the candle

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.