OPEN-SOURCE SCRIPT

AetherEdge - Order Block Quality

386
🖊️ Overview

AE-OBQ does not just draw order blocks (OBs) — it learns and scores each one's quality = P(it holds and reacts), and applies the same learned model to scan a basket of symbols. Order blocks are not equal: some produce clean reactions, most do not. AE-OBQ learns the difference from the real outcome of past blocks (held / broken) and ranks which symbols currently show the highest-quality setups.

🔶 Key Features

Automatic order-block detection from a BOS plus strong displacement, drawn as zones
A quality score (ML) — online logistic learns P(hold and react) per OB; zone shading reflects quality
A multi-symbol screener — the identical learned model applied to up to 6 symbols, ranked by quality (symbol / bias / quality % / distance)
BUY/SELL signals on the first retest of a high-quality OB
ATR-normalized features so the learned quality model transfers across instruments
A gold HUD with active OB count, nearest OB's bias/quality/distance, and realized hold rate
OBs resolve on realized price — training and signals are no-repaint

🧠 Technical Architecture OB detection:

when a break of the recent swing high/low (BOS) comes with strong displacement (body/ATR), the last opposing candle before it is taken as the order block and its high/low drawn as a zone. Quality model (ML): five features — OB size, displacement strength, trend alignment (higher trend vs OB direction), momentum, and formation volume ratio — are all ATR-normalized and bounded (no standardization layer), and an online logistic regression learns quality = P(hold and react). Each OB trains at resolution with its realized label (held = rejected after retest; broken = zone violated) — no lookahead. Because features are ATR-normalized, the same weights apply directly to other symbols. Screener: request.security fetches the same features for each symbol, and the chart-learned weights are applied as-is to produce a quality score. A selection sort ranks them descending; the chart symbol runs through the identical pipeline and appears first. Honest scope: a linear classifier over order-block features. Not deep learning, and not a guarantee of win rate.

⚙️ Recommended Settings & Tuning Guide

Key parameters: structure length (swingLen), min displacement (body/ATR), quality threshold (qThr), resolve horizon (resN), screener symbols/timeframe.
Larger swingLen → only major BOS, focusing on important OBs; smaller → more detections
Raise min displacement → only blocks at the origin of forceful moves
Raise qThr → restrict highlights/signals to high-quality OBs
Crypto starting points (tune on your chart):
BTC / ETH (15m–4H): defaults are the baseline (swingLen 10, dispK 1.0, qThr 0.60)
SOL / XRP and high-vol alts: dispK 1.5 to exclude noisy OBs
Scalping (1–5m): swingLen ~5, shorter resN
Swing (4H–daily): swingLen 15+, longer resN to give the hold judgment room
Keep screener symbols within one asset class for stable quality comparison

💡 How to Use in Practice

Trade reactions off OBs: buy the dip when price returns to a high-quality bullish OB, sell the rally into a bearish one
Reading quality: a darker zone means the model rates it high quality; faint OBs are skip candidates
Hold rate: the share of OBs that actually held on this symbol/settings — a gauge of the model's reliability in that context
Use the screener: see at a glance which watchlist symbols currently rate highest, and focus on nearby high-quality OBs
Combinations: pair with AE-AMF's big-picture momentum or AE-FAM's anomaly detection, and use OBQ's quality to prioritize entry zones

⚠️ Important Notes

Learning period: no signals until warmup bars; the model needs enough resolved OBs to learn
Learning reset: changing inputs, symbol, or timeframe re-learns the weights
Screener granularity: the screener is a multi-symbol radar and computes each symbol's features with compact approximations (the chart symbol is the most precise) — confirm by charting the target symbol
Probability, not a guarantee: even high-quality OBs can break — use stops and position sizing

🚨 Disclaimer

This indicator is for educational and informational purposes only and is not financial advice or a recommendation to buy or sell. No method guarantees future profits; past performance does not indicate future results, and trading carries the risk of loss. All trading decisions are your own — use proper backtesting and disciplined risk management.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.