OPEN-SOURCE SCRIPT
AetherEdge Liquidity AI Sentinel

AetherEdge Liquidity AI Sentinel [AetherEdge]
🖊️ Overview
AetherEdge Liquidity AI Sentinel fuses liquidity sweep detection (stop hunts) with KNN (K-Nearest Neighbors) machine learning to deliver a self-learning reversal AI. By memorizing past sweep patterns and comparing real-time feature vectors against historical analogs, it computes a probabilistic reversal score and alerts only on high-conviction setups — a true market sentinel that tracks the footprints of smart money.
🔶 Key Features
Automatic Liquidity Sweep Detection: Captures stop hunts beyond swing H/L with wick rejection
KNN Machine Learning Engine: Predicts reversal probability from historical analogs
3D Feature Space: Z-score normalized RSI, relative volume, and relative ATR
Self-Learning Memory: Stores up to 2000 sweep patterns
Auto-Outcome Labeling: 10-bar forward evaluation tags success/failure
Probability Threshold Filter: Only fires above minProb conviction
Minimalist Visuals: Tiny ghost arrows preserve chart clarity
🧠 Technical Architecture
The engine merges liquidity theory with a KNN self-learning core.
Sweep Detection Layer: Identifies price action that exceeds pivot H/L, closes back inside, and produces a wick larger than ATR × sweepBuffer — the classic stop-hunt signature.
Feature Engineering: RSI, volume/volMA ratio, and ATR/close ratio are Z-score normalized, producing a regime-agnostic 3D feature vector.
Pattern Memory: Each sweep stores features, direction, and bar index in a FIFO buffer auto-pruned at historyLen.
Automatic Outcome Labeling: After 10 bars, each record is auto-evaluated as success (1) or failure (0) based on whether an ATR-magnitude reversal occurred.
KNN Probability Inference: On new sweeps, K nearest same-direction historical cases are sampled, and their success rate becomes the live reversal probability.
Two-Stage Filter: Arrows fire only when both sweep detection AND probability threshold are satisfied — strict elite-only output.
⚙️ Recommended Settings & Tuning Guide
Crypto Defaults:
BTC/ETH (1H–4H): Swing Length=10, K=8, Min Prob=0.65
SOL/XRP (15M–1H): Swing Length=7, K=5, Min Prob=0.7 (noise-resistant)
Scalping (5M): Swing Length=5, Sweep Buffer=0.1, Min Prob=0.7
Swing (1D): Swing Length=15, History=1000, Min Prob=0.6
Tuning Tips:
Insufficient learning data: Lower Min Prob to 0.55 to allow early signals
Too many false sweeps: Raise Sweep Buffer to 0.1–0.2 for cleaner wicks
K Neighbors: Few (3–5) = sensitive, many (10–20) = robust
Pattern Memory: Longer = more statistical stability, but slower learning
💡 How to Use in Practice
Long Setup: Sweep below recent swing low → close back inside → Bullish arrow → counter-trend long
Short Setup: Sweep above recent swing high → close back inside → Bearish arrow → counter-trend short
Multi-Timeframe: Confirm bias on HTF (4H) sweeps → enter precisely on LTF (15M) sweeps
AetherEdge Combinations: Sweeps at S/R Grid major lines offer extreme conviction
Stop Placement: Classic edge — place stops just beyond the sweep wick extreme
⚠️ Important Notes
Initial ~100 bars are a learning warm-up phase with reduced accuracy
Pivot confirmation introduces a swingLen-bar delay (confirmation lag, not repaint)
Strong trends may continue beyond sweeps — strict risk management is essential
Outcome evaluation is fixed at 10 bars; consider adjusting for extreme short/long-term regimes
🚨 Disclaimer
This indicator is provided for educational and research purposes only and does not constitute financial advice. All trading decisions are made at your own risk and should be accompanied by proper risk management. Past performance is not indicative of future results.
🖊️ Overview
AetherEdge Liquidity AI Sentinel fuses liquidity sweep detection (stop hunts) with KNN (K-Nearest Neighbors) machine learning to deliver a self-learning reversal AI. By memorizing past sweep patterns and comparing real-time feature vectors against historical analogs, it computes a probabilistic reversal score and alerts only on high-conviction setups — a true market sentinel that tracks the footprints of smart money.
🔶 Key Features
Automatic Liquidity Sweep Detection: Captures stop hunts beyond swing H/L with wick rejection
KNN Machine Learning Engine: Predicts reversal probability from historical analogs
3D Feature Space: Z-score normalized RSI, relative volume, and relative ATR
Self-Learning Memory: Stores up to 2000 sweep patterns
Auto-Outcome Labeling: 10-bar forward evaluation tags success/failure
Probability Threshold Filter: Only fires above minProb conviction
Minimalist Visuals: Tiny ghost arrows preserve chart clarity
🧠 Technical Architecture
The engine merges liquidity theory with a KNN self-learning core.
Sweep Detection Layer: Identifies price action that exceeds pivot H/L, closes back inside, and produces a wick larger than ATR × sweepBuffer — the classic stop-hunt signature.
Feature Engineering: RSI, volume/volMA ratio, and ATR/close ratio are Z-score normalized, producing a regime-agnostic 3D feature vector.
Pattern Memory: Each sweep stores features, direction, and bar index in a FIFO buffer auto-pruned at historyLen.
Automatic Outcome Labeling: After 10 bars, each record is auto-evaluated as success (1) or failure (0) based on whether an ATR-magnitude reversal occurred.
KNN Probability Inference: On new sweeps, K nearest same-direction historical cases are sampled, and their success rate becomes the live reversal probability.
Two-Stage Filter: Arrows fire only when both sweep detection AND probability threshold are satisfied — strict elite-only output.
⚙️ Recommended Settings & Tuning Guide
Crypto Defaults:
BTC/ETH (1H–4H): Swing Length=10, K=8, Min Prob=0.65
SOL/XRP (15M–1H): Swing Length=7, K=5, Min Prob=0.7 (noise-resistant)
Scalping (5M): Swing Length=5, Sweep Buffer=0.1, Min Prob=0.7
Swing (1D): Swing Length=15, History=1000, Min Prob=0.6
Tuning Tips:
Insufficient learning data: Lower Min Prob to 0.55 to allow early signals
Too many false sweeps: Raise Sweep Buffer to 0.1–0.2 for cleaner wicks
K Neighbors: Few (3–5) = sensitive, many (10–20) = robust
Pattern Memory: Longer = more statistical stability, but slower learning
💡 How to Use in Practice
Long Setup: Sweep below recent swing low → close back inside → Bullish arrow → counter-trend long
Short Setup: Sweep above recent swing high → close back inside → Bearish arrow → counter-trend short
Multi-Timeframe: Confirm bias on HTF (4H) sweeps → enter precisely on LTF (15M) sweeps
AetherEdge Combinations: Sweeps at S/R Grid major lines offer extreme conviction
Stop Placement: Classic edge — place stops just beyond the sweep wick extreme
⚠️ Important Notes
Initial ~100 bars are a learning warm-up phase with reduced accuracy
Pivot confirmation introduces a swingLen-bar delay (confirmation lag, not repaint)
Strong trends may continue beyond sweeps — strict risk management is essential
Outcome evaluation is fixed at 10 bars; consider adjusting for extreme short/long-term regimes
🚨 Disclaimer
This indicator is provided for educational and research purposes only and does not constitute financial advice. All trading decisions are made at your own risk and should be accompanied by proper risk management. Past performance is not indicative of future results.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน