OPEN-SOURCE SCRIPT
Apex Trend & Liquidity Master V2.1

The Apex Trend & Liquidity Master is a hybrid trading system designed to align traders with the dominant market trend while identifying key structural price levels. Unlike simple moving average crossovers or standalone support/resistance tools, this script integrates a volatility-adaptive "Trend Cloud" with a "Smart Liquidity" engine.
This integration allows the script to offer unique filtering capabilities, such as hiding counter-trend liquidity zones to reduce chart noise and focus on high-probability continuations.
How It Works
Adaptive Trend Cloud The backbone of the system is the Trend Cloud, calculated using a Hull Moving Average (HMA) base with ATR bands. The cloud expands and contracts based on market volatility.
Green Cloud: Bullish Regime. The market is trending up; look for long opportunities.
Red Cloud: Bearish Regime. The market is trending down; look for short opportunities.
Smart Liquidity Zones (with Integration) The script automatically detects Pivot Highs and Lows to draw Supply (Resistance) and Demand (Support) zones. These zones persist until price breaks through them (mitigation).
Integration Feature: A "Filter Zones by Trend" option is included in the settings. When enabled, this feature connects the Trend Cloud to the Liquidity Engine:
It will only display Demand zones when the Trend Cloud is Bullish.
It will only display Supply zones when the Trend Cloud is Bearish.
Note on Lag: Zones are based on pivots (default lookback: 10). A zone appears on the chart 10 bars after the pivot forms. These are historical structural levels.
Signal Filters Buy and Sell labels are generated when the Trend Cloud changes color, but they are filtered to ensure quality:
Volume Filter: Signals only appear if the current volume is higher than the 20-period average.
RSI Filter: Prevents buying when RSI is overbought (>70) or selling when oversold (<30).
Live HUD An on-chart dashboard provides real-time data on:
Trend Bias: Direction of the cloud.
Momentum: RSI strength (Weak/Neutral/Strong).
Volume: High vs. Low activity.
Usage Guide
Identify the Trend: Use the background fill color to determine if you should be looking for longs (Green) or shorts (Red).
Wait for Structure: Look for price to pull back into a "Smart Liquidity" zone. For example, in a Green Trend, wait for price to touch a Green Demand box.
Confirm with Momentum: Check the Dashboard. Ideally, you want to see "Strong" momentum aligning with your trade direction.
Settings: If the chart is too cluttered, enable "Filter Zones by Trend" in the settings menu to hide counter-trend boxes.
Credits & Attribution This script combines original integration logic with adapted open-source concepts:
Smart Liquidity Logic: The method for generating Supply/Demand boxes via Pivot Highs/Lows and array management is adapted from open-source logic commonly used in Smart Money Concepts (SMC) indicators, notably popularized by LuxAlgo and the broader Pine community.
Trend Logic: The volatility cloud utilizes standard Hull Moving Average (HMA) and ATR formulas.
Disclaimer This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Past performance of pivot levels or trend signals does not guarantee future results.
This integration allows the script to offer unique filtering capabilities, such as hiding counter-trend liquidity zones to reduce chart noise and focus on high-probability continuations.
How It Works
Adaptive Trend Cloud The backbone of the system is the Trend Cloud, calculated using a Hull Moving Average (HMA) base with ATR bands. The cloud expands and contracts based on market volatility.
Green Cloud: Bullish Regime. The market is trending up; look for long opportunities.
Red Cloud: Bearish Regime. The market is trending down; look for short opportunities.
Smart Liquidity Zones (with Integration) The script automatically detects Pivot Highs and Lows to draw Supply (Resistance) and Demand (Support) zones. These zones persist until price breaks through them (mitigation).
Integration Feature: A "Filter Zones by Trend" option is included in the settings. When enabled, this feature connects the Trend Cloud to the Liquidity Engine:
It will only display Demand zones when the Trend Cloud is Bullish.
It will only display Supply zones when the Trend Cloud is Bearish.
Note on Lag: Zones are based on pivots (default lookback: 10). A zone appears on the chart 10 bars after the pivot forms. These are historical structural levels.
Signal Filters Buy and Sell labels are generated when the Trend Cloud changes color, but they are filtered to ensure quality:
Volume Filter: Signals only appear if the current volume is higher than the 20-period average.
RSI Filter: Prevents buying when RSI is overbought (>70) or selling when oversold (<30).
Live HUD An on-chart dashboard provides real-time data on:
Trend Bias: Direction of the cloud.
Momentum: RSI strength (Weak/Neutral/Strong).
Volume: High vs. Low activity.
Usage Guide
Identify the Trend: Use the background fill color to determine if you should be looking for longs (Green) or shorts (Red).
Wait for Structure: Look for price to pull back into a "Smart Liquidity" zone. For example, in a Green Trend, wait for price to touch a Green Demand box.
Confirm with Momentum: Check the Dashboard. Ideally, you want to see "Strong" momentum aligning with your trade direction.
Settings: If the chart is too cluttered, enable "Filter Zones by Trend" in the settings menu to hide counter-trend boxes.
Credits & Attribution This script combines original integration logic with adapted open-source concepts:
Smart Liquidity Logic: The method for generating Supply/Demand boxes via Pivot Highs/Lows and array management is adapted from open-source logic commonly used in Smart Money Concepts (SMC) indicators, notably popularized by LuxAlgo and the broader Pine community.
Trend Logic: The volatility cloud utilizes standard Hull Moving Average (HMA) and ATR formulas.
Disclaimer This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Past performance of pivot levels or trend signals does not guarantee future results.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.