EMA Break & Retest + Trend Table

✅ 1. EMA Break & Retest Logic
Detects when the price crosses above or below the 21 EMA and then closes in the direction of the breakout.
Generates buy signals on upward break/retest, and sell signals on downward break/retest.
✅ 2. Multi-Timeframe Confirmation
Filters signals using higher timeframe trends to avoid false entries.
Buy signals are shown only if the 1H or 4H trend is bullish.
Sell signals are shown only if the 1H or 4H trend is bearish.
✅ 3. Visual Signal Plotting
Displays green "BUY" labels below bars and red "SELL" labels above bars.
Users can toggle buy/sell signals on or off with checkboxes.
✅ 4. Alerts
Built-in alertcondition() functions allow traders to set real-time alerts when buy or sell signals are triggered.
✅ 5. Multi-Timeframe Trend Table
A dynamic table appears in the top-right corner showing trend status across:
Daily (D)
4 Hour (4H)
1 Hour (1H)
15 Minute (15M)
5 Minute (5M)
Each timeframe is marked as Bullish (green) or Bearish (red) depending on the current price vs. 21 EMA.
The latest signal (“BUY” / “SELL” / “—”) is displayed at the bottom of the table.
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.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.
Penafian
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.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.