PROTECTED SOURCE SCRIPT
PAT [PieTrader]

This Pine Script (//version=6) is an advanced Price Action Toolkit (PAT) – PieTrader, enhanced by the PieTrader community to combine core Smart Money Concepts into one visual framework. It integrates market structure, liquidity sweeps, order blocks, and dynamic trendlines, with customizable settings for flexibility.
Market Structure (Zigzag): The script tracks trend shifts using a configurable zigzag length. Swing highs and lows are recorded, and optional zigzag lines visualise price movement. Structure shifts are highlighted with Change of Character (CHoCH) or Break of Structure (BoS) labels, providing clear signals of directional intent.
Order Blocks: On detecting structure breaks, bullish and bearish order blocks are marked with ATR-based zones. These are drawn as shaded boxes, with user control over how many remain visible. Invalid or broken blocks are automatically removed to keep the chart clean.
Liquidity Sweeps: Pivot highs and lows over a chosen lookback define liquidity levels. These are shown as horizontal lines that switch to dashed style once swept by price. Markers (“x”) identify sweep points, helping traders spot liquidity grabs. To optimise performance, older levels are deleted beyond a fixed storage limit.
Trendlines: Using pivot detection, the system identifies bullish and bearish trendlines. Valid lines with upward or downward slopes are extended in real time, updating dynamically with price. Bullish lines are teal; bearish lines are red.
Additional Features: A watermark option displays “PieTrader” on the chart, and colour themes are fully customizable.
In summary, the PieTrader community’s enhancements make this toolkit a comprehensive visual aid for analysing market structure, liquidity, and trend alignment within a streamlined charting solution.
Market Structure (Zigzag): The script tracks trend shifts using a configurable zigzag length. Swing highs and lows are recorded, and optional zigzag lines visualise price movement. Structure shifts are highlighted with Change of Character (CHoCH) or Break of Structure (BoS) labels, providing clear signals of directional intent.
Order Blocks: On detecting structure breaks, bullish and bearish order blocks are marked with ATR-based zones. These are drawn as shaded boxes, with user control over how many remain visible. Invalid or broken blocks are automatically removed to keep the chart clean.
Liquidity Sweeps: Pivot highs and lows over a chosen lookback define liquidity levels. These are shown as horizontal lines that switch to dashed style once swept by price. Markers (“x”) identify sweep points, helping traders spot liquidity grabs. To optimise performance, older levels are deleted beyond a fixed storage limit.
Trendlines: Using pivot detection, the system identifies bullish and bearish trendlines. Valid lines with upward or downward slopes are extended in real time, updating dynamically with price. Bullish lines are teal; bearish lines are red.
Additional Features: A watermark option displays “PieTrader” on the chart, and colour themes are fully customizable.
In summary, the PieTrader community’s enhancements make this toolkit a comprehensive visual aid for analysing market structure, liquidity, and trend alignment within a streamlined charting solution.
Скрипт с защищённым кодом
Этот скрипт опубликован с закрытым исходным кодом. Однако вы можете использовать его свободно и без каких-либо ограничений — читайте подробнее здесь.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.
Скрипт с защищённым кодом
Этот скрипт опубликован с закрытым исходным кодом. Однако вы можете использовать его свободно и без каких-либо ограничений — читайте подробнее здесь.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.