OPEN-SOURCE SCRIPT

Smart Elliott Wave [The_lurker]

638
🔷 Smart Elliott Wave – موجات إليوت الذكية

A professional indicator for automatically detecting and analyzing Elliott Wave patterns on the chart. Built on classical Elliott Wave theory, it enhances accuracy with dynamic Fibonacci validation and geometric logic—solving the most common issues traders face when applying Elliott Wave manually: complexity, subjectivity, and misinterpretation of corrections.

🎯 Key Features

Smart Elliott Wave offers a layered intelligent system that:
- Automatically detects impulsive and corrective wave structures
- Validates wave formations using Fibonacci rules
- Highlights potential reversal zones (PRZ)
- Sends instant alerts for newly detected patterns
- Supports both bullish and bearish trends
- Includes fully customizable user settings

🧠 Core Concept

The indicator analyzes price movement over time using pivot points (discovered via `ta.pivothigh` and `ta.pivotlow`) to detect wave structures that conform to Elliott Wave sequencing:

- Impulse Wave: 0-1-2-3-4-5
- Simple Correction: ABC
- Complex Correction: WXY

Each structure is validated through a strict set of logical rules combined with Fibonacci ratio checks to ensure pattern integrity and reduce false signals.

🧩 Wave Structure Components

1️⃣ Impulse Waves
- Wave 3 is not the shortest
- Wave 4 does not overlap Wave 1
- Waves 1, 3, and 5 are impulsive; Waves 2 and 4 are corrective
- Fibonacci validation can be applied to Waves 2 and 4 if enabled

2️⃣ Simple Corrections (ABC)
- Wave B partially retraces Wave A
- Wave C completes the structure without invalid overlap
- Fibonacci ratios validate the symmetry of A, B, and C (if enabled)

3️⃣ Complex Corrections (WXY)
- Only used if ABC structure is insufficient
- Requires 6 sequential pivot points: W, X, Y
- W and Y are corrective; X is a linking wave
- Follows both structural and ratio-based validations

📏 Dynamic Fibonacci Validation

When Enable Fibonacci Rules is active:
- Validates against common ratios:
`38.2%`, `50%`, `61.8%`, `78.6%`, `127.2%`, `161.8%`
- Adjustable **Fibonacci Tolerance** allows for controlled deviation
- Patterns are ignored if ratios fall outside the accepted range

🔮 Potential Reversal Zones (PRZ)

- Calculated from the most recent completed impulse wave
- Uses Fibonacci extensions to project PRZ ahead of price
- Customizable visibility and color for each ratio
- Used as dynamic take-profit or stop-loss zones

🖍️ Dual Trend Detection & Wave Coloring

- Supports both bullish and bearish patterns
- Automatic wave coloring for quick visual recognition:
- 🟦 Blue: Bullish waves
- 🟥 Red: Bearish waves
- Optional fill color for correction zones

🔔 Smart Alert System

Instant alerts are triggered when a valid wave pattern is confirmed:
- New impulse wave detected
- ABC correction appears
- Complex WXY correction formed

> Alerts are triggered only after the bar closes to prevent repainting.

⚙️ Indicator Settings

📌 Wave Detection Settings
- Pivot Left Strength: Bars to the left used for pivot detection
- Pivot Right Strength: Bars to the right for confirmation (0 = real-time)
- Enable Fibonacci Rules: Toggle Fibonacci ratio validation
- Fibonacci Tolerance: Allowed deviation in percentage

🎨 Display Settings
- Show Previous Patterns: Toggle between all patterns or only the latest
- Fill correction zones with color
- Customize wave and PRZ color schemes

📉 PRZ Settings
- Show/hide specific Fibonacci ratios
- Customize each PRZ color
- Set maximum bar extension for PRZ display

🔕 Alert Settings
- Enable or disable alerts for each type of pattern

📚 Practical Use Cases

- Daily or intraday price structure analysis
- Combine with RSI, MACD, or momentum indicators
- Filter weak signals using Fibonacci-based pattern validation
- Use PRZ zones as dynamic entry/exit targets
- Learn and reinforce Elliott Wave theory through real-time examples

📝 Important Notes

- Setting `Pivot Right = 0` allows for real-time pattern previews (may repaint)
- Disabling Fibonacci validation increases pattern count but reduces accuracy
- TradingView limits to 500 visual objects (labels, boxes, lines); older patterns may be removed
- PRZ extends up to 100 bars or 0.618 of the previous impulse duration by default


⚠️ Disclaimer:
This indicator is for educational and analytical purposes only. It does not constitute financial, investment, or trading advice. Use it in conjunction with your own strategy and risk management. Neither TradingView nor the developer is liable for any financial decisions or losses.


🔷 Smart Elliott Wave – موجات إليوت الذكية
مؤشر احترافي لرصد وتحليل أنماط موجات إليوت تلقائيًا على الرسم البياني، يعتمد على المبادئ الكلاسيكية للنظرية مع تعزيزها بالتحقق الرياضي والهندسي، ويهدف إلى تجاوز العقبات التي يواجهها معظم المتداولين عند تطبيق موجات إليوت يدويًا، مثل صعوبة التحديد، التقديرات الذاتية، وتشويش التصحيحات.

🎯 ما الذي يميز هذا المؤشر؟
يُقدّم Smart Elliott Wave نظامًا تراكبيًا ذكيًا يقوم بـ:

رصد تلقائي للموجات (الدافعة والتصحيحية)

التحقق من صحة النموذج باستخدام قواعد فيبوناتشي

عرض مناطق الانعكاس المحتملة (PRZ)

توليد تنبيهات لحظية عند تشكّل أنماط جديدة

دعم الاتجاهين (الصاعد والهابط)

واجهة إعدادات مرنة قابلة للتخصيص الكامل

🧠 الفكرة الأساسية
يعتمد المؤشر على تحليل حركة السعر عبر تسلسل زمني من النقاط المحورية (Pivots)، والتي تُكتشف باستخدام دوال مدمجة مثل ta.pivothigh وta.pivotlow. ثم يُبني فوق هذه النقاط نماذج هندسية متوافقة مع تسلسل موجات إليوت:

الموجة الدافعة (Impulse): تسلسل 0-1-2-3-4-5

التصحيح البسيط (ABC)

التصحيح المعقد (WXY)

ويتم التحقق من كل نموذج اعتمادًا على قواعد إليوت + نسب فيبوناتشي، ما يضمن موضوعية التصنيف، ودقة التحديد.

🧩 مكوّنات التحليل:
1️⃣ الموجات الدافعة (Impulse Waves):
يُشترط أن تكون الموجة الثالثة غير الأقصر.

لا تتداخل الموجة الرابعة مع نطاق الموجة الأولى.

تأكيد أن الموجات 1 و3 و5 دافعة، و2 و4 تصحيحية.

يتم التحقق من نسب تصحيح الموجتين 2 و4 حسب قواعد فيبوناتشي عند تفعيلها.

2️⃣ التصحيح البسيط (ABC):
B تصحيح جزئي للموجة A.

C تُكمل الهيكل بدون تداخل مع A.

يتم التحقق من أطوال الموجات وفق نسب فيبوناتشي لضمان التناسق.

3️⃣ التصحيح المعقد (WXY):
لا يتم تفعيله إلا عند فشل ABC في تفسير النمط.

يتطلب 6 نقاط محورية متسلسلة: W, X, Y.

W وY تصحيحيتان، وX رابط مركزي.

يخضع أيضًا لقواعد النسب والتماثل البنائي.

📏 التحقق باستخدام نسب فيبوناتشي:
عند تفعيل خاصية Enable Fibonacci Rules، يتم التحقق الصارم من نسب تصحيح الموجات:

النسب المعتمدة:
38.2%, 50%, 61.8%, 78.6%, 127.2%, 161.8%

إذا لم تكن الموجة ضمن نطاق النسبة + نسبة التسامح (Tolerance)، يتم تجاهل النموذج.

يُستخدم هذا التحقق أيضًا لرسم مناطق الانعكاس المحتملة (PRZ).

🔮 مناطق الانعكاس المحتملة (PRZ)
تُحسب PRZ باستخدام نسب فيبوناتشي انطلاقًا من نهاية آخر موجة دافعة.

تُعرض بشكل مستطيلات شفافة أو ملونة.

يمكن تخصيص كل نسبة لونًا وشكلًا خاصًا.

تُستخدم PRZ كأداة توقع للموجة التالية أو لتحديد أهداف وقف الخسارة وجني الأرباح ديناميكيًا.

🖍️ دعم الاتجاهين وتلوين الموجات:
يدعم المؤشر النماذج الصاعدة والهابطة بشكل تلقائي.

يتم استخدام تلوين بصري لتسهيل التمييز:

الأزرق: للموجات الصاعدة

الأحمر: للموجات الهابطة

لون تعبئة مخصص لمناطق التصحيح

🔔 نظام التنبيهات الذكية
يحتوي المؤشر على تنبيهات تلقائية يتم تفعيلها عند اكتمال أي نمط جديد.

يدعم التنبيهات التالية:

موجة دافعة جديدة

تصحيح بسيط ABC

تصحيح معقد WXY

التنبيهات تُطلق بعد إغلاق الشمعة التي تحقق فيها النموذج (غير فوري Repainting-safe)

⚙️ إعدادات المؤشر
📌 إعدادات تحليل الموجة:
Pivot Left Strength: عدد الأعمدة (bars) إلى اليسار لتحديد الانعكاس

Pivot Right Strength: الأعمدة إلى اليمين لتأكيد الانعكاس (0 يعني تنبؤ لحظي)

Enable Fibonacci Rules: تفعيل/تعطيل التحقق من فيبوناتشي

Fibonacci Tolerance: نسبة التفاوت المقبولة بالنسب المئوية

🎨 إعدادات العرض:
Show Previous Patterns: إظهار كل الأنماط المكتشفة أو آخر نمط فقط

PRZ Settings:

إظهار أو إخفاء نسب معينة

تخصيص الألوان

تحديد امتداد مربع PRZ زمنيًا (Max Bars)

🔕 إعدادات التنبيهات:
تفعيل/تعطيل تنبيه عند كل نمط جديد

📚 حالات الاستخدام العملية:
تحليل الحركة السعرية في بداية كل جلسة

دمج المؤشر مع أدوات مثل RSI أو MACD للحصول على إشارات مركّبة

مراقبة الموجات التوسعية والتصحيحية على فواصل 4H / Daily

استخدام PRZ كأداة لتحديد الأهداف أو وقف الخسارة

التعلم العملي لنظرية إليوت من خلال أمثلة حية

📝 ملاحظات مهمة:
تعيين Pivot Right = 0 يعني نقاط فورية (قد يعاد رسمها لاحقًا)

تعطيل فيبوناتشي يزيد عدد النماذج، لكن قد يُضعف دقتها

TradingView يحد عدد الكائنات المرسومة (Labels, Boxes, Lines) إلى 500، مما قد يؤدي إلى حذف الأنماط الأقدم تلقائيًا

PRZ يمتد افتراضيًا حتى 100 شمعة، أو 0.618 من مدة الموجة الدافعة السابقة

⚠️ إخلاء مسؤولية:
هذا المؤشر لأغراض تعليمية وتحليلية فقط. لا يُمثل نصيحة مالية أو استثمارية أو تداولية. استخدمه بالتزامن مع استراتيجيتك الخاصة وإدارة المخاطر. لا يتحمل TradingView ولا المطور مسؤولية أي قرارات مالية أو خسائر.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。