OPEN-SOURCE SCRIPT
已更新 Adaptive Pullbacks ML v2.5

Adaptive Pullbacks ML - Context-Aware Trend Trading
Overview
Adaptive Pullbacks ML is a sophisticated trend-following tool that solves the biggest problem in pullback trading: "Is this a dip to buy, or the start of a reversal?"
Unlike standard indicators that use fixed percentages or static moving averages, this script uses a 5-Dimensional k-Nearest Neighbors (k-NN) machine learning engine to learn the specific characteristics of successful pullbacks for the asset you are trading.
The 5-Dimensional ML Engine
The market is dynamic. A pullback depth that works in a low-volatility lunch session might fail during a high-volatility news event. This indicator tracks 5 key dimensions for every pullback:
Depth (ATR Normalized): How deep is the pullback relative to volatility?
Trend Slope: Is the trend steep (parabolic) or flat (grinding)?
ADX: How strong is the directional energy?
VWAP Distance: Is price extended or close to value?
Time of Day: Is this a morning drive or an afternoon fade?
When a new pullback occurs, the k-NN engine finds the 5 most similar historical events across these dimensions and predicts the probability of success.
Core Features
1. Fractal Normalization
The indicator speaks the language of ATR (Average True Range). It doesn't care if you trade the 15-second chart or the Daily chart. A "1.5 ATR Pullback" is a statistically comparable event across all timeframes, allowing for robust, scale-invariant analysis.
2. HTF Stats Bridge (Higher Timeframe Data)
You can trade on lower timeframes (e.g., 1-minute) while using statistics derived from higher timeframes (e.g., 15-minute). This ensures your signals are based on significant market structure, not microstructure noise.
3. Smart Zones
The indicator plots dynamic "Value Zones" based on learning:
Cyan Zone (Avg Depth): The "Sweet Spot". High probability bounce area.
Yellow Zone (Sigma): The "Extension". Price is stretching elastic limits.
Red Zone (Deep): The "Danger/Opportunity". Statistical anomaly.
4. PQS & k-NN Filters
Two layers of filtering protect your capital:
PQS (Probability Qualification Score): Based on raw win-rate of the zone.
k-NN Probability: Based on similarity to past winners.
Settings Guide
Stats Timeframe: The timeframe to learn from (Leave empty for Chart).
Trend/Trigger Settings: Define what constitutes a trend for your strategy.
k-Neighbors: Number of historical twins to compare (Default: 5).
Min PQS / k-NN: Thresholds for filtering weak signals.
Disclaimer: This tool is for educational purposes. Past performance of the k-NN engine does not guarantee future results.
Overview
Adaptive Pullbacks ML is a sophisticated trend-following tool that solves the biggest problem in pullback trading: "Is this a dip to buy, or the start of a reversal?"
Unlike standard indicators that use fixed percentages or static moving averages, this script uses a 5-Dimensional k-Nearest Neighbors (k-NN) machine learning engine to learn the specific characteristics of successful pullbacks for the asset you are trading.
The 5-Dimensional ML Engine
The market is dynamic. A pullback depth that works in a low-volatility lunch session might fail during a high-volatility news event. This indicator tracks 5 key dimensions for every pullback:
Depth (ATR Normalized): How deep is the pullback relative to volatility?
Trend Slope: Is the trend steep (parabolic) or flat (grinding)?
ADX: How strong is the directional energy?
VWAP Distance: Is price extended or close to value?
Time of Day: Is this a morning drive or an afternoon fade?
When a new pullback occurs, the k-NN engine finds the 5 most similar historical events across these dimensions and predicts the probability of success.
Core Features
1. Fractal Normalization
The indicator speaks the language of ATR (Average True Range). It doesn't care if you trade the 15-second chart or the Daily chart. A "1.5 ATR Pullback" is a statistically comparable event across all timeframes, allowing for robust, scale-invariant analysis.
2. HTF Stats Bridge (Higher Timeframe Data)
You can trade on lower timeframes (e.g., 1-minute) while using statistics derived from higher timeframes (e.g., 15-minute). This ensures your signals are based on significant market structure, not microstructure noise.
3. Smart Zones
The indicator plots dynamic "Value Zones" based on learning:
Cyan Zone (Avg Depth): The "Sweet Spot". High probability bounce area.
Yellow Zone (Sigma): The "Extension". Price is stretching elastic limits.
Red Zone (Deep): The "Danger/Opportunity". Statistical anomaly.
4. PQS & k-NN Filters
Two layers of filtering protect your capital:
PQS (Probability Qualification Score): Based on raw win-rate of the zone.
k-NN Probability: Based on similarity to past winners.
Settings Guide
Stats Timeframe: The timeframe to learn from (Leave empty for Chart).
Trend/Trigger Settings: Define what constitutes a trend for your strategy.
k-Neighbors: Number of historical twins to compare (Default: 5).
Min PQS / k-NN: Thresholds for filtering weak signals.
Disclaimer: This tool is for educational purposes. Past performance of the k-NN engine does not guarantee future results.
發行說明
Adaptive Pullbacks ML - Context-Aware Trend TradingOverview
Adaptive Pullbacks ML is a sophisticated trend-following tool that solves the biggest problem in pullback trading: "Is this a dip to buy, or the start of a reversal?"
Unlike standard indicators that use fixed percentages or static moving averages, this script uses a 5-Dimensional k-Nearest Neighbors (k-NN) machine learning engine to learn the specific characteristics of successful pullbacks for the asset you are trading.
The 5-Dimensional ML Engine
The market is dynamic. A pullback depth that works in a low-volatility lunch session might fail during a high-volatility news event. This indicator tracks 5 key dimensions for every pullback:
Depth (ATR Normalized): How deep is the pullback relative to volatility?
Trend Slope: Is the trend steep (parabolic) or flat (grinding)?
ADX: How strong is the directional energy?
VWAP Distance: Is price extended or close to value?
Time of Day: Is this a morning drive or an afternoon fade?
When a new pullback occurs, the k-NN engine finds the 5 most similar historical events across these dimensions and predicts the probability of success.
Core Features
1. Fractal Normalization
The indicator speaks the language of ATR (Average True Range). It doesn't care if you trade the 15-second chart or the Daily chart. A "1.5 ATR Pullback" is a statistically comparable event across all timeframes, allowing for robust, scale-invariant analysis.
2. HTF Stats Bridge (Higher Timeframe Data)
You can trade on lower timeframes (e.g., 1-minute) while using statistics derived from higher timeframes (e.g., 15-minute). This ensures your signals are based on significant market structure, not microstructure noise.
3. Smart Zones
The indicator plots dynamic "Value Zones" based on learning:
Cyan Zone (Avg Depth): The "Sweet Spot". High probability bounce area.
Yellow Zone (Sigma): The "Extension". Price is stretching elastic limits.
Red Zone (Deep): The "Danger/Opportunity". Statistical anomaly.
4. PQS & k-NN Filters
Two layers of filtering protect your capital:
PQS (Probability Qualification Score): Based on raw win-rate of the zone.
k-NN Probability: Based on similarity to past winners.
Settings Guide
Stats Timeframe: The timeframe to learn from (Leave empty for Chart).
Trend/Trigger Settings: Define what constitutes a trend for your strategy.
k-Neighbors: Number of historical twins to compare (Default: 5).
Min PQS / k-NN: Thresholds for filtering weak signals.
Disclaimer: This tool is for educational purposes. Past performance of the k-NN engine does not guarantee future results.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。