OPEN-SOURCE SCRIPT

AetherEdge - Order Block + FVG Detector

893
🖊️ Overview
AetherEdge Order Block + FVG Detector is a high-precision engine that integrates the two core elements of Smart Money Concepts (SMC)—Order Blocks (OB) and Fair Value Gaps (FVG)—to visualize institutional footprints on your chart. It features BOS (Break of Structure)-driven OB identification, automatic price gap mapping, mitigation tracking, and a beginner-friendly "Entry Zone" mode. The zone-based strategies practiced by professional traders are reproduced visually and systematically, all within a single indicator.

🔶 Key Features

BOS-Driven Order Block Detection: Auto-identifies the last opposite candle before structure break
Bullish/Bearish OB Support: Functions in both long and short scenarios
Auto Fair Value Gap Detection: Captures 3-bar price imbalances
Mitigation Tracking: Wick/Close toggle, Touch/50%/Full thresholds
Entry Zone Mode: 4 modes—OB only / FVG only / Either / Both overlap
Auto BOS Line Drawing: Visualizes structure break points
Active Zone Management: obMaxShow/fvgMaxShow retain only latest zones
Right-Side Auto Extension: Untouched zones extended forward
Integrated Dashboard: Active OB/FVG count, latest BOS direction
Premium AetherEdge UI: Dark-mode professional design

🧠 Technical Architecture

This indicator crystallizes SMC theory into implementable logic—a sophisticated zone detection engine.

Structure Detection (BOS Engine): ta.pivothigh/pivotlow detects swing points based on obSwingLen. lastSwingH/L updates dynamically; close > lastSwingH (with prior bar below) fires bosUp, and the inverse fires bosDown.
Order Block Identification Logic: On BOS trigger, scans up to 20 bars back for the "last opposite candle." On bullish BOS, the last bearish candle becomes Bull OB; on bearish BOS, the last bullish candle becomes Bear OB. This is the classical SMC logic capturing institutional "final accumulation/distribution points."
OB Data Structure: Custom type OB integrates box/top/bot/createdBar/bullish/mitigated/label. Array-based lifecycle management.
FVG Detection Logic: 3-bar pattern detects high[2] < low[0] (bullish FVG) or low[2] > high[0] (bearish FVG). fvgMinSize filters minimum gap size.
Mitigation Logic:
Wick mode: Consumed when wick reaches zone
Close mode: Consumed when close penetrates zone (stricter)
FVG uses Touch/50%/Full for graded judgment
Entry Zone Composition: 4 signal logics from OB+FVG overlap/standalone/selection modes. Both overlap = strongest confluence.
Dynamic Zone Management: Zones exceeding max array size auto-deleted, keeping chart clean.

⚙️ Recommended Settings & Tuning Guide

Crypto Defaults:

BTC (4H–Daily): obSwingLen=10, fvgMinSize=0.1, obMitigate=Wick (standard)
ETH (1H–4H): obSwingLen=8, fvgMinSize=0.05 for slightly higher sensitivity
SOL (High-Vol): obSwingLen=15, fvgMinSize=0.2 for large zones only
XRP (Range): obMitigate=Close, fvgFill=50% for strict judgment
Tuning Guide:

Day Trading: obSwingLen=8-10, obExtend=30-50, primary 1H
Swing: obSwingLen=20-30, obExtend=100 for macro zones
Scalping: obSwingLen=5, fvgMinSize=0.0 for short-term zones
Conservative Traders: ezRequire="Both overlap" for OB+FVG overlap only
Aggressive Traders: ezRequire="Either" to maximize signals
Excess Zones: obMaxShow=3, fvgMaxShow=5 to prioritize precision
Strong Trends: obSwingLen=15 for major structure only, avoiding fake BOS

💡 How to Use in Practice

Bull OB Retest: Price returning to Bull OB after BOS = golden long entry timing
FVG Fill Strategy: 50% gap fill confirms reversal, enter in trend direction
OB+FVG Overlap Zones: Both overlap mode pinpoints highest-conviction entries
BOS Line Break Confirmation: Retest after structure break confirms trend continuation
Multi-Timeframe Synergy: Higher-TF OB for direction + lower-TF FVG for precise entry
AetherEdge Synergy:
Self-Evolving S/R Grid strong line + OB overlap = triple confirmation
RSI Divergence Hunter signal + OB retest = max reversal conviction
Squeeze Breaker breakout direction + FVG fill = entry timing decision
Target Setting: Use opposite OB/FVG as profit-taking targets

⚠️ Important Notes

BOS Confirmation Lag: obSwingLen bars of confirmation delay; some real-time uncertainty
OB Search Range: No OB generated if no opposite candle exists within past 20 bars
Post-Mitigation Effect: Consumed OB/FVG tend to weaken; prioritize fresh zones
Consecutive BOS in Strong Trends: Mass OB generation possible in short periods; recommend limiting via obMaxShow
FVG Min Size: fvgMinSize=0 detects micro-gaps; tune based on market conditions

🚨 Disclaimer

This indicator is a technical analysis tool provided for educational and research purposes only and does not constitute financial advice. Order Block and FVG detection is a structural evaluation based on historical price data and does not guarantee future market behavior. All trading decisions are made at your own risk and should be accompanied by proper risk management.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.