OPEN-SOURCE SCRIPT
Fusion Signals Pro [Apicode]

# Fusion Signals Pro [Apicode]
**Technical Documentation**
## 1. Overview
**Fusion Signals Pro** is a multi-indicator, multi-timeframe confirmation system developed in **Pine Script v6**.
Its primary goal is to **identify high-probability long and short entries** by requiring alignment across several momentum, trend, and oscillator indicators.
The indicator combines:
* Momentum (RPM, MACD)
* Oscillators (RSI, Stochastic, CCI, BBO)
* Trend-following logic (SuperTrend, EMA + T3 smoothing)
* A proprietary Heiken-Ashi–based trend module (**HACOLT**)
When all components align, the system generates **entry signals**, visual confirmations, and alerts.
---
## 2. Indicator Characteristics
| Property | Value |
| ------------------ | ----------------------------- |
| Script Version | Pine Script™ v6 |
| Overlay | Yes (candles, EMAs, signals) |
| Main Panel | Oscillator-style status panel |
| Repainting Control | Configurable per indicator |
| Market Types | Crypto, Stocks, ETFs |
| Timeframes | 15m, 30m, 1H, 2H and higher |
---
## 3. Architecture Summary
The indicator consists of **five major modules**:
1. **Multi-Timeframe Data Engine**
2. **Indicator Calculation Engine**
3. **Scoring & State Engine**
4. **Signal & Alert Engine**
5. **Trendline & HACOLT Engine**
---
## 4. Multi-Timeframe Data Engine
### `getSecurityData()`
This function safely retrieves higher- or alternate-timeframe data while controlling repainting behavior.
**Key features:**
* Supports real-time vs historical bar handling
* Optional repainting toggle per indicator
* Uses `request.security()` internally
```pinescript
getSecurityData(src, resolution, allowRepainting)
```
---
## 5. Indicator Components
### 5.1 RPM (Rate of Price Momentum)
**Purpose:**
Measures cumulative percentage price change over a defined period.
**Logic:**
* Calculates bar-to-bar % change
* Sums the change over `RPM Period`
**Signal Logic:**
* `> 0` → Bullish
* `< 0` → Bearish
---
### 5.2 BBO (Bull–Bear Oscillator)
**Custom oscillator combining:**
* Candle price structure
* RSI confirmation
* Super Smoother filter
**Output values:**
* `+100` → Bullish impulse
* `-100` → Bearish impulse
* `0` → Neutral
Smoothed using a **Super Smoother Moving Average**.
---
### 5.3 MACD
**Configurable elements:**
* Fast EMA
* Slow EMA
* Signal line
* Histogram or MACD line selection
**Signal Logic:**
* Positive value → Bullish
* Negative value → Bearish
Supports independent timeframe and repainting control.
---
### 5.4 RSI (Relative Strength Index)
**Standard RSI logic (14-period default)**
**Signal Threshold:**
* `> 50` → Bullish
* `< 50` → Bearish
---
### 5.5 Stochastic Oscillator
**Calculation:**
* %K → smoothed by SMA
* Uses configurable smoothing parameters
**Signal Threshold:**
* `> 50` → Bullish
* `< 50` → Bearish
---
### 5.6 CCI (Commodity Channel Index)
**Signal Logic:**
* `> 0` → Bullish
* `< 0` → Bearish
---
### 5.7 SuperTrend
**Parameters:**
* ATR Period
* Multiplier Factor
**Trend Logic:**
* Price above SuperTrend → Bullish
* Price below SuperTrend → Bearish
---
## 6. Visual Status Panel (Fusion Matrix)
Each indicator is plotted as a **horizontal square block**, color-coded:
* **Green** → Bullish
* **Red** → Bearish
### Indicator Order (Top to Bottom):
1. RPM
2. MACD
3. RSI
4. Stochastic
5. CCI
6. BBO
7. SuperTrend
8. HACOLT
Labels dynamically update on the last bar.
---
## 7. Scoring System
Each indicator contributes **1 point** when bullish.
| Indicator | Condition |
| ---------- | ----------- |
| RPM | `> 0` |
| MACD | `> 0` |
| RSI | `> 50` |
| Stochastic | `> 50` |
| CCI | `> 0` |
| BBO | `> 0` |
| SuperTrend | Price above |
**Score Range:** `0 → 7`
### Color Mapping
* **7** → Strong Green (Full alignment)
* **5–6** → Light Green
* **4** → Neutral (Gray)
* **1–3** → Light Red
* **0** → Strong Red
This score controls:
* Candle color
* Bar color
* Visual confidence level
---
## 8. Entry Logic
### Long Entry
All bullish conditions must be met:
```text
RPM > 0
MACD > 0
RSI > 50
Stochastic > 50
CCI > 0
BBO > 0
SuperTrend bullish
```
### Short Entry
All bearish conditions must be met (inverse logic).
---
## 9. Position State Machine
The indicator tracks trade direction using an internal state:
| State | Meaning |
| ----- | ---------- |
| `1` | Long bias |
| `-1` | Short bias |
| `0` | Neutral |
**Signals trigger only on state transitions**, reducing false signals and repeated entries.
---
## 10. Alerts
### Available Alerts
* Long Entry
* Short Entry
* Generic Entry (Long or Short)
* HACOLT Trend Change
Alerts include:
* Symbol
* Price
* Direction
---
## 11. Trendline Engine (EMA + T3)
### Features:
* Multi-timeframe EMA calculation
* T3 smoothing for noise reduction
* Auto / Multiplier / Manual timeframe selection
### Logic:
* EMA1 (fast) vs EMA2 (slow)
* Filled area changes color on crossover
* Acts as a **trend bias filter**
---
## 12. HACOLT Module (Advanced Trend Filter)
**HACOLT** is a proprietary trend detection system based on:
* Heiken-Ashi logic
* TEMA smoothing
* Candle structure analysis
* State persistence logic
### States:
* `1` → Bullish trend
* `-1` → Bearish trend
### Uses:
* Additional confirmation
* Early trend detection
* Visual trend persistence
---
## 13. Repainting Control
Each major component includes:
* Independent timeframe
* Independent repainting toggle
This allows:
* Backtesting accuracy
* Real-time responsiveness
* Hybrid confirmation setups
---
## 14. Intended Use
**Fusion Signals Pro is designed for:**
* Trend-following strategies
* Confirmation-based entries
* Multi-timeframe analysis
* Crypto and equity markets
⚠️ It is **not** intended as a standalone trading system without risk management.
---
## 15. Conclusion
Fusion Signals Pro is a **high-confluence trading indicator** that merges momentum, oscillators, and trend-following logic into a unified decision framework.
Its strength lies in **signal alignment**, **state tracking**, and **visual clarity**, making it suitable for both discretionary and systematic traders.
**Technical Documentation**
## 1. Overview
**Fusion Signals Pro** is a multi-indicator, multi-timeframe confirmation system developed in **Pine Script v6**.
Its primary goal is to **identify high-probability long and short entries** by requiring alignment across several momentum, trend, and oscillator indicators.
The indicator combines:
* Momentum (RPM, MACD)
* Oscillators (RSI, Stochastic, CCI, BBO)
* Trend-following logic (SuperTrend, EMA + T3 smoothing)
* A proprietary Heiken-Ashi–based trend module (**HACOLT**)
When all components align, the system generates **entry signals**, visual confirmations, and alerts.
---
## 2. Indicator Characteristics
| Property | Value |
| ------------------ | ----------------------------- |
| Script Version | Pine Script™ v6 |
| Overlay | Yes (candles, EMAs, signals) |
| Main Panel | Oscillator-style status panel |
| Repainting Control | Configurable per indicator |
| Market Types | Crypto, Stocks, ETFs |
| Timeframes | 15m, 30m, 1H, 2H and higher |
---
## 3. Architecture Summary
The indicator consists of **five major modules**:
1. **Multi-Timeframe Data Engine**
2. **Indicator Calculation Engine**
3. **Scoring & State Engine**
4. **Signal & Alert Engine**
5. **Trendline & HACOLT Engine**
---
## 4. Multi-Timeframe Data Engine
### `getSecurityData()`
This function safely retrieves higher- or alternate-timeframe data while controlling repainting behavior.
**Key features:**
* Supports real-time vs historical bar handling
* Optional repainting toggle per indicator
* Uses `request.security()` internally
```pinescript
getSecurityData(src, resolution, allowRepainting)
```
---
## 5. Indicator Components
### 5.1 RPM (Rate of Price Momentum)
**Purpose:**
Measures cumulative percentage price change over a defined period.
**Logic:**
* Calculates bar-to-bar % change
* Sums the change over `RPM Period`
**Signal Logic:**
* `> 0` → Bullish
* `< 0` → Bearish
---
### 5.2 BBO (Bull–Bear Oscillator)
**Custom oscillator combining:**
* Candle price structure
* RSI confirmation
* Super Smoother filter
**Output values:**
* `+100` → Bullish impulse
* `-100` → Bearish impulse
* `0` → Neutral
Smoothed using a **Super Smoother Moving Average**.
---
### 5.3 MACD
**Configurable elements:**
* Fast EMA
* Slow EMA
* Signal line
* Histogram or MACD line selection
**Signal Logic:**
* Positive value → Bullish
* Negative value → Bearish
Supports independent timeframe and repainting control.
---
### 5.4 RSI (Relative Strength Index)
**Standard RSI logic (14-period default)**
**Signal Threshold:**
* `> 50` → Bullish
* `< 50` → Bearish
---
### 5.5 Stochastic Oscillator
**Calculation:**
* %K → smoothed by SMA
* Uses configurable smoothing parameters
**Signal Threshold:**
* `> 50` → Bullish
* `< 50` → Bearish
---
### 5.6 CCI (Commodity Channel Index)
**Signal Logic:**
* `> 0` → Bullish
* `< 0` → Bearish
---
### 5.7 SuperTrend
**Parameters:**
* ATR Period
* Multiplier Factor
**Trend Logic:**
* Price above SuperTrend → Bullish
* Price below SuperTrend → Bearish
---
## 6. Visual Status Panel (Fusion Matrix)
Each indicator is plotted as a **horizontal square block**, color-coded:
* **Green** → Bullish
* **Red** → Bearish
### Indicator Order (Top to Bottom):
1. RPM
2. MACD
3. RSI
4. Stochastic
5. CCI
6. BBO
7. SuperTrend
8. HACOLT
Labels dynamically update on the last bar.
---
## 7. Scoring System
Each indicator contributes **1 point** when bullish.
| Indicator | Condition |
| ---------- | ----------- |
| RPM | `> 0` |
| MACD | `> 0` |
| RSI | `> 50` |
| Stochastic | `> 50` |
| CCI | `> 0` |
| BBO | `> 0` |
| SuperTrend | Price above |
**Score Range:** `0 → 7`
### Color Mapping
* **7** → Strong Green (Full alignment)
* **5–6** → Light Green
* **4** → Neutral (Gray)
* **1–3** → Light Red
* **0** → Strong Red
This score controls:
* Candle color
* Bar color
* Visual confidence level
---
## 8. Entry Logic
### Long Entry
All bullish conditions must be met:
```text
RPM > 0
MACD > 0
RSI > 50
Stochastic > 50
CCI > 0
BBO > 0
SuperTrend bullish
```
### Short Entry
All bearish conditions must be met (inverse logic).
---
## 9. Position State Machine
The indicator tracks trade direction using an internal state:
| State | Meaning |
| ----- | ---------- |
| `1` | Long bias |
| `-1` | Short bias |
| `0` | Neutral |
**Signals trigger only on state transitions**, reducing false signals and repeated entries.
---
## 10. Alerts
### Available Alerts
* Long Entry
* Short Entry
* Generic Entry (Long or Short)
* HACOLT Trend Change
Alerts include:
* Symbol
* Price
* Direction
---
## 11. Trendline Engine (EMA + T3)
### Features:
* Multi-timeframe EMA calculation
* T3 smoothing for noise reduction
* Auto / Multiplier / Manual timeframe selection
### Logic:
* EMA1 (fast) vs EMA2 (slow)
* Filled area changes color on crossover
* Acts as a **trend bias filter**
---
## 12. HACOLT Module (Advanced Trend Filter)
**HACOLT** is a proprietary trend detection system based on:
* Heiken-Ashi logic
* TEMA smoothing
* Candle structure analysis
* State persistence logic
### States:
* `1` → Bullish trend
* `-1` → Bearish trend
### Uses:
* Additional confirmation
* Early trend detection
* Visual trend persistence
---
## 13. Repainting Control
Each major component includes:
* Independent timeframe
* Independent repainting toggle
This allows:
* Backtesting accuracy
* Real-time responsiveness
* Hybrid confirmation setups
---
## 14. Intended Use
**Fusion Signals Pro is designed for:**
* Trend-following strategies
* Confirmation-based entries
* Multi-timeframe analysis
* Crypto and equity markets
⚠️ It is **not** intended as a standalone trading system without risk management.
---
## 15. Conclusion
Fusion Signals Pro is a **high-confluence trading indicator** that merges momentum, oscillators, and trend-following logic into a unified decision framework.
Its strength lies in **signal alignment**, **state tracking**, and **visual clarity**, making it suitable for both discretionary and systematic traders.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.