OPEN-SOURCE SCRIPT
KPT Regression FVG/IFVG Rejection

📊 KPT Regression FVG/IFVG Rejection Signals (RR + Automation Ready)
This indicator combines regression-based momentum, Fair Value Gap (FVG / IFVG) structure, and risk-managed trade execution into a complete system designed for high-probability reversal entries and automated trading.
━━━━━━━━━━━━━━━━━━━━
🧠 How It Works
This script is built around three core concepts:
1. Regression Bias (Market Direction)
The regression engine measures where price is relative to its statistical mean:
• y > 0 → bullish momentum
• y < 0 → bearish momentum
• Zero-line crosses help confirm trend shifts
This acts as your bias filter, keeping you trading with flow instead of against it.
━━━━━━━━━━━━━━━━━━━━
2. FVG / IFVG Liquidity Zones (Entry Logic)
The script detects Fair Value Gaps (FVGs):
• Bullish FVG → imbalance below price
• Bearish FVG → imbalance above price
It also tracks IFVG flips:
• Bullish FVG breaks → becomes bearish IFVG
• Bearish FVG breaks → becomes bullish IFVG
These zones represent liquidity inefficiencies where price is likely to react.
━━━━━━━━━━━━━━━━━━━━
3. Rejection-Based Entries (Execution)
Trades trigger when:
• Price returns into a zone
• Price rejects that zone (not just taps it)
• Regression bias confirms direction
✔ No random entries
✔ No chasing
✔ Only structured reactions
━━━━━━━━━━━━━━━━━━━━
📦 Built-In Risk Management (RR Mode)
Zone RR Mode (Recommended)
• Stop Loss → below/above FVG zone
• Take Profit → based on RR multiple (ex: 1.2R)
Fixed Mode
• Manual SL/TP in ticks
━━━━━━━━━━━━━━━━━━━━
📈 Visual Trade Boxes
Each trade automatically draws:
• 🟢 Profit zone (TP)
• 🔴 Risk zone (SL)
• 📍 Entry, SL, TP labeled
This gives you instant visual feedback on trade quality and RR.
━━━━━━━━━━━━━━━━━━━━
🕐 NY Session Control
Built-in session protection:
• Optional NY session only trading
• 🚫 No trades 30 minutes before NY close
Helps avoid low-liquidity chop and bad fills.
━━━━━━━━━━━━━━━━━━━━
🤖 Automation Ready (KingPhantomTrading)
This script is fully integrated with webhook automation.
It sends dynamic trade data in real-time, including:
• Action (buy/sell)
• Symbol
• Entry price
• Stop loss
• Take profit
• Unique signal ID
Connect your automation here:
👉 kingphantomtrading.com/
Platform Features:
• Multi-account trade routing
• Performance tracking & analytics
• Strategy management dashboard
• Discord + automation integrations
Includes a free plan to get started.
━━━━━━━━━━━━━━━━━━━━
⚙️ Key Features
• Regression-based trend filtering
• FVG + IFVG detection
• Rejection-based entries
• Closest liquidity zone highlighting
• One-trade-per-side logic
• RR-based trade management
• Visual SL/TP boxes
• NY session + cutoff protection
• Fully automated webhook alerts
━━━━━━━━━━━━━━━━━━━━
⚠️ Important Notes
• Best used on liquid markets (indices, futures, forex)
• Works best with structure + liquidity context
• Not designed for random scalping — this is precision trading
This indicator combines regression-based momentum, Fair Value Gap (FVG / IFVG) structure, and risk-managed trade execution into a complete system designed for high-probability reversal entries and automated trading.
━━━━━━━━━━━━━━━━━━━━
🧠 How It Works
This script is built around three core concepts:
1. Regression Bias (Market Direction)
The regression engine measures where price is relative to its statistical mean:
• y > 0 → bullish momentum
• y < 0 → bearish momentum
• Zero-line crosses help confirm trend shifts
This acts as your bias filter, keeping you trading with flow instead of against it.
━━━━━━━━━━━━━━━━━━━━
2. FVG / IFVG Liquidity Zones (Entry Logic)
The script detects Fair Value Gaps (FVGs):
• Bullish FVG → imbalance below price
• Bearish FVG → imbalance above price
It also tracks IFVG flips:
• Bullish FVG breaks → becomes bearish IFVG
• Bearish FVG breaks → becomes bullish IFVG
These zones represent liquidity inefficiencies where price is likely to react.
━━━━━━━━━━━━━━━━━━━━
3. Rejection-Based Entries (Execution)
Trades trigger when:
• Price returns into a zone
• Price rejects that zone (not just taps it)
• Regression bias confirms direction
✔ No random entries
✔ No chasing
✔ Only structured reactions
━━━━━━━━━━━━━━━━━━━━
📦 Built-In Risk Management (RR Mode)
Zone RR Mode (Recommended)
• Stop Loss → below/above FVG zone
• Take Profit → based on RR multiple (ex: 1.2R)
Fixed Mode
• Manual SL/TP in ticks
━━━━━━━━━━━━━━━━━━━━
📈 Visual Trade Boxes
Each trade automatically draws:
• 🟢 Profit zone (TP)
• 🔴 Risk zone (SL)
• 📍 Entry, SL, TP labeled
This gives you instant visual feedback on trade quality and RR.
━━━━━━━━━━━━━━━━━━━━
🕐 NY Session Control
Built-in session protection:
• Optional NY session only trading
• 🚫 No trades 30 minutes before NY close
Helps avoid low-liquidity chop and bad fills.
━━━━━━━━━━━━━━━━━━━━
🤖 Automation Ready (KingPhantomTrading)
This script is fully integrated with webhook automation.
It sends dynamic trade data in real-time, including:
• Action (buy/sell)
• Symbol
• Entry price
• Stop loss
• Take profit
• Unique signal ID
Connect your automation here:
👉 kingphantomtrading.com/
Platform Features:
• Multi-account trade routing
• Performance tracking & analytics
• Strategy management dashboard
• Discord + automation integrations
Includes a free plan to get started.
━━━━━━━━━━━━━━━━━━━━
⚙️ Key Features
• Regression-based trend filtering
• FVG + IFVG detection
• Rejection-based entries
• Closest liquidity zone highlighting
• One-trade-per-side logic
• RR-based trade management
• Visual SL/TP boxes
• NY session + cutoff protection
• Fully automated webhook alerts
━━━━━━━━━━━━━━━━━━━━
⚠️ Important Notes
• Best used on liquid markets (indices, futures, forex)
• Works best with structure + liquidity context
• Not designed for random scalping — this is precision trading
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.