OPEN-SOURCE SCRIPT
Actualizado ORACLE MATRIX RED PILL

# 🔴 ORACLE MATRIX RED PILL — by Kltony
### *"Take the Red Pill. See the Pattern. The Oracle Never Lies."*
---
## 🇮🇹 DESCRIZIONE ITALIANA
**Oracle Matrix Red Pill** è un indicatore avanzato per TradingView scritto in Pine Script v6 che fonde tre motori algoritmici in un unico strumento: il filtro di liquidità AlgoAlpha, il sistema di trailing stop UT Bot e un motore di backtest visivo multi-trade in tempo reale.
Progettato e ottimizzato per **scalping su XAUUSD a 30 minuti**, ideale nelle sessioni di Londra e New York.
---
### ⚙️ COSA FA
**1 — Liquidity Sweep Engine (AlgoAlpha)**
Identifica i livelli di liquidità istituzionale tracciando i picchi e i minimi volumetrici significativi. Quando il prezzo "sweeppa" questi livelli — esattamente come fanno i market maker prima di invertire — l'indicatore lo segnala in tempo reale con label e intensità volumetrica. Distingue sweep minori da sweep maggiori tramite una soglia configurabile.
**2 — UT Bot Trailing Stop**
Il motore UT Bot calcola uno stop trail dinamico basato sull'ATR moltiplicato per un Key Value regolabile. Genera segnali BUY e SELL solo quando il prezzo attraversa questo livello in modo netto, colorando le barre in base alla posizione rispetto allo stop.
**3 — Filtro Trend Combinato**
Il segnale finale viene emesso SOLO quando entrambi i motori sono allineati: UT Bot bullish + trend AlgoAlpha positivo per i BUY, UT Bot bearish + trend negativo per i SELL. Questo elimina la maggior parte dei falsi segnali in mercati laterali.
**4 — Filtri Opzionali Avanzati**
- RSI Filter: entra solo se RSI è sopra/sotto una soglia configurabile
- Volume Filter: segnale solo con volume superiore alla sua media mobile
- Session Filter: limita i segnali alle sessioni di Londra (07:00–12:00 UTC) e New York (13:00–18:00 UTC)
- EMA Trend Filter: opera solo nella direzione della EMA (default 200)
- ATR Volatility Filter: blocca i segnali nei mercati piatti (ATR < ATR-MA)
- Sweep Confirmation Filter: richiede uno sweep di liquidità attivo per confermare il segnale
**5 — Volume Profile Dinamico**
Visualizza un profilo di volume aggiornato in tempo reale relativo al trend corrente, con Point of Control (POC) automatico. Aiuta a identificare le zone di maggiore interesse istituzionale.
**6 — Backtest Engine Visivo Multi-Trade**
Il cuore dell'indicatore. TP e SL si esprimono in **pips** con moltiplicatore configurabile (XAUUSD default: 0.1). Ogni segnale apre un trade indipendente sulla **candela successiva** (a open della barra dopo il segnale). I trade rimangono aperti contemporaneamente e sovrapposti finché non toccano TP o SL. Sul grafico appaiono:
- 🟢 Box verde = zona TP
- 🔴 Box rosso = zona SL
- ➖ Linea tratteggiata = prezzo di entry
- Label apertura con direzione e prezzo
- Label chiusura con ✔ TP o ✘ SL e pips
- Panel in tempo reale con W / L / Total / Win Rate / R:R / Breakeven
---
### 📋 IMPOSTAZIONI CONSIGLIATE PER XAUUSD 30M
| Parametro | Valore consigliato |
|---|---|
| Timeframe | 30 minuti |
| AlgoAlpha Length | 12 |
| AlgoAlpha Multiplier | 2.0 |
| UT Bot Key Value | 1.0 |
| UT Bot ATR Period | 10 |
| Session Filter | ON — London + New York |
| EMA Filter | ON — EMA 200 |
| ATR Volatility Filter | ON |
| TP (pips) | 150 |
| SL (pips) | 75 |
| Pip Multiplier | 0.1 |
---
### 💡 CONSIGLI DI UTILIZZO
- **Aspetta le kill zone**: i segnali più affidabili arrivano tra le 08:00–10:00 e le 14:00–16:00 ora italiana, nell'overlap tra sessione europea e americana.
- **Non tradare contro l'EMA 200**: attiva il filtro EMA e non aprire mai contro il trend macro.
- **Usa il backtest panel**: prima di fare live, testa diversi valori di TP/SL e osserva il win rate storico sul simbolo che vuoi tradare.
- **Sweep di liquidità come conferma**: se attivi il Sweep Filter, ricevi solo segnali preceduti da un'iniezione di liquidità — setup tipicamente più esplosivi.
- **Trade sovrapposti**: il motore di backtest permette trade multipli contemporanei, esattamente come accade nel trading reale con posizioni piramidali o multi-entry.
- **XAUUSD è volatile**: non usare SL troppo stretti sotto i 50 pips su 30M, il rumore di mercato li brucia facilmente.
---
### ⚠️ DISCLAIMER
Questo indicatore è uno strumento di analisi tecnica. Non costituisce consiglio finanziario. Effettua sempre la tua analisi e gestisci il rischio con responsabilità. Il backtest visuale è indicativo e non garantisce risultati futuri.
---
---
## 🇬🇧 ENGLISH DESCRIPTION
**Oracle Matrix Red Pill** is an advanced TradingView indicator written in Pine Script v6 that merges three algorithmic engines into a single tool: the AlgoAlpha Liquidity Sweep Filter, the UT Bot trailing stop system, and a real-time multi-trade visual backtest engine.
Designed and optimised for **scalping XAUUSD on the 30-minute timeframe**, with a focus on London and New York sessions.
---
### ⚙️ WHAT IT DOES
**1 — Liquidity Sweep Engine (AlgoAlpha)**
Identifies institutional liquidity levels by tracking significant volumetric peaks and valleys. When price sweeps through these levels — exactly as market makers do before reversing — the indicator flags it in real time with labels and volumetric intensity scores. Minor and major sweeps are distinguished via a configurable threshold.
**2 — UT Bot Trailing Stop**
The UT Bot engine calculates a dynamic trailing stop based on ATR multiplied by an adjustable Key Value. BUY and SELL signals are generated only when price cleanly crosses this level, with bar colouring based on position relative to the stop.
**3 — Combined Trend Filter**
The final signal fires ONLY when both engines align: UT Bot bullish + positive AlgoAlpha trend for BUYs, UT Bot bearish + negative trend for SELLs. This eliminates most false signals in ranging markets.
**4 — Advanced Optional Filters**
- RSI Filter: enter only if RSI is above/below a configurable threshold
- Volume Filter: signal only when volume exceeds its moving average
- Session Filter: restrict signals to London (07:00–12:00 UTC) and New York (13:00–18:00 UTC) sessions
- EMA Trend Filter: trade only in the direction of the EMA (default 200)
- ATR Volatility Filter: block signals in flat markets (ATR < ATR-MA)
- Sweep Confirmation Filter: require an active liquidity sweep to confirm the signal
**5 — Dynamic Volume Profile**
Displays a real-time volume profile relative to the current trend, with automatic Point of Control (POC). Helps identify zones of greatest institutional interest.
**6 — Multi-Trade Visual Backtest Engine**
The heart of the indicator. TP and SL are expressed in **pips** with a configurable multiplier (XAUUSD default: 0.1). Each signal opens an independent trade on the **next candle** (at the open of the bar following the signal). Trades remain open simultaneously and overlapping until they hit TP or SL. On the chart you will see:
- 🟢 Green box = TP zone
- 🔴 Red box = SL zone
- ➖ Dashed line = entry price
- Entry label with direction and price
- Exit label with ✔ TP or ✘ SL and pips
- Live panel showing W / L / Total / Win Rate / R:R / Breakeven
---
### 📋 RECOMMENDED SETTINGS FOR XAUUSD 30M
| Parameter | Recommended Value |
|---|---|
| Timeframe | 30 minutes |
| AlgoAlpha Length | 12 |
| AlgoAlpha Multiplier | 2.0 |
| UT Bot Key Value | 1.0 |
| UT Bot ATR Period | 10 |
| Session Filter | ON — London + New York |
| EMA Filter | ON — EMA 200 |
| ATR Volatility Filter | ON |
| TP (pips) | 150 |
| SL (pips) | 75 |
| Pip Multiplier | 0.1 |
---
### 💡 HOW TO USE IT
- **Wait for the kill zones**: the most reliable signals appear between 07:00–10:00 and 13:00–16:00 UTC, in the European/American session overlap.
- **Never trade against the EMA 200**: enable the EMA filter and avoid entries that go against the macro trend.
- **Use the backtest panel**: before going live, test different TP/SL values and observe the historical win rate on your target symbol.
- **Liquidity sweeps as confirmation**: enabling the Sweep Filter delivers only signals preceded by a liquidity injection — typically more explosive setups.
- **Overlapping trades**: the backtest engine supports multiple simultaneous trades, exactly as happens in real trading with pyramidal or multi-entry positions.
- **XAUUSD is volatile**: avoid SL tighter than 50 pips on the 30M chart — market noise will take them out regularly.
---
### ⚠️ DISCLAIMER
This indicator is a technical analysis tool. It does not constitute financial advice. Always conduct your own analysis and manage risk responsibly. The visual backtest is indicative and does not guarantee future results.
---
*Oracle Matrix Red Pill — by Kltony*
*"Take the Red Pill. See the Pattern. The Oracle Never Lies."*
### *"Take the Red Pill. See the Pattern. The Oracle Never Lies."*
---
## 🇮🇹 DESCRIZIONE ITALIANA
**Oracle Matrix Red Pill** è un indicatore avanzato per TradingView scritto in Pine Script v6 che fonde tre motori algoritmici in un unico strumento: il filtro di liquidità AlgoAlpha, il sistema di trailing stop UT Bot e un motore di backtest visivo multi-trade in tempo reale.
Progettato e ottimizzato per **scalping su XAUUSD a 30 minuti**, ideale nelle sessioni di Londra e New York.
---
### ⚙️ COSA FA
**1 — Liquidity Sweep Engine (AlgoAlpha)**
Identifica i livelli di liquidità istituzionale tracciando i picchi e i minimi volumetrici significativi. Quando il prezzo "sweeppa" questi livelli — esattamente come fanno i market maker prima di invertire — l'indicatore lo segnala in tempo reale con label e intensità volumetrica. Distingue sweep minori da sweep maggiori tramite una soglia configurabile.
**2 — UT Bot Trailing Stop**
Il motore UT Bot calcola uno stop trail dinamico basato sull'ATR moltiplicato per un Key Value regolabile. Genera segnali BUY e SELL solo quando il prezzo attraversa questo livello in modo netto, colorando le barre in base alla posizione rispetto allo stop.
**3 — Filtro Trend Combinato**
Il segnale finale viene emesso SOLO quando entrambi i motori sono allineati: UT Bot bullish + trend AlgoAlpha positivo per i BUY, UT Bot bearish + trend negativo per i SELL. Questo elimina la maggior parte dei falsi segnali in mercati laterali.
**4 — Filtri Opzionali Avanzati**
- RSI Filter: entra solo se RSI è sopra/sotto una soglia configurabile
- Volume Filter: segnale solo con volume superiore alla sua media mobile
- Session Filter: limita i segnali alle sessioni di Londra (07:00–12:00 UTC) e New York (13:00–18:00 UTC)
- EMA Trend Filter: opera solo nella direzione della EMA (default 200)
- ATR Volatility Filter: blocca i segnali nei mercati piatti (ATR < ATR-MA)
- Sweep Confirmation Filter: richiede uno sweep di liquidità attivo per confermare il segnale
**5 — Volume Profile Dinamico**
Visualizza un profilo di volume aggiornato in tempo reale relativo al trend corrente, con Point of Control (POC) automatico. Aiuta a identificare le zone di maggiore interesse istituzionale.
**6 — Backtest Engine Visivo Multi-Trade**
Il cuore dell'indicatore. TP e SL si esprimono in **pips** con moltiplicatore configurabile (XAUUSD default: 0.1). Ogni segnale apre un trade indipendente sulla **candela successiva** (a open della barra dopo il segnale). I trade rimangono aperti contemporaneamente e sovrapposti finché non toccano TP o SL. Sul grafico appaiono:
- 🟢 Box verde = zona TP
- 🔴 Box rosso = zona SL
- ➖ Linea tratteggiata = prezzo di entry
- Label apertura con direzione e prezzo
- Label chiusura con ✔ TP o ✘ SL e pips
- Panel in tempo reale con W / L / Total / Win Rate / R:R / Breakeven
---
### 📋 IMPOSTAZIONI CONSIGLIATE PER XAUUSD 30M
| Parametro | Valore consigliato |
|---|---|
| Timeframe | 30 minuti |
| AlgoAlpha Length | 12 |
| AlgoAlpha Multiplier | 2.0 |
| UT Bot Key Value | 1.0 |
| UT Bot ATR Period | 10 |
| Session Filter | ON — London + New York |
| EMA Filter | ON — EMA 200 |
| ATR Volatility Filter | ON |
| TP (pips) | 150 |
| SL (pips) | 75 |
| Pip Multiplier | 0.1 |
---
### 💡 CONSIGLI DI UTILIZZO
- **Aspetta le kill zone**: i segnali più affidabili arrivano tra le 08:00–10:00 e le 14:00–16:00 ora italiana, nell'overlap tra sessione europea e americana.
- **Non tradare contro l'EMA 200**: attiva il filtro EMA e non aprire mai contro il trend macro.
- **Usa il backtest panel**: prima di fare live, testa diversi valori di TP/SL e osserva il win rate storico sul simbolo che vuoi tradare.
- **Sweep di liquidità come conferma**: se attivi il Sweep Filter, ricevi solo segnali preceduti da un'iniezione di liquidità — setup tipicamente più esplosivi.
- **Trade sovrapposti**: il motore di backtest permette trade multipli contemporanei, esattamente come accade nel trading reale con posizioni piramidali o multi-entry.
- **XAUUSD è volatile**: non usare SL troppo stretti sotto i 50 pips su 30M, il rumore di mercato li brucia facilmente.
---
### ⚠️ DISCLAIMER
Questo indicatore è uno strumento di analisi tecnica. Non costituisce consiglio finanziario. Effettua sempre la tua analisi e gestisci il rischio con responsabilità. Il backtest visuale è indicativo e non garantisce risultati futuri.
---
---
## 🇬🇧 ENGLISH DESCRIPTION
**Oracle Matrix Red Pill** is an advanced TradingView indicator written in Pine Script v6 that merges three algorithmic engines into a single tool: the AlgoAlpha Liquidity Sweep Filter, the UT Bot trailing stop system, and a real-time multi-trade visual backtest engine.
Designed and optimised for **scalping XAUUSD on the 30-minute timeframe**, with a focus on London and New York sessions.
---
### ⚙️ WHAT IT DOES
**1 — Liquidity Sweep Engine (AlgoAlpha)**
Identifies institutional liquidity levels by tracking significant volumetric peaks and valleys. When price sweeps through these levels — exactly as market makers do before reversing — the indicator flags it in real time with labels and volumetric intensity scores. Minor and major sweeps are distinguished via a configurable threshold.
**2 — UT Bot Trailing Stop**
The UT Bot engine calculates a dynamic trailing stop based on ATR multiplied by an adjustable Key Value. BUY and SELL signals are generated only when price cleanly crosses this level, with bar colouring based on position relative to the stop.
**3 — Combined Trend Filter**
The final signal fires ONLY when both engines align: UT Bot bullish + positive AlgoAlpha trend for BUYs, UT Bot bearish + negative trend for SELLs. This eliminates most false signals in ranging markets.
**4 — Advanced Optional Filters**
- RSI Filter: enter only if RSI is above/below a configurable threshold
- Volume Filter: signal only when volume exceeds its moving average
- Session Filter: restrict signals to London (07:00–12:00 UTC) and New York (13:00–18:00 UTC) sessions
- EMA Trend Filter: trade only in the direction of the EMA (default 200)
- ATR Volatility Filter: block signals in flat markets (ATR < ATR-MA)
- Sweep Confirmation Filter: require an active liquidity sweep to confirm the signal
**5 — Dynamic Volume Profile**
Displays a real-time volume profile relative to the current trend, with automatic Point of Control (POC). Helps identify zones of greatest institutional interest.
**6 — Multi-Trade Visual Backtest Engine**
The heart of the indicator. TP and SL are expressed in **pips** with a configurable multiplier (XAUUSD default: 0.1). Each signal opens an independent trade on the **next candle** (at the open of the bar following the signal). Trades remain open simultaneously and overlapping until they hit TP or SL. On the chart you will see:
- 🟢 Green box = TP zone
- 🔴 Red box = SL zone
- ➖ Dashed line = entry price
- Entry label with direction and price
- Exit label with ✔ TP or ✘ SL and pips
- Live panel showing W / L / Total / Win Rate / R:R / Breakeven
---
### 📋 RECOMMENDED SETTINGS FOR XAUUSD 30M
| Parameter | Recommended Value |
|---|---|
| Timeframe | 30 minutes |
| AlgoAlpha Length | 12 |
| AlgoAlpha Multiplier | 2.0 |
| UT Bot Key Value | 1.0 |
| UT Bot ATR Period | 10 |
| Session Filter | ON — London + New York |
| EMA Filter | ON — EMA 200 |
| ATR Volatility Filter | ON |
| TP (pips) | 150 |
| SL (pips) | 75 |
| Pip Multiplier | 0.1 |
---
### 💡 HOW TO USE IT
- **Wait for the kill zones**: the most reliable signals appear between 07:00–10:00 and 13:00–16:00 UTC, in the European/American session overlap.
- **Never trade against the EMA 200**: enable the EMA filter and avoid entries that go against the macro trend.
- **Use the backtest panel**: before going live, test different TP/SL values and observe the historical win rate on your target symbol.
- **Liquidity sweeps as confirmation**: enabling the Sweep Filter delivers only signals preceded by a liquidity injection — typically more explosive setups.
- **Overlapping trades**: the backtest engine supports multiple simultaneous trades, exactly as happens in real trading with pyramidal or multi-entry positions.
- **XAUUSD is volatile**: avoid SL tighter than 50 pips on the 30M chart — market noise will take them out regularly.
---
### ⚠️ DISCLAIMER
This indicator is a technical analysis tool. It does not constitute financial advice. Always conduct your own analysis and manage risk responsibly. The visual backtest is indicative and does not guarantee future results.
---
*Oracle Matrix Red Pill — by Kltony*
*"Take the Red Pill. See the Pattern. The Oracle Never Lies."*
Notas de prensa
🔴 ORACLE MATRIX RED PILL — by KalTony"Take the Red Pill. See the Pattern. The Oracle Never Lies."
🇮🇹 DESCRIZIONE
Oracle Matrix Red Pill è un indicatore avanzato in Pine Script v6 che combina un motore di rilevamento della liquidità istituzionale, un trailing stop adattivo basato su ATR e un sistema di backtest visivo multi-trade in tempo reale.
Ottimizzato per scalping su XAUUSD a 30 minuti nelle sessioni di Londra e New York.
FUNZIONALITÀ PRINCIPALI
Rileva i livelli di liquidità istituzionale e segnala in tempo reale quando il prezzo li sweeppa, distinguendo sweep minori da sweep maggiori. Il trailing stop adattivo genera segnali BUY e SELL solo quando tutti i motori interni sono allineati, riducendo i falsi segnali nei mercati laterali.
Filtri opzionali: RSI, Volume, Sessioni, EMA 200, ATR Volatilità, Conferma Sweep.
Il backtest engine apre ogni trade sulla candela successiva al segnale, gestisce trade multipli sovrapposti e mostra sul grafico i box TP/SL, le label di apertura e chiusura con pips, e un panel live con Win Rate, R:R e Breakeven.
IMPOSTAZIONI CONSIGLIATE PER XAUUSD 30M
Timeframe 30 min — Length 12 — Multiplier 2.0 — Key Value 1.0 — ATR 10 — Session Filter ON (London + New York) — EMA Filter ON 200 — TP 150 pips — SL 75 pips — Pip Multiplier 0.1
⚠️ Solo strumento di analisi tecnica. Non costituisce consiglio finanziario.
🇬🇧 DESCRIPTION
Oracle Matrix Red Pill is an advanced Pine Script v6 indicator combining an institutional liquidity detection engine, an ATR-based adaptive trailing stop, and a real-time multi-trade visual backtest system.
Optimised for scalping XAUUSD on the 30-minute timeframe during London and New York sessions.
KEY FEATURES
Detects institutional liquidity levels and signals in real time when price sweeps them, distinguishing minor from major sweeps. The adaptive trailing stop generates BUY and SELL signals only when all internal engines align, filtering out most false signals in ranging markets.
Optional filters: RSI, Volume, Sessions, EMA 200, ATR Volatility, Sweep Confirmation.
The backtest engine opens each trade on the candle after the signal, handles multiple overlapping trades and displays TP/SL boxes, entry and exit labels with pips, and a live panel showing Win Rate, R:R and Breakeven.
RECOMMENDED SETTINGS FOR XAUUSD 30M
Timeframe 30 min — Length 12 — Multiplier 2.0 — Key Value 1.0 — ATR 10 — Session Filter ON (London + New York) — EMA Filter ON 200 — TP 150 pips — SL 75 pips — Pip Multiplier 0.1
⚠️ For technical analysis only. Not financial advice.
Oracle Matrix Red Pill — by KalTony
"Take the Red Pill. See the Pattern. The Oracle Never Lies."
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.