OPEN-SOURCE SCRIPT
Smart Wedge Pattern [The_lurker]

🔺 Smart Wedge Pattern نموذج الوتد الذكي
Advanced & Intelligent Wedge Detection Engine
This is not a traditional indicator that simply draws wedge lines — it is a comprehensive intelligent engine (system) for detecting and analyzing wedge patterns (Rising & Falling Wedge) based on price geometry, market context, and statistical quality of the pattern.
This indicator was designed to address the biggest problems in common wedge indicators:
❌ Too many false patterns
❌ Ignoring prior trend
❌ No real quality assessment for patterns
A comprehensive intelligent system that combines:
Adaptive algorithm that self-calibrates automatically according to market conditions
7 strict validation layers that filter out weak patterns and keep only the highest quality
Quality scoring system that evaluates each pattern from 0 to 100
3D visualization that makes patterns visually clear in an exceptional way
Smart targets based on Fibonacci ratios with real-time achievement tracking
The Result:
➡️ Fewer patterns
➡️ Cleaner, more accurate and reliable signals
➡️ Higher quality
➡️ Real practical use
═════════════════════════════════════════════════════════════
🎯 What Are Wedge Patterns?
1- Falling Wedge — Bullish Reversal Pattern
The falling wedge forms when price moves in a converging downward channel — meaning both the upper resistance line and the lower support line are declining, but the support line declines at a less steep angle, gradually narrowing the channel.

Why does the bullish breakout occur?
Declining highs show continuous selling pressure
But rising lows (P2 < P4) reveal that buyers are entering at higher levels
Convergence indicates decreasing bearish momentum
At a certain point, buying pressure overcomes and the breakout occurs
2- Rising Wedge — Bearish Reversal Pattern
The rising wedge is the exact opposite of the falling wedge — a converging upward channel where both lines rise, but the resistance line rises at a less steep angle.

Why does the bearish breakout occur?
Rising lows show continuous buying pressure
But declining highs (P2 > P4) reveal that sellers are entering at lower levels
Convergence indicates decreasing bullish momentum
At a certain point, selling pressure overcomes and the breakout occurs
═════════════════════════════════════════════════════════════
🧠 Adaptive Pivot System — The Heart of the Smart Indicator
The Problem with Traditional Indicators
Traditional indicators use a fixed value for pivot detection (like 5 bars left and 5 bars right). This means:
In quiet markets → Many delayed signals
In volatile markets → Few missed signals
No adaptation to the nature of each market or timeframe
The Solution: Smart Adaptation Algorithm
The indicator calculates optimal pivot sensitivity on each bar using 5 weighted factors:
Final Score = (Volatility_Score × 0.30) + (Trend_Score × 0.25) +
(Stability_Score × 0.20) + (Percentile_Context × 0.15) +
(Range_Score × 0.10)
Factor Weight How It's Calculated Why It's Important
Volatility Score 30% ATR(10) / ATR(50) Detects sudden changes in volatility
Trend Score 25% ADX(14) / 50 Trending markets need different sensitivity
Stability Score 20% StdDev(ATR) / Mean(ATR) Measures volatility consistency
Percentile Context 15% ATR / Percentile(ATR, 50) Places volatility in historical context
Range Score 10% Current_Range / Average_Range Detects unusual bars
The Result: The indicator uses low sensitivity (fewer, more important pivots) in quiet markets, and high sensitivity (more pivots, faster response) in volatile markets (more accurate pivots = correct geometric patterns).
═════════════════════════════════════════════════════════════
✅ Seven Validation Layers — Why This Indicator Is Different
Every detected pattern passes through 7 strict tests before being displayed:
1- Geometric Structure Validation
Validates:
P1 precedes P2 precedes P3 precedes P4 chronologically
Distance between each two points ≥ minimum threshold
Pattern width (P1→P4) within allowed range
Highs and lows order is correct for the wedge type
2- True Convergence Check
A true wedge must show convergence:
├── Gap at P4 < Gap at P1
├── Convergence ratio = End_Gap / Start_Gap
└── Ratio must be < defined convergence threshold (default 75%)
3- Slope Validation
For Falling Wedge:
├── Resistance line slope < 0 (declining)
├── Support line slope < 0 (declining)
└── Resistance slope < Support slope (convergence)
For Rising Wedge:
├── Resistance line slope > 0 (rising)
├── Support line slope > 0 (rising)
└── Support slope > Resistance slope (convergence)
4- Prior Trend Filter
Reversal patterns need a prior trend to reverse from:
├── Measures price movement during a defined period before P1
├── Normalizes movement using ATR for fair comparison
├── Falling wedge requires prior downtrend
└── Rising wedge requires prior uptrend
5- Channel Respect
Normal mode (close check):
└── Every close between P1 and P4 must be within wedge boundaries
Strict mode (high/low check):
├── Every high must be below resistance line (+ tolerance)
└── Every low must be above support line (- tolerance)
6- Post-P4 Validation
After the fourth point forms:
├── For falling wedge: Price doesn't break support or drop below P4
└── For rising wedge: Price doesn't break resistance or rise above P4
7- Quality Scoring System
Quality = (Convergence_Score × 0.30) + (Slope_Score × 0.25) +
(Width_Score × 0.20) + (Trend_Score × 0.15) +
(Height_Score × 0.10)
├── Convergence Score: More convergence = higher quality
├── Slope Score: Consistency of upper and lower line slopes
├── Width Score: Patterns with 40-100 bar width are ideal
├── Trend Score: Prior trend strength
└── Height Score: Pattern height relative to ATR
═════════════════════════════════════════════════════════════
✅ Pattern Lifecycle Management
The indicator doesn't just draw and disappear — it follows the complete pattern:
Pattern detection
Post-fourth point monitoring
Breakout confirmation
Target calculation
Target achievement tracking
Success or cancellation marking
❌ Pattern is automatically cancelled if:
Breakout fails
Channel is broken in reverse direction
Waiting period exceeded
═════════════════════════════════════════════════════════════
✅ Smart Targets + Success Level
After breakout:
Target is calculated based on pattern height
3 target modes:
Conservative (0.618)
Balanced (1.0)
Aggressive (1.618)
Independent Success level to measure move strength before target
═════════════════════════════════════════════════════════════
🎨 Advanced Visual Display (3D Visualization)
Three-dimensional pattern representation
Visual depth reflecting pattern size
3D target zone
Dynamic colors upon target achievement
🎨 The purpose of 3D is not decoration
But reading the pattern visually with speed and clarity
═════════════════════════════════════════════════════════════
⚙️ Key Features

✅ Automatic wedge detection
✅ Smart filtering reduces false signals
✅ Real quality assessment for each pattern
✅ Realistic and customizable targets
✅ Full support for Rising & Falling Wedge
✅ Works on all markets and timeframes
✅ Professional design and high performance
═════════════════════════════════════════════════════════════
📊 Usage Scenarios
🟢 Scalping
Timeframes: 1–15 minutes
Quality ≥ 60
Conservative targets
🔵 Day Trading
Timeframes: 15m–1h
Quality ≥ 50
Balanced targets
🟣 Swing Trading
Timeframes: 4h–Daily
Quality ≥ 40
Strict channel
Aggressive targets
🟠 Cryptocurrencies
Strict convergence
Strict channel
Quality ≥ 65
═════════════════════════════════════════════════════════════
🔔 Alerts
Falling wedge breakout ⇒ Buy
Rising wedge breakout ⇒ Sell
Any wedge breakout
═════════════════════════════════════════════════════════════
⚠️ Disclaimer
This indicator is for educational and analytical purposes only. It does not represent financial, investment, or trading advice. Use it in conjunction with your own strategy and risk management. Neither TradingView nor the developer is responsible for any financial decisions or losses.
═════════════════════════════════════════════════════════════
🔺 Smart Wedge Pattern نموذج الوتد الذكي
Advanced & Intelligent Wedge Detection Engine
ليس مؤشرًا تقليديًا يرسم خطوط وتد فقط ، بل هو محرك (نظام) ذكي متكامل لاكتشاف وتحليل نماذج الوتد (Rising & Falling Wedge) اعتمادًا على الهندسة السعرية ، السياق السوقي ، والجودة الإحصائية للنموذج.
تم تصميم هذا المؤشر لمعالجة أكبر مشكلة في مؤشرات الوتد الشائعة:
❌ كثرة النماذج الوهمية
❌ تجاهل الاتجاه السابق
❌ عدم وجود تقييم حقيقي لجودة النموذج
نظام ذكي متكامل يجمع بين:
خوارزمية تكيفية تُعاير نفسها تلقائياً حسب ظروف السوق
7 طبقات تحقق صارمة تُصفّي الأنماط الضعيفة وتُبقي فقط الأعلى جودة
نظام تسجيل جودة يُقيّم كل نموذج من 0 إلى 100
تصور ثلاثي الأبعاد يجعل الأنماط واضحة بصرياً بشكل استثنائي
أهداف ذكية مبنية على نسب فيبوناتشي مع تتبع التحقق الآني
النتيجة:
➡️ نماذج أقل
➡️ إشارات أنظف أكثر دقة وموثوقية
➡️ جودة أعلى
➡️ استخدام عملي حقيقي
═════════════════════════════════════════════════════════════
🎯 ما هي نماذج الأوتاد؟
1- الوتد الهابط (Falling Wedge) — نموذج انعكاسي صعودي
الوتد الهابط يتشكل عندما يتحرك السعر في قناة هابطة متقاربة — أي أن خط المقاومة العلوي وخط الدعم السفلي كلاهما يهبطان، لكن خط الدعم يهبط بزاوية أقل حدة، مما يُضيّق القناة تدريجياً.

لماذا يحدث الكسر الصعودي؟
القمم الهابطة تُظهر ضغطاً بيعياً مستمراً
لكن القيعان الصاعدة (P2 < P4) تكشف أن المشترين يدخلون عند مستويات أعلى
التقارب يُشير إلى تناقص الزخم الهبوطي
عند نقطة معينة، يتغلب ضغط الشراء ويحدث الكسر
2- الوتد الصاعد (Rising Wedge) — نموذج انعكاسي هبوطي
الوتد الصاعد هو عكس الهابط تماماً — قناة صاعدة متقاربة حيث يصعد كلا الخطين، لكن خط المقاومة يصعد بزاوية أقل حدة.
لماذا يحدث الكسر الهبوطي؟

القيعان الصاعدة تُظهر ضغطاً شرائياً مستمراً
لكن القمم الهابطة (P2 > P4) تكشف أن البائعين يدخلون عند مستويات أدنى
التقارب يُشير إلى تناقص الزخم الصعودي
عند نقطة معينة، يتغلب ضغط البيع ويحدث الكسر
═════════════════════════════════════════════════════════════
🧠 نظام المحاور التكيفي — قلب المؤشر الذكي
المشكلة مع المؤشرات التقليدية
المؤشرات التقليدية تستخدم قيمة ثابتة لاكتشاف المحاور (مثل 5 شموع يسار و5 شموع يمين). هذا يعني:
في الأسواق الهادئة → إشارات كثيرة ومتأخرة
في الأسواق المتقلبة → إشارات قليلة وضائعة
لا تكيف مع طبيعة كل سوق أو إطار زمني
الحل: خوارزمية التكيف الذكي
المؤشر يحسب حساسية المحور المثلى في كل شمعة باستخدام 5 عوامل مرجحة:
النتيجة النهائية = (درجة_التقلب × 0.30) + (درجة_الاتجاه × 0.25) +
(درجة_الاستقرار × 0.20) + (السياق_المئوي × 0.15) +
(درجة_النطاق × 0.10)
العامل الوزن كيف يُحسب لماذا مهم
درجة التقلب 30% ATR(10) / ATR(50) يكشف التغير المفاجئ في التقلب
درجة الاتجاه 25% ADX(14) / 50 الأسواق الاتجاهية تحتاج حساسية مختلفة
درجة الاستقرار 20% StdDev(ATR) / Mean(ATR) يقيس ثبات التقلب
السياق المئوي 15% ATR / Percentile(ATR, 50) يضع التقلب في سياقه التاريخي
درجة النطاق 10% النطاق_الحالي / متوسط_النطاق يكشف الشموع غير العادية
النتيجة: المؤشر يستخدم حساسية منخفضة (محاور أقل، أكثر أهمية) في الأسواق الهادئة، وحساسية عالية (محاور أكثر، استجابة أسرع) في الأسواق المتقلبة (محاور أدق = نماذج هندسية صحيحة).
═════════════════════════════════════════════════════════════
✅ طبقات التحقق السبع — لماذا هذا المؤشر مختلف
كل نموذج مُكتشف يمر عبر 7 اختبارات صارمة قبل عرضه:
1- التحقق من البنية الهندسية
يتحقق من:
P1 يسبق P2 يسبق P3 يسبق P4 زمنياً
المسافة بين كل نقطتين ≥ الحد الأدنى المحدد
عرض النموذج (P1→P4) ضمن النطاق المسموح
ترتيب القمم والقيعان صحيح حسب نوع الوتد
2- فحص التقارب الحقيقي
الوتد الحقيقي يجب أن يُظهر تقارباً:
├── الفجوة عند P4 < الفجوة عند P1
├── نسبة التقارب = الفجوة_النهائية / الفجوة_الابتدائية
└── النسبة يجب أن تكون < عتبة التقارب المحددة (افتراضي 75%)
3- التحقق من الميل
للوتد الهابط:
├── ميل خط المقاومة < 0 (هابط)
├── ميل خط الدعم < 0 (هابط)
└── ميل المقاومة < ميل الدعم (تقارب)
للوتد الصاعد:
├── ميل خط المقاومة > 0 (صاعد)
├── ميل خط الدعم > 0 (صاعد)
└── ميل الدعم > ميل المقاومة (تقارب)
4- فلتر الاتجاه السابق
النماذج الانعكاسية تحتاج اتجاهاً سابقاً لتنعكس منه:
├── يقيس حركة السعر خلال فترة محددة قبل P1
├── يُطبّع الحركة باستخدام ATR لمقارنة عادلة
├── الوتد الهابط يحتاج اتجاهاً هابطاً سابقاً
└── الوتد الصاعد يحتاج اتجاهاً صاعداً سابقاً
5- احترام القناة
وضع عادي (فحص الإغلاق):
└── كل إغلاق بين P1 و P4 يجب أن يكون داخل حدود الوتد
وضع صارم (فحص القمة/القاع):
├── كل قمة يجب أن تكون تحت خط المقاومة (+ نسبة تسامح)
└── كل قاع يجب أن يكون فوق خط الدعم (- نسبة تسامح)
6- التحقق بعد P4
بعد تشكل النقطة الرابعة:
├── للوتد الهابط: السعر لا يكسر خط الدعم أو ينزل تحت P4
└── للوتد الصاعد: السعر لا يكسر خط المقاومة أو يصعد فوق P4
7- نظام تسجيل الجودة
الجودة = (درجة_التقارب × 0.30) + (درجة_الميل × 0.25) +
(درجة_العرض × 0.20) + (درجة_الاتجاه × 0.15) +
(درجة_الارتفاع × 0.10)
├── درجة التقارب: كلما زاد التقارب، زادت الجودة
├── درجة الميل: تناسق ميل الخطين العلوي والسفلي
├── درجة العرض: الأنماط بعرض 40-100 شمعة مثالية
├── درجة الاتجاه: قوة الاتجاه السابق
└── درجة الارتفاع: ارتفاع النموذج نسبة لـ ATR
═════════════════════════════════════════════════════════════
✅ إدارة دورة حياة النموذج (Pattern Lifecycle)
المؤشر لا يرسم ثم يختفي، بل يتابع النموذج كاملًا:
اكتشاف النموذج
مراقبة ما بعد النقطة الرابعة
تأكيد الاختراق
حساب الهدف
تتبع الوصول للهدف
تمييز النجاح أو الإلغاء
❌ يتم إلغاء النموذج تلقائيًا إذا:
فشل في الاختراق
كُسرت القناة عكسيًا
تجاوز مدة الانتظار المحددة
═════════════════════════════════════════════════════════════
✅ أهداف ذكية + Success Level
بعد الاختراق:
يتم حساب الهدف بناءً على ارتفاع النموذج
3 أوضاع للأهداف:
Conservative (0.618)
Balanced (1.0)
Aggressive (1.618)
مستوى Success مستقل لقياس قوة الحركة قبل الهدف
═════════════════════════════════════════════════════════════
🎨 عرض بصري متقدم (3D Visualization)
تمثيل ثلاثي الأبعاد للنموذج
عمق بصري يعكس حجم النموذج
منطقة هدف ثلاثية الأبعاد
ألوان ديناميكية عند تحقق الهدف
🎨 الهدف من 3D ليس الزينة
بل قراءة النموذج بصريًا بسرعة ووضوح
═════════════════════════════════════════════════════════════
⚙️ أهم المميزات

✅ اكتشاف تلقائي للأوتاد
✅ فلترة ذكية تقلل الإشارات الوهمية
✅ تقييم جودة حقيقي لكل نموذج
✅ أهداف واقعية وقابلة للتخصيص
✅ دعم كامل لـ Rising & Falling Wedge
✅ يعمل على جميع الأسواق والفريمات
✅ تصميم احترافي وأداء عالي
═════════════════════════════════════════════════════════════
📊 سيناريوهات الاستخدام
🟢 المضاربة السريعة
أطر: 1–15 دقيقة
جودة ≥ 60
أهداف محافظة
🔵 التداول اليومي
أطر: 15د–1س
جودة ≥ 50
أهداف متوازنة
🟣 التداول المتأرجح
أطر: 4س–يومي
جودة ≥ 40
قناة صارمة
أهداف عدوانية
🟠 العملات الرقمية
تقارب صارم
قناة صارمة
جودة ≥ 65
═════════════════════════════════════════════════════════════
🔔 التنبيهات
كسر وتد هابط ⇒ شراء
كسر وتد صاعد ⇒ بيع
أي كسر وتد
═════════════════════════════════════════════════════════════
⚠️ إخلاء المسؤولية
هذا المؤشر لأغراض تعليمية وتحليلية فقط. لا يُمثل نصيحة مالية أو استثمارية أو تداولية. استخدمه بالتزامن مع استراتيجيتك الخاصة وإدارة المخاطر. لا يتحمل TradingView ولا المطور مسؤولية أي قرارات مالية أو خسائر.
Advanced & Intelligent Wedge Detection Engine
This is not a traditional indicator that simply draws wedge lines — it is a comprehensive intelligent engine (system) for detecting and analyzing wedge patterns (Rising & Falling Wedge) based on price geometry, market context, and statistical quality of the pattern.
This indicator was designed to address the biggest problems in common wedge indicators:
❌ Too many false patterns
❌ Ignoring prior trend
❌ No real quality assessment for patterns
A comprehensive intelligent system that combines:
Adaptive algorithm that self-calibrates automatically according to market conditions
7 strict validation layers that filter out weak patterns and keep only the highest quality
Quality scoring system that evaluates each pattern from 0 to 100
3D visualization that makes patterns visually clear in an exceptional way
Smart targets based on Fibonacci ratios with real-time achievement tracking
The Result:
➡️ Fewer patterns
➡️ Cleaner, more accurate and reliable signals
➡️ Higher quality
➡️ Real practical use
═════════════════════════════════════════════════════════════
🎯 What Are Wedge Patterns?
1- Falling Wedge — Bullish Reversal Pattern
The falling wedge forms when price moves in a converging downward channel — meaning both the upper resistance line and the lower support line are declining, but the support line declines at a less steep angle, gradually narrowing the channel.
Why does the bullish breakout occur?
Declining highs show continuous selling pressure
But rising lows (P2 < P4) reveal that buyers are entering at higher levels
Convergence indicates decreasing bearish momentum
At a certain point, buying pressure overcomes and the breakout occurs
2- Rising Wedge — Bearish Reversal Pattern
The rising wedge is the exact opposite of the falling wedge — a converging upward channel where both lines rise, but the resistance line rises at a less steep angle.
Why does the bearish breakout occur?
Rising lows show continuous buying pressure
But declining highs (P2 > P4) reveal that sellers are entering at lower levels
Convergence indicates decreasing bullish momentum
At a certain point, selling pressure overcomes and the breakout occurs
═════════════════════════════════════════════════════════════
🧠 Adaptive Pivot System — The Heart of the Smart Indicator
The Problem with Traditional Indicators
Traditional indicators use a fixed value for pivot detection (like 5 bars left and 5 bars right). This means:
In quiet markets → Many delayed signals
In volatile markets → Few missed signals
No adaptation to the nature of each market or timeframe
The Solution: Smart Adaptation Algorithm
The indicator calculates optimal pivot sensitivity on each bar using 5 weighted factors:
Final Score = (Volatility_Score × 0.30) + (Trend_Score × 0.25) +
(Stability_Score × 0.20) + (Percentile_Context × 0.15) +
(Range_Score × 0.10)
Factor Weight How It's Calculated Why It's Important
Volatility Score 30% ATR(10) / ATR(50) Detects sudden changes in volatility
Trend Score 25% ADX(14) / 50 Trending markets need different sensitivity
Stability Score 20% StdDev(ATR) / Mean(ATR) Measures volatility consistency
Percentile Context 15% ATR / Percentile(ATR, 50) Places volatility in historical context
Range Score 10% Current_Range / Average_Range Detects unusual bars
The Result: The indicator uses low sensitivity (fewer, more important pivots) in quiet markets, and high sensitivity (more pivots, faster response) in volatile markets (more accurate pivots = correct geometric patterns).
═════════════════════════════════════════════════════════════
✅ Seven Validation Layers — Why This Indicator Is Different
Every detected pattern passes through 7 strict tests before being displayed:
1- Geometric Structure Validation
Validates:
P1 precedes P2 precedes P3 precedes P4 chronologically
Distance between each two points ≥ minimum threshold
Pattern width (P1→P4) within allowed range
Highs and lows order is correct for the wedge type
2- True Convergence Check
A true wedge must show convergence:
├── Gap at P4 < Gap at P1
├── Convergence ratio = End_Gap / Start_Gap
└── Ratio must be < defined convergence threshold (default 75%)
3- Slope Validation
For Falling Wedge:
├── Resistance line slope < 0 (declining)
├── Support line slope < 0 (declining)
└── Resistance slope < Support slope (convergence)
For Rising Wedge:
├── Resistance line slope > 0 (rising)
├── Support line slope > 0 (rising)
└── Support slope > Resistance slope (convergence)
4- Prior Trend Filter
Reversal patterns need a prior trend to reverse from:
├── Measures price movement during a defined period before P1
├── Normalizes movement using ATR for fair comparison
├── Falling wedge requires prior downtrend
└── Rising wedge requires prior uptrend
5- Channel Respect
Normal mode (close check):
└── Every close between P1 and P4 must be within wedge boundaries
Strict mode (high/low check):
├── Every high must be below resistance line (+ tolerance)
└── Every low must be above support line (- tolerance)
6- Post-P4 Validation
After the fourth point forms:
├── For falling wedge: Price doesn't break support or drop below P4
└── For rising wedge: Price doesn't break resistance or rise above P4
7- Quality Scoring System
Quality = (Convergence_Score × 0.30) + (Slope_Score × 0.25) +
(Width_Score × 0.20) + (Trend_Score × 0.15) +
(Height_Score × 0.10)
├── Convergence Score: More convergence = higher quality
├── Slope Score: Consistency of upper and lower line slopes
├── Width Score: Patterns with 40-100 bar width are ideal
├── Trend Score: Prior trend strength
└── Height Score: Pattern height relative to ATR
═════════════════════════════════════════════════════════════
✅ Pattern Lifecycle Management
The indicator doesn't just draw and disappear — it follows the complete pattern:
Pattern detection
Post-fourth point monitoring
Breakout confirmation
Target calculation
Target achievement tracking
Success or cancellation marking
❌ Pattern is automatically cancelled if:
Breakout fails
Channel is broken in reverse direction
Waiting period exceeded
═════════════════════════════════════════════════════════════
✅ Smart Targets + Success Level
After breakout:
Target is calculated based on pattern height
3 target modes:
Conservative (0.618)
Balanced (1.0)
Aggressive (1.618)
Independent Success level to measure move strength before target
═════════════════════════════════════════════════════════════
🎨 Advanced Visual Display (3D Visualization)
Three-dimensional pattern representation
Visual depth reflecting pattern size
3D target zone
Dynamic colors upon target achievement
🎨 The purpose of 3D is not decoration
But reading the pattern visually with speed and clarity
═════════════════════════════════════════════════════════════
⚙️ Key Features
✅ Automatic wedge detection
✅ Smart filtering reduces false signals
✅ Real quality assessment for each pattern
✅ Realistic and customizable targets
✅ Full support for Rising & Falling Wedge
✅ Works on all markets and timeframes
✅ Professional design and high performance
═════════════════════════════════════════════════════════════
📊 Usage Scenarios
🟢 Scalping
Timeframes: 1–15 minutes
Quality ≥ 60
Conservative targets
🔵 Day Trading
Timeframes: 15m–1h
Quality ≥ 50
Balanced targets
🟣 Swing Trading
Timeframes: 4h–Daily
Quality ≥ 40
Strict channel
Aggressive targets
🟠 Cryptocurrencies
Strict convergence
Strict channel
Quality ≥ 65
═════════════════════════════════════════════════════════════
🔔 Alerts
Falling wedge breakout ⇒ Buy
Rising wedge breakout ⇒ Sell
Any wedge breakout
═════════════════════════════════════════════════════════════
⚠️ Disclaimer
This indicator is for educational and analytical purposes only. It does not represent financial, investment, or trading advice. Use it in conjunction with your own strategy and risk management. Neither TradingView nor the developer is responsible for any financial decisions or losses.
═════════════════════════════════════════════════════════════
🔺 Smart Wedge Pattern نموذج الوتد الذكي
Advanced & Intelligent Wedge Detection Engine
ليس مؤشرًا تقليديًا يرسم خطوط وتد فقط ، بل هو محرك (نظام) ذكي متكامل لاكتشاف وتحليل نماذج الوتد (Rising & Falling Wedge) اعتمادًا على الهندسة السعرية ، السياق السوقي ، والجودة الإحصائية للنموذج.
تم تصميم هذا المؤشر لمعالجة أكبر مشكلة في مؤشرات الوتد الشائعة:
❌ كثرة النماذج الوهمية
❌ تجاهل الاتجاه السابق
❌ عدم وجود تقييم حقيقي لجودة النموذج
نظام ذكي متكامل يجمع بين:
خوارزمية تكيفية تُعاير نفسها تلقائياً حسب ظروف السوق
7 طبقات تحقق صارمة تُصفّي الأنماط الضعيفة وتُبقي فقط الأعلى جودة
نظام تسجيل جودة يُقيّم كل نموذج من 0 إلى 100
تصور ثلاثي الأبعاد يجعل الأنماط واضحة بصرياً بشكل استثنائي
أهداف ذكية مبنية على نسب فيبوناتشي مع تتبع التحقق الآني
النتيجة:
➡️ نماذج أقل
➡️ إشارات أنظف أكثر دقة وموثوقية
➡️ جودة أعلى
➡️ استخدام عملي حقيقي
═════════════════════════════════════════════════════════════
🎯 ما هي نماذج الأوتاد؟
1- الوتد الهابط (Falling Wedge) — نموذج انعكاسي صعودي
الوتد الهابط يتشكل عندما يتحرك السعر في قناة هابطة متقاربة — أي أن خط المقاومة العلوي وخط الدعم السفلي كلاهما يهبطان، لكن خط الدعم يهبط بزاوية أقل حدة، مما يُضيّق القناة تدريجياً.
لماذا يحدث الكسر الصعودي؟
القمم الهابطة تُظهر ضغطاً بيعياً مستمراً
لكن القيعان الصاعدة (P2 < P4) تكشف أن المشترين يدخلون عند مستويات أعلى
التقارب يُشير إلى تناقص الزخم الهبوطي
عند نقطة معينة، يتغلب ضغط الشراء ويحدث الكسر
2- الوتد الصاعد (Rising Wedge) — نموذج انعكاسي هبوطي
الوتد الصاعد هو عكس الهابط تماماً — قناة صاعدة متقاربة حيث يصعد كلا الخطين، لكن خط المقاومة يصعد بزاوية أقل حدة.
لماذا يحدث الكسر الهبوطي؟
القيعان الصاعدة تُظهر ضغطاً شرائياً مستمراً
لكن القمم الهابطة (P2 > P4) تكشف أن البائعين يدخلون عند مستويات أدنى
التقارب يُشير إلى تناقص الزخم الصعودي
عند نقطة معينة، يتغلب ضغط البيع ويحدث الكسر
═════════════════════════════════════════════════════════════
🧠 نظام المحاور التكيفي — قلب المؤشر الذكي
المشكلة مع المؤشرات التقليدية
المؤشرات التقليدية تستخدم قيمة ثابتة لاكتشاف المحاور (مثل 5 شموع يسار و5 شموع يمين). هذا يعني:
في الأسواق الهادئة → إشارات كثيرة ومتأخرة
في الأسواق المتقلبة → إشارات قليلة وضائعة
لا تكيف مع طبيعة كل سوق أو إطار زمني
الحل: خوارزمية التكيف الذكي
المؤشر يحسب حساسية المحور المثلى في كل شمعة باستخدام 5 عوامل مرجحة:
النتيجة النهائية = (درجة_التقلب × 0.30) + (درجة_الاتجاه × 0.25) +
(درجة_الاستقرار × 0.20) + (السياق_المئوي × 0.15) +
(درجة_النطاق × 0.10)
العامل الوزن كيف يُحسب لماذا مهم
درجة التقلب 30% ATR(10) / ATR(50) يكشف التغير المفاجئ في التقلب
درجة الاتجاه 25% ADX(14) / 50 الأسواق الاتجاهية تحتاج حساسية مختلفة
درجة الاستقرار 20% StdDev(ATR) / Mean(ATR) يقيس ثبات التقلب
السياق المئوي 15% ATR / Percentile(ATR, 50) يضع التقلب في سياقه التاريخي
درجة النطاق 10% النطاق_الحالي / متوسط_النطاق يكشف الشموع غير العادية
النتيجة: المؤشر يستخدم حساسية منخفضة (محاور أقل، أكثر أهمية) في الأسواق الهادئة، وحساسية عالية (محاور أكثر، استجابة أسرع) في الأسواق المتقلبة (محاور أدق = نماذج هندسية صحيحة).
═════════════════════════════════════════════════════════════
✅ طبقات التحقق السبع — لماذا هذا المؤشر مختلف
كل نموذج مُكتشف يمر عبر 7 اختبارات صارمة قبل عرضه:
1- التحقق من البنية الهندسية
يتحقق من:
P1 يسبق P2 يسبق P3 يسبق P4 زمنياً
المسافة بين كل نقطتين ≥ الحد الأدنى المحدد
عرض النموذج (P1→P4) ضمن النطاق المسموح
ترتيب القمم والقيعان صحيح حسب نوع الوتد
2- فحص التقارب الحقيقي
الوتد الحقيقي يجب أن يُظهر تقارباً:
├── الفجوة عند P4 < الفجوة عند P1
├── نسبة التقارب = الفجوة_النهائية / الفجوة_الابتدائية
└── النسبة يجب أن تكون < عتبة التقارب المحددة (افتراضي 75%)
3- التحقق من الميل
للوتد الهابط:
├── ميل خط المقاومة < 0 (هابط)
├── ميل خط الدعم < 0 (هابط)
└── ميل المقاومة < ميل الدعم (تقارب)
للوتد الصاعد:
├── ميل خط المقاومة > 0 (صاعد)
├── ميل خط الدعم > 0 (صاعد)
└── ميل الدعم > ميل المقاومة (تقارب)
4- فلتر الاتجاه السابق
النماذج الانعكاسية تحتاج اتجاهاً سابقاً لتنعكس منه:
├── يقيس حركة السعر خلال فترة محددة قبل P1
├── يُطبّع الحركة باستخدام ATR لمقارنة عادلة
├── الوتد الهابط يحتاج اتجاهاً هابطاً سابقاً
└── الوتد الصاعد يحتاج اتجاهاً صاعداً سابقاً
5- احترام القناة
وضع عادي (فحص الإغلاق):
└── كل إغلاق بين P1 و P4 يجب أن يكون داخل حدود الوتد
وضع صارم (فحص القمة/القاع):
├── كل قمة يجب أن تكون تحت خط المقاومة (+ نسبة تسامح)
└── كل قاع يجب أن يكون فوق خط الدعم (- نسبة تسامح)
6- التحقق بعد P4
بعد تشكل النقطة الرابعة:
├── للوتد الهابط: السعر لا يكسر خط الدعم أو ينزل تحت P4
└── للوتد الصاعد: السعر لا يكسر خط المقاومة أو يصعد فوق P4
7- نظام تسجيل الجودة
الجودة = (درجة_التقارب × 0.30) + (درجة_الميل × 0.25) +
(درجة_العرض × 0.20) + (درجة_الاتجاه × 0.15) +
(درجة_الارتفاع × 0.10)
├── درجة التقارب: كلما زاد التقارب، زادت الجودة
├── درجة الميل: تناسق ميل الخطين العلوي والسفلي
├── درجة العرض: الأنماط بعرض 40-100 شمعة مثالية
├── درجة الاتجاه: قوة الاتجاه السابق
└── درجة الارتفاع: ارتفاع النموذج نسبة لـ ATR
═════════════════════════════════════════════════════════════
✅ إدارة دورة حياة النموذج (Pattern Lifecycle)
المؤشر لا يرسم ثم يختفي، بل يتابع النموذج كاملًا:
اكتشاف النموذج
مراقبة ما بعد النقطة الرابعة
تأكيد الاختراق
حساب الهدف
تتبع الوصول للهدف
تمييز النجاح أو الإلغاء
❌ يتم إلغاء النموذج تلقائيًا إذا:
فشل في الاختراق
كُسرت القناة عكسيًا
تجاوز مدة الانتظار المحددة
═════════════════════════════════════════════════════════════
✅ أهداف ذكية + Success Level
بعد الاختراق:
يتم حساب الهدف بناءً على ارتفاع النموذج
3 أوضاع للأهداف:
Conservative (0.618)
Balanced (1.0)
Aggressive (1.618)
مستوى Success مستقل لقياس قوة الحركة قبل الهدف
═════════════════════════════════════════════════════════════
🎨 عرض بصري متقدم (3D Visualization)
تمثيل ثلاثي الأبعاد للنموذج
عمق بصري يعكس حجم النموذج
منطقة هدف ثلاثية الأبعاد
ألوان ديناميكية عند تحقق الهدف
🎨 الهدف من 3D ليس الزينة
بل قراءة النموذج بصريًا بسرعة ووضوح
═════════════════════════════════════════════════════════════
⚙️ أهم المميزات
✅ اكتشاف تلقائي للأوتاد
✅ فلترة ذكية تقلل الإشارات الوهمية
✅ تقييم جودة حقيقي لكل نموذج
✅ أهداف واقعية وقابلة للتخصيص
✅ دعم كامل لـ Rising & Falling Wedge
✅ يعمل على جميع الأسواق والفريمات
✅ تصميم احترافي وأداء عالي
═════════════════════════════════════════════════════════════
📊 سيناريوهات الاستخدام
🟢 المضاربة السريعة
أطر: 1–15 دقيقة
جودة ≥ 60
أهداف محافظة
🔵 التداول اليومي
أطر: 15د–1س
جودة ≥ 50
أهداف متوازنة
🟣 التداول المتأرجح
أطر: 4س–يومي
جودة ≥ 40
قناة صارمة
أهداف عدوانية
🟠 العملات الرقمية
تقارب صارم
قناة صارمة
جودة ≥ 65
═════════════════════════════════════════════════════════════
🔔 التنبيهات
كسر وتد هابط ⇒ شراء
كسر وتد صاعد ⇒ بيع
أي كسر وتد
═════════════════════════════════════════════════════════════
⚠️ إخلاء المسؤولية
هذا المؤشر لأغراض تعليمية وتحليلية فقط. لا يُمثل نصيحة مالية أو استثمارية أو تداولية. استخدمه بالتزامن مع استراتيجيتك الخاصة وإدارة المخاطر. لا يتحمل TradingView ولا المطور مسؤولية أي قرارات مالية أو خسائر.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน