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 อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน