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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.