OPEN-SOURCE SCRIPT
SIGNALS FROM FU

Here's the core logic of your customized indicator broken down into key components:
### 1. **Engulfing Pattern Detection**
- **Bullish Engulfing** (Long Setup):
- Current candle closes ABOVE previous high
- Current low <= previous low
- Previous candle was bearish (close < open)
- **Bearish Engulfing** (Short Setup):
- Current candle closes BELOW previous low
- Current high >= previous high
- Previous candle was bullish (close > open)
### 2. **Signal Storage System**
- Stores price levels from valid engulfing patterns in arrays
- Keeps track of:
- Price level (wick low/high)
- Bar index of occurrence
- Cross status (activated or not)
- Automatically removes oldest entries to limit memory usage (max 100 entries)
### 3. **Reverse Cross Trigger Logic**
- **Long Signals** (Purple ▲):
- Triggers when price makes HIGH >= stored bullish engulfing low
- Requires cross BELOW signal level
- Must wait minimum 90 bars after initial pattern
- **Short Signals** (Purple ▼):
- Triggers when price makes LOW <= stored bearish engulfing high
- Requires cross ABOVE signal level
- Same 90-bar minimum delay
### 4. **Trend Alignment Filter**
- Uses 10-period double-smoothed EMA (smema) for trend direction:
- **Up Trend**: smema > previous smema
- **Down Trend**: smema < previous smema
- Only shows:
- Long signals in uptrends
- Short signals in downtrends
### 5. **Price Action Confirmation**
- Final filter requires:
- For Longs: Bearish close (close < open) on trigger bar
- For Shorts: Bullish close (close > open) on trigger bar
### 6. **Signal Display**
- Clean visual output:
- Purple triangles ONLY (no trend lines/bands by default)
- ▲ Above bars for long entries
- ▼ Below bars for short entries
- No secondary indicators cluttering chart
This creates a focused trading system that:
1. Identifies strong reversal patterns
2. Waits for confirmation of breakout failure
3. Aligns with underlying trend direction
4. Requires decisive price action at trigger point
5. Shows only essential signals on clean chart
The combination of failed breakout + trend alignment + immediate price confirmation creates high-probability reversal signals while filtering out false positives.
### 1. **Engulfing Pattern Detection**
- **Bullish Engulfing** (Long Setup):
- Current candle closes ABOVE previous high
- Current low <= previous low
- Previous candle was bearish (close < open)
- **Bearish Engulfing** (Short Setup):
- Current candle closes BELOW previous low
- Current high >= previous high
- Previous candle was bullish (close > open)
### 2. **Signal Storage System**
- Stores price levels from valid engulfing patterns in arrays
- Keeps track of:
- Price level (wick low/high)
- Bar index of occurrence
- Cross status (activated or not)
- Automatically removes oldest entries to limit memory usage (max 100 entries)
### 3. **Reverse Cross Trigger Logic**
- **Long Signals** (Purple ▲):
- Triggers when price makes HIGH >= stored bullish engulfing low
- Requires cross BELOW signal level
- Must wait minimum 90 bars after initial pattern
- **Short Signals** (Purple ▼):
- Triggers when price makes LOW <= stored bearish engulfing high
- Requires cross ABOVE signal level
- Same 90-bar minimum delay
### 4. **Trend Alignment Filter**
- Uses 10-period double-smoothed EMA (smema) for trend direction:
- **Up Trend**: smema > previous smema
- **Down Trend**: smema < previous smema
- Only shows:
- Long signals in uptrends
- Short signals in downtrends
### 5. **Price Action Confirmation**
- Final filter requires:
- For Longs: Bearish close (close < open) on trigger bar
- For Shorts: Bullish close (close > open) on trigger bar
### 6. **Signal Display**
- Clean visual output:
- Purple triangles ONLY (no trend lines/bands by default)
- ▲ Above bars for long entries
- ▼ Below bars for short entries
- No secondary indicators cluttering chart
This creates a focused trading system that:
1. Identifies strong reversal patterns
2. Waits for confirmation of breakout failure
3. Aligns with underlying trend direction
4. Requires decisive price action at trigger point
5. Shows only essential signals on clean chart
The combination of failed breakout + trend alignment + immediate price confirmation creates high-probability reversal signals while filtering out false positives.
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.