OPEN-SOURCE SCRIPT
Telah dikemas kini Dynamic Range Finder [The_lurker]

هو أداة تهدف إلى تحديد نطاق السعر الديناميكي بناءً على التقلبات ومتوسط الأسعار . حيث يتم التعرف على مناطق التوحيد السعري (Consolidation) ويعطي إشارات شراء وبيع عند اختراق أو كسر هذا النطاق .
// يفضل استخدام المؤشر على اطار 4 ساعات واكثر //
مميزات المؤشر :
1- اكتشاف النطاق السعري الديناميكي
- يقوم المؤشر بحساب متوسط السعر خلال فترة محددة ومقارنة الإغلاقات الحديثة بمدى تقلب الأسعار (ATR) لمعرفة ما إذا كان السعر يتحرك داخل نطاق معين.
2- تحديد الاختراقات Breakout Signals
- عند اختراق السعر الحد العلوي للنطاق، يظهر المؤشر إشارة شراء (BUY).
- عند كسر السعر الحد السفلي للنطاق، يظهر المؤشر إشارة بيع (SELL).
3- دعم أنماط متعددة للمتوسطات المتحركة
- يسمح للمستخدمين باختيار نوع المتوسط المتحرك (SMA، EMA، WMA) المستخدم في حساب متوسط السعر.
4- إعدادات مخصصة للفلترة بحجم التداول (اختياري)
- فلترة حجم التداول هي ميزة اختيارية في المؤشر تسمح بتصفية إشارات الشراء والبيع بناءً على قوة الحجم المتداول مما يعزز دقة الإشارات عن طريق التأكد من أن الاختراقات السعرية مدعومة بحجم تداول قوي
5- تصميم مرن مع تخصيص للألوان والأنماط
- يمكن للمستخدمين تغيير ألوان النطاق وإشارات البيع والشراء حسب رغبتهم.
6- تنبيهات آلية عند حدوث كسر أو اختراق
- يتضمن تنبيهات (Alerts) عند حدوث إشارة بيع أو شراء.
كيف يعمل المؤشر؟
* يتم حساب متوسط السعر خلال الفترة المحددة (rangePeriod).
* يتم حساب التقلب السعري (ATR) ومضاعفته بمعامل النطاق (rangeMultiplier).
* يتم رسم مستطيل يعبر عن النطاق السعري بين (متوسط السعر ± التقلب).
* إذا تجاوز السعر الحد العلوي → إشارة شراء (BUY).
* إذا كسر السعر الحد السفلي → إشارة بيع (SELL).
* يمكن تصفية الإشارات باستخدام حجم التداول (اختياري).
1.0 → الحجم الحالي يجب أن يكون على الأقل مساويًا للمتوسط.
1.2 → الحجم الحالي يجب أن يكون أعلى من المتوسط بنسبة 20%.
1.5 → الحجم الحالي يجب أن يكون أعلى من المتوسط بنسبة 50%.
تنويه:
المؤشر هو أداة مساعدة فقط ويجب استخدامه مع التحليل الفني والأساسي لتحقيق أفضل النتائج.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView.
It is a tool that aims to determine the dynamic price range based on fluctuations and average prices. Consolidation areas are identified and buy and sell signals are given when this range is breached or broken.
// It is preferable to use the indicator on a 4-hour frame or more //
Features of the indicator:
1- Detecting the dynamic price range
- The indicator calculates the average price over a specific period and compares recent closings with the price volatility range (ATR) to see if the price is moving within a specific range.
2- Identifying Breakout Signals
- When the price breaks the upper limit of the range, the indicator shows a buy signal (BUY).
- When the price breaks the lower limit of the range, the indicator shows a sell signal (SELL).
3- Support for multiple moving average patterns
- Allows users to choose the type of moving average (SMA, EMA, WMA) used to calculate the average price.
4- Custom settings for filtering by trading volume (optional)
- Trading volume filtering is an optional feature in the indicator that allows filtering buy and sell signals based on the strength of the trading volume, which enhances the accuracy of the signals by ensuring that price breakouts are supported by strong trading volume
5- Flexible design with customization of colors and patterns
- Users can change the colors of the range and buy and sell signals as they wish.
6- Automatic alerts when a breakout or breakout occurs
- Includes alerts when a buy or sell signal occurs.
How does the indicator work?
* The average price is calculated over the specified period (rangePeriod).
* The price volatility (ATR) is calculated and multiplied by the range factor (rangeMultiplier).
* A rectangle is drawn that represents the price range between (average price ± volatility).
* If the price exceeds the upper bound → a buy signal (BUY).
* If the price breaks the lower bound → a sell signal (SELL).
* Signals can be filtered using trading volume (optional).
1.0 → Current volume should be at least equal to the average.
1.2 → Current volume should be 20% above the average.
1.5 → Current volume should be 50% above the average.
Disclaimer:
The indicator is an auxiliary tool only and should be used in conjunction with technical and fundamental analysis to achieve the best results.
Disclaimer
The information and posts are not intended to be, or constitute, any financial, investment, trading or other types of advice or recommendations provided or endorsed by TradingView.
// يفضل استخدام المؤشر على اطار 4 ساعات واكثر //
مميزات المؤشر :
1- اكتشاف النطاق السعري الديناميكي
- يقوم المؤشر بحساب متوسط السعر خلال فترة محددة ومقارنة الإغلاقات الحديثة بمدى تقلب الأسعار (ATR) لمعرفة ما إذا كان السعر يتحرك داخل نطاق معين.
2- تحديد الاختراقات Breakout Signals
- عند اختراق السعر الحد العلوي للنطاق، يظهر المؤشر إشارة شراء (BUY).
- عند كسر السعر الحد السفلي للنطاق، يظهر المؤشر إشارة بيع (SELL).
3- دعم أنماط متعددة للمتوسطات المتحركة
- يسمح للمستخدمين باختيار نوع المتوسط المتحرك (SMA، EMA، WMA) المستخدم في حساب متوسط السعر.
4- إعدادات مخصصة للفلترة بحجم التداول (اختياري)
- فلترة حجم التداول هي ميزة اختيارية في المؤشر تسمح بتصفية إشارات الشراء والبيع بناءً على قوة الحجم المتداول مما يعزز دقة الإشارات عن طريق التأكد من أن الاختراقات السعرية مدعومة بحجم تداول قوي
5- تصميم مرن مع تخصيص للألوان والأنماط
- يمكن للمستخدمين تغيير ألوان النطاق وإشارات البيع والشراء حسب رغبتهم.
6- تنبيهات آلية عند حدوث كسر أو اختراق
- يتضمن تنبيهات (Alerts) عند حدوث إشارة بيع أو شراء.
كيف يعمل المؤشر؟
* يتم حساب متوسط السعر خلال الفترة المحددة (rangePeriod).
* يتم حساب التقلب السعري (ATR) ومضاعفته بمعامل النطاق (rangeMultiplier).
* يتم رسم مستطيل يعبر عن النطاق السعري بين (متوسط السعر ± التقلب).
* إذا تجاوز السعر الحد العلوي → إشارة شراء (BUY).
* إذا كسر السعر الحد السفلي → إشارة بيع (SELL).
* يمكن تصفية الإشارات باستخدام حجم التداول (اختياري).
1.0 → الحجم الحالي يجب أن يكون على الأقل مساويًا للمتوسط.
1.2 → الحجم الحالي يجب أن يكون أعلى من المتوسط بنسبة 20%.
1.5 → الحجم الحالي يجب أن يكون أعلى من المتوسط بنسبة 50%.
تنويه:
المؤشر هو أداة مساعدة فقط ويجب استخدامه مع التحليل الفني والأساسي لتحقيق أفضل النتائج.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView.
It is a tool that aims to determine the dynamic price range based on fluctuations and average prices. Consolidation areas are identified and buy and sell signals are given when this range is breached or broken.
// It is preferable to use the indicator on a 4-hour frame or more //
Features of the indicator:
1- Detecting the dynamic price range
- The indicator calculates the average price over a specific period and compares recent closings with the price volatility range (ATR) to see if the price is moving within a specific range.
2- Identifying Breakout Signals
- When the price breaks the upper limit of the range, the indicator shows a buy signal (BUY).
- When the price breaks the lower limit of the range, the indicator shows a sell signal (SELL).
3- Support for multiple moving average patterns
- Allows users to choose the type of moving average (SMA, EMA, WMA) used to calculate the average price.
4- Custom settings for filtering by trading volume (optional)
- Trading volume filtering is an optional feature in the indicator that allows filtering buy and sell signals based on the strength of the trading volume, which enhances the accuracy of the signals by ensuring that price breakouts are supported by strong trading volume
5- Flexible design with customization of colors and patterns
- Users can change the colors of the range and buy and sell signals as they wish.
6- Automatic alerts when a breakout or breakout occurs
- Includes alerts when a buy or sell signal occurs.
How does the indicator work?
* The average price is calculated over the specified period (rangePeriod).
* The price volatility (ATR) is calculated and multiplied by the range factor (rangeMultiplier).
* A rectangle is drawn that represents the price range between (average price ± volatility).
* If the price exceeds the upper bound → a buy signal (BUY).
* If the price breaks the lower bound → a sell signal (SELL).
* Signals can be filtered using trading volume (optional).
1.0 → Current volume should be at least equal to the average.
1.2 → Current volume should be 20% above the average.
1.5 → Current volume should be 50% above the average.
Disclaimer:
The indicator is an auxiliary tool only and should be used in conjunction with technical and fundamental analysis to achieve the best results.
Disclaimer
The information and posts are not intended to be, or constitute, any financial, investment, trading or other types of advice or recommendations provided or endorsed by TradingView.
Nota Keluaran
تم تطوير المؤشر بشكل كبير بالفترة الماضية وهذه أهم الامور :1- ظهور آخر صندوق شراء وظهور آخر صندوق بيع
2- تم اضافة TP/SL يمكن التحكم بها من خلال الاعدادت .
3- استخدام الفلاتر / Using the Filters
المؤشر مزود بثلاثة فلاتر رئيسية تساعد في تحسين دقة الإشارات وتحديد الظروف السوقية المثلى للدخول في الصفقات:
فلتر ADX:
الغرض: قياس قوة الاتجاه في السوق.
طريقة الاستخدام:
عند تفعيل الفلتر (Use ADX Filter = true)، يتم إصدار إشارة شراء أو بيع فقط إذا كانت قيمة ADX تتجاوز العتبة المحددة (مثلاً 20) هذا يعني أنه يجب أن يكون السوق في حالة اتجاه قوي ليُعتبر الكسر ذو دلالة.
فلتر RSI:
الغرض: تقييم حالة التشبع الشرائي أو البيعي.
طريقة الاستخدام:
عند تفعيل الفلتر (Use RSI Filter = true)، يتم تطبيق شروط محددة لكل من الشراء والبيع.
على سبيل المثال، إشارة الشراء تتطلب أن يكون RSI فوق قيمة معينة (مثلاً 40) بينما إشارة البيع تتطلب أن يكون RSI فوق قيمة أعلى (مثلاً 60) هذا يساعد في تجنب الدخول في الصفقات عندما يكون السوق في حالة تشبع قد تؤدي إلى انعكاسات غير مرغوبة.
فلتر حجم التداول (Volume Filter):
الغرض: التأكد من أن الإشارة تأتي في ظل حركة تداول نشطة.
طريقة الاستخدام:
عند تفعيل الفلتر (Use Volume Filter = true)، يتم مقارنة حجم التداول الحالي بمتوسط حجم التداول لفترة محددة (باستخدام معامل مضاعف مثل 1.2).
إذا كان حجم التداول أعلى من المتوسط مضروبًا في المعامل، يُعتبر هذا شرطاً داعماً لإطلاق الإشارة.
وضع دمج الفلاتر (Filter Combination Mode):
الغرض: تحديد كيفية دمج الفلاتر الثلاثة للوصول إلى قرار نهائي للدخول في الصفقة.
طريقة الاستخدام:
ALL: يجب تحقيق جميع شروط الفلاتر (ثلاثة شروط) لكي يتم إصدار الإشارة.
ANY: يكفي أن يتحقق شرط واحد فقط من الشروط.
2-of-3: يجب تحقيق شرطين على الأقل من الثلاثة.
اختيار الوضع المناسب يعتمد على استراتيجية التداول ومستوى الثقة المطلوب في الإشارة.
4- اضافة Trendlines with Extension خطوط اتجاه
The indicator has been greatly developed in the past period and these are the most important things:
1- The appearance of the last buy box and the appearance of the last sell box
2- TP/SL has been added and can be controlled through the settings.
3- Using the Filters
The indicator is equipped with three main filters that help improve the accuracy of signals and determine the optimal market conditions for entering into deals:
ADX Filter:
Purpose: Measure the strength of the trend in the market.
How to use:
When the filter is activated (Use ADX Filter = true), a buy or sell signal is issued only if the ADX value exceeds the specified threshold (for example, 20). This means that the market must be in a strong trend for the break to be considered significant.
RSI Filter:
Purpose: Evaluate the state of overbought or oversold.
How to use:
When the filter is activated (Use RSI Filter = true), specific conditions are applied for both buying and selling.
For example, a buy signal requires the RSI to be above a certain value (e.g. 40) while a sell signal requires the RSI to be above a higher value (e.g. 60). This helps to avoid entering trades when the market is in a saturated state that may lead to unwanted reversals.
Volume Filter:
Purpose: Ensures that the signal comes in the context of active trading activity.
How to use:
When the filter is enabled (Use Volume Filter = true), the current trading volume is compared to the average trading volume for a specified period (using a multiplier such as 1.2).
If the trading volume is above the average multiplied by the coefficient, this is considered a supporting condition for triggering the signal.
Filter Combination Mode:
Purpose: Determines how to combine the three filters to reach a final decision to enter the trade.
How to use:
ALL: All filter conditions (three conditions) must be met for the signal to be issued.
ANY: Only one of the conditions is enough.
2-of-3: At least two of the three conditions must be met.
Choosing the appropriate mode depends on the trading strategy and the level of confidence required in the signal.
4- Add Trendlines with Extension
Nota Keluaran
تحديث المؤشر 1- تحديث شروط فلتر ووضع دمج الفلاتر .
2- تحديث خطوط الترند .
3- تحديث توقف تمدد خط الترند عند الاختراق.
4- وضع علامات اختراق لخط الاتجاه.
Update Indicator
1- Update filter conditions and filter merge mode.
2- Update trend lines.
3- Update trend line extension stop at breakout.
4- Set breakout marks for trend line.
Nota Keluaran
تحديث جديد1- اصلاح تمدد صندوق نطاق الديناميكي .
2- اضافة اظهار شروط الفلتر مع علامة كسر صندوق نطاق الديناميكي .
New Update
1- Fix the dynamic range box expansion.
2- Added showing filter conditions with the dynamic range box break mark.
Nota Keluaran
حذف خطوط الاتجاهDelete trend lines
Nota Keluaran
تم اضافة No Filter في قسم Filterعند اختيار "No Filter"، سيتم إطلاق إشارات الشراء (BUY) عند كسر النطاق للأعلى، وإشارات البيع (SELL) عند كسره للأسفل، دون التحقق من ADX، RSI، أو Volume.
No Filter added to Filter section
When "No Filter" is selected, BUY signals will be triggered when the range is broken upwards, and SELL signals will be triggered when it is broken downwards, without checking ADX, RSI, or Volume.
Nota Keluaran
🧩 1. Adding a new filter: MFI (Money Flow Index)✅ Function: Measures the momentum of money flow.
✅ Effect: Helps identify potential trend reversal areas.
✅ How to use: The filter can be activated from the indicator settings.
📌 Improvements:
Allows the filter to be enabled/disabled.
Choose the period length (Default: 14).
Choose the threshold (Default: 35).
📊 2. Adding the RCI (Rank Correlation Index) indicator
✅ Function: Measures the relationship between prices over different time periods.
✅ Effect: Helps identify the strength and weakness of a trend.
✅ Added RCI types:
RCI Short (10 candles)
RCI Middle (30 candles)
RCI Long (50 candles)
📌 Use: Used as an additional filter for price breaks or for re-entry after false breaks.
📉 3. Adding BBW (Bollinger Band Width) as a Volatility Filter
✅ Function: Measures the band width to assess expansion and contraction in volatility.
✅ Effect: Helps detect true and false breakouts.
📌 Improvements:
Calculates the deviation from the highest and lowest BBW values.
Determines whether the market is close to an expansion or contraction.
💰 4. Liquidity Filter
✅ Function: Determines whether liquidity is high or low.
✅ Effect: Helps classify breakouts as "High Liquidity" or "Low Liquidity".
📌 Improvements:
Setting the liquidity threshold in dollars (default: $20 million).
Using historical daily data to calculate liquidity.
Customizing ADX for each break type (high/low liquidity).
⚠️ 5. Detecting False Breakouts
✅ Function: Detects breakouts that do not reflect a true trend.
✅ Impact: Reducing the risk of false entry when a false breakout occurs.
📌 Improvements:
Dividing false breakouts into two types: High Liquidity and Low Liquidity.
Using a set of conditions (ADX, RSI, MFI, RCI, BBW).
Immediate alerts when a false breakout is detected.
🔄 6. Re-entry after a false breakout (Post-False Breakout Signals)
✅ Function: Exploiting a return within the box after a false breakout.
✅ Effect: A new opportunity to enter instead of ignoring the movement.
📌 Improvements:
Track the number of candles since the breakout.
Re-entry if the price returns within the box within a specified period.
Support for both upside and downside breaks.
🎨 7. UI Enhancements
✅ Function: Improved the user interface for easier reading and analysis.
✅ Effect: Clarification of signals and visual information.
📌 Improvements:
Custom colors for each type of box (true, false, buy/sell signal).
Added text inside the boxes explaining the conditions that triggered the signal.
Distinctive colors for false boxes based on liquidity level.
⚙️ 8. Score System Bug Fix
✅ Function: Determine the number of conditions required to trigger a signal.
✅ Improvements:
In the original version, the "2-of-3" mode required 3 conditions.
In the modified version, the values are now correct:
ALL: 4 conditions
ANY: 1 condition
2-of-3: 2 conditions
No Filter: No conditions
🧩 1. إضافة فلتر جديد: MFI (Money Flow Index)
✅ الوظيفة : قياس زخم التدفق النقدي.
✅ التأثير : يساعد في تحديد المناطق المحتملة لعكس الاتجاه.
✅ كيفية الاستخدام : يمكن تفعيل الفلتر من إعدادات المؤشر.
📌 التحسينات :
يسمح بتفعيل/تعطيل الفلتر.
اختيار طول الفترة (Default: 14).
تحديد العتبة (Default: 35).
📊 2. إضافة مؤشر RCI (Rank Correlation Index)
✅ الوظيفة : قياس العلاقة بين الأسعار عبر فترات زمنية مختلفة.
✅ التأثير : يساعد في تحديد القوة والضعف في الاتجاه.
✅ أنواع RCI المضافة :
RCI Short (10 شموع)
RCI Middle (30 شمعة)
RCI Long (50 شمعة)
📌 الاستخدام : يُستخدم كفلتر إضافي لكسر السعر أو لإعادة الدخول بعد الكسور الخادعة.
📉 3. إضافة BBW (Bollinger Band Width) كفلتر للتقلب
✅ الوظيفة : قياس عرض الحزام لتقييم حالات التوسع والانكماش في التقلب.
✅ التأثير : يساعد في اكتشاف الكسور الصادقة من الزائفة.
📌 التحسينات :
حساب الانحراف عن أعلى وأدنى قيمة للـ BBW.
تحديد ما إذا كان السوق قريبًا من حالة توسع أو انكماش.
💰 4. فلتر السيولة (Liquidity Filter)
✅ الوظيفة : تحديد ما إذا كانت السيولة عالية أم منخفضة.
✅ التأثير : يساعد في تصنيف الكسور إلى "High Liquidity" أو "Low Liquidity".
📌 التحسينات :
تحديد عتبة السيولة بالدولار (Default: 20 مليون $).
استخدام البيانات اليومية السابقة لحساب السيولة.
تخصيص ADX لكل نوع من الكسور (عالي/منخفض سيولة).
⚠️ 5. كشف الكسور الخادعة (False Breakouts)
✅ الوظيفة : اكتشاف الكسور التي لا تعكس اتجاهًا حقيقيًا.
✅ التأثير : تقليل خطر الدخول الخاطئ عند حدوث كسر زائف.
📌 التحسينات :
تقسيم الكسور الخادعة إلى نوعين: High Liquidity و Low Liquidity.
استخدام مجموعة من الشروط (ADX, RSI, MFI, RCI, BBW).
تنبيهات مباشرة عند اكتشاف كسر خادع.
🔄 6. إعادة الدخول بعد الكسر الخادع (Post-False Breakout Signals)
✅ الوظيفة : استغلال العودة داخل الصندوق بعد كسر خادع.
✅ التأثير : فرصة جديدة للدخول بدلاً من تجاهل الحركة.
📌 التحسينات :
تتبع عدد الشموع منذ الكسر.
إعادة الدخول إذا عاد السعر داخل الصندوق خلال فترة محددة.
دعم كل من الكسر لأعلى ولأسفل.
🎨 7. تحسين الواجهة الرسومية (UI Enhancements)
✅ الوظيفة : تحسين واجهة المستخدم لتسهيل القراءة والتحليل.
✅ التأثير : توضيح الإشارات والمعلومات المرئية.
📌 التحسينات :
ألوان مخصصة لكل نوع من الصناديق (صحيحة، خادعة، إشارة شراء/بيع).
إضافة نصوص داخل الصناديق توضح الشروط التي أدت إلى الإشارة.
ألوان مميزة للصناديق الخادعة بناءً على مستوى السيولة.
⚙️ 8. تصحيح خطأ في نظام النقاط (Score System)
✅ الوظيفة : تحديد عدد الشروط اللازمة لإطلاق إشارة.
✅ التحسينات :
في النسخة الأصلية، كان وضع "2-of-3" يتطلب 3 شروط.
في النسخة المعدلة، أصبحت القيم صحيحة:
ALL : 4 شروط
ANY : 1 شرط
2-of-3 : 2 شروط
No Filter : بدون شروط
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.