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提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。