OPEN-SOURCE SCRIPT

Smart Money Toolkit - PD Engine Bias Map [KedArc Quant]

415
📄 Description

Smart Money Toolkit is an advanced multi-layer Smart Money Concepts framework that automatically detects structure shifts, premium-discount zones, and institutional order flow.
It’s built around the PD Engine, which calculates the midpoint of the most recent market swing and dynamically determines BUY or SELL bias based on where current price trades relative to that equilibrium. This toolkit visualizes structure, order blocks, and bias context in one clean map — giving traders an institutional-grade lens without signal clutter.

💡 Why It’s Unique

* Not a mashup of open-source scripts.
Every module — CHoCH/BOS logic, order-block zone detection, PD bias engine, and structure mapping — is written from scratch to ensure clean, consistent behavior in Pine Script v6.
* Bias engine with true equilibrium logic: The 50% PD (Premium-Discount) zone adapts in real time to the latest swing, giving a live institutional price map.
* Visual precision: Minimalist premium/discount shading, structured labeling (HH, HL, LH, LL, CHoCH), and context tables for clarity.
* Performance-optimized: Handles multiple visual layers (FVG, OB, CHoCH, BOS) efficiently without repainting.

🎯 Entry and Exit Logic (Discretionary Framework)

This toolkit is not a signal generator; it’s a contextual trading framework that guides your decisions.

BUY Bias (Discount Zone)

* Price trades below PD Mid → Market is in *discount*.
* Wait for a bullish CHoCH or rejection from demand OB/FVG before entering long.
* Target 1 = PD Mid; Target 2 = next opposing OB/FVG.

SELL Bias (Premium Zone)

* Price trades above PD Mid → Market is in *premium*.
* Wait for a bearish CHoCH or rejection from supply OB/FVG before shorting.
* Target 1 = PD Mid; Target 2 = next opposing OB/FVG.

This sequence enforces the institutional concept:

> Bias → Structure Shift → Confirmation → Execution

⚙️ Input Configuration

Setting Description

Swing Sensitivity Controls how far back to look for HH/LL pivots.
OB/FVG Detection Enable or disable visual order block or fair-value-gap zones.
PD Engine Toggles PD midpoint line, zone shading, and bias table.
Multi-TF Bias Sync Optionally reads higher-time-frame bias to confirm entries.
Color Themes Switch between Light / Dark / Institutional color sets.

All inputs are modular — you can show only the components you use (e.g., disable BOS/CHoCH labels or hide OB zones for a clean view).



🧮 Formula / Logic Summary

Concept Formula

PD Mid (Equilibrium) `(Recent Swing High + Recent Swing Low) / 2`
BUY Bias `close < PD Mid`
SELL Bias `close > PD Mid`
CHoCH / BOS Detected via pivot-based structure reversal: HH→LL or LL→HH
Order Block Last bullish/bearish candle before displacement.
Fair Value Gap (FVG) Gap between prior candle’s high/low and next candle’s range.

These formulas align with Smart Money Concepts taught in institutional trading frameworks.



🤝 How It Helps Traders

* Institutional Context: Instantly visualize premium vs. discount regions — see where smart money is likely accumulating or distributing.
* Bias Confidence: Removes guesswork — you know whether you should be a buyer or seller based on structure + PD bias.
* Cleaner Decision-Making: Combines all SMC elements (BOS, CHoCH, OB, FVG, PD) in one cohesive visual map.
* Timeframe Agnostic: Works seamlessly on any timeframe or instrument (Forex, Indices, Crypto, Equities).


📚 Glossary

PD Mid (Equilibrium) The midpoint between recent swing high and low — the market’s fair
value.
Premium Zone Price above PD Mid — sellers gain control.
Discount Zone Price below PD Mid — buyers gain control.
CHoCH (Change of Character) First structural signal of possible reversal.
BOS (Break of Structure) Continuation signal confirming trend direction.
OB (Order Block) Institutional candle marking accumulation/distribution.
FVG (Fair Value Gap) Imbalance zone where price moved too quickly — often
rebalanced.

❓ FAQ

Q: Is this a signal generator?
A: No — it’s a contextual framework for professional price-action trading.

Q: Does it repaint?
A: No. All structure points and bias logic are confirmed on bar close.

Q: Can it be used on any market or timeframe?
A: Yes. It’s structure-based, not instrument-specific.

Q: How often does bias change?
A: Only when a new swing high/low forms and PD recalculates — keeping the bias stable.

Q: Can I backtest it?
A: You can build an entry rule (e.g., CHoCH + OB + PD alignment) on top of it for strategy testing.

⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.