Smart FlexRange Breakout [The_lurker]

The tool is run according to the selected timeframe.
Practical Use
1- Setup: Adjust the market, timeframe, number of hours, and time zone to suit the trader's needs.
2- Trading: Monitor signals (BUY/SELL) and TP levels to determine entry and exit points.
3- Trend Lines: Use them to understand the overall trend and confirm signals.
---
1. Objective: Identify trading opportunities based on price breakouts
- Trading opportunities: The indicator is designed to help traders identify moments when significant price movements are likely, allowing them to enter buy or sell trades based on market changes.
- Price breakouts: The indicator focuses on moments when prices break through key levels (resistance or support). A breakout occurs when the price exceeds a resistance level (up) or breaks a support level (down), indicating a potential continuation of the movement in the same direction.
- Dynamic: Resistance and support levels are not static; rather, they are calculated based on candlestick analysis over a specific period of time, making them adaptive to current market conditions.
---
2. Dynamic levels (resistance and support levels)
- Resistance levels: These represent prices that the price is difficult to break above, defined here as the high of the most significant candle during the specified period.
- Support levels: These represent prices below which the price is difficult to fall, defined as the low of the most significant candle.
- Dynamic: These levels are recalculated every new search period (searchHours), meaning they change based on the latest market data, unlike traditional static levels.
---
3. Adding a Dotted Center Line
- Center Line: A horizontal dotted line is drawn at the midpoint between the high and low of the most significant candle.
- Purpose:
- Provides a visual reference point for determining the current price position relative to support and resistance levels.
- Helps assess whether the price is moving toward a breakout (near resistance) or a breakout (near support).
- Dotted: The dotted pattern distinguishes it from the solid upper and lower lines, making it easier to distinguish visually.
---
4. Relying on candlestick analysis over a specific time period (searchHours)
- Candlestick Analysis: The indicator examines candlesticks to determine which ones have the most influence on price movement.
- Timeframe (searchHours):
- The user specifies the number of hours (1-6) for candle analysis, which determines the range of data the indicator relies on.
- Example: If searchHours = 3 and timeframe = 30 minutes, 6 candles are analyzed (3 hours ÷ 30 minutes).
- Flexibility: This period can be adjusted to suit different markets (such as volatile cryptocurrencies or more stable Forex).
---
5. Determining the Most Important Candle Based on Candle Patterns and Volume
- The most important candle: is the candle believed to have the greatest impact on price movement based on specific criteria.
- Candle Patterns:
- Candles are analyzed using a candlestick pattern library (such as Engulfing, Hammer, Doji).
- Reversal patterns (such as Morning Star, Shooting Star) are given a high importance score (100 points) because they indicate potential trend changes.
- Trading Volume:
- The trading volume of each candle is measured and compared to the maximum and minimum during the period.
- Volume is calculated as a percentage (0-100) and added to the pattern score to determine the most significant candle.
- Result: The candle with the highest score (patterns + volume) is used to determine support and resistance levels.
---
6. Timeframe
- Time interval: The user selects a time frame for the candles (15, 30, or 60 minutes).
- Importance:
- Determines the number of candles analyzed during the searchHours period.
- Affects the accuracy and speed of the signals (shorter timeframe = faster but less reliable signals; longer timeframe = slower but more reliable signals).
- Example: If the timeframe is 60 minutes and searchHours is 3, only 3 candles are analyzed.
---
7. Drawing Breakout Levels and Take Profit Targets (TP)
- Breakout Levels:
- Upper line (resistance): Drawn at the highest price of the most significant candle and is labeled "CALL".
- Lower line (support): Drawn at the lowest price of the most important candle and is called "PUT."
- These lines represent levels where a breakout is expected to lead to a strong price movement.
- Take Profit Targets (TP):
- Up to 8 bullish (above the upper line) and bearish (below the lower line) TP levels are calculated.
- They are calculated based on a percentage (tpPercentage) added or subtracted from the base lines.
- Example: If tpPercentage = 0.6% and the high price = 100, then bullish TP1 = 100.6, TP2 = 101.2, etc.
- Labels: Labels are drawn for each TP level indicating the value and level (TP1, TP2, etc.).
---
8. Buy and Sell Signals
- Buy (BUY) signal:
- Generated when the price breaks the upper line (ta.crossover).
- The "BUY" label is drawn with the redrawing of the TP levels.
- Sell signal (SELL):
- Generated when the price breaks the lower line (ta.crossunder).
- The "SELL" label is drawn with the redrawing of the TP levels.
- Purpose: To provide clear signals to the trader for making trade entry decisions.
=========================================================================
Thank you, n00btraders.
For using the import library: n00btraders/Timezone/1

For using the import library: The_lurker/AllCandlestickPatternsLibrary/1

========================================================================
Disclaimer:
The information and publications are not intended to be, nor do they constitute, financial, investment, trading, or other types of advice or recommendations provided or endorsed by TradingView.
تهدف أداة Smart FlexRange Breakout إلى تحديد فرص التداول بناءً على اختراقات الأسعار للمستويات الديناميكية (CALL، PUT) مع خط مركزي منقط، مع إمكانية اختيار السوق المناسب. تعتمد الأداة على تحليل الشموع اليابانية على مدى فترة زمنية محددة (مثل 3 ساعات). تُجمع بيانات الشموع (searchHours) لتحديد أهم شمعة بناءً على أنماط الشموع وحجم التداول خلال الإطار الزمني المحدد. ثم تُرسم مستويات الاختراق وأهداف جني الأرباح (TP)، بالإضافة إلى إشارات البيع والشراء، وإشعارات الاختراق، وخطوط الاتجاه الصعودي/الهبوطي بناءً على نقاط المحور.
يتم تشغيل الاداه حسب الفاصل المختار timeframe
الاستخدام العملي
1- الإعداد: اضبط السوق، والإطار الزمني، وعدد الساعات، والمنطقة الزمنية لتناسب احتياجات المتداول.
2- التداول: راقب إشارات (الشراء/البيع) ومستويات جني الأرباح لتحديد نقاط الدخول والخروج.
3- خطوط الاتجاه: استخدمها لفهم الاتجاه العام وتأكيد الإشارات.
1. الهدف: تحديد فرص التداول بناءً على اختراقات الأسعار
- فرص التداول: صُمم هذا المؤشر لمساعدة المتداولين على تحديد اللحظات التي يُحتمل فيها حدوث تحركات سعرية كبيرة، مما يسمح لهم بالدخول في صفقات شراء أو بيع بناءً على تغيرات السوق.
- اختراقات الأسعار: يُركز المؤشر على اللحظات التي تخترق فيها الأسعار مستويات رئيسية (مقاومة أو دعم). يحدث الاختراق عندما يتجاوز السعر مستوى مقاومة (صعودًا) أو يخترق مستوى دعم (هبوطًا)، مما يُشير إلى احتمال استمرار الحركة في نفس الاتجاه.
- ديناميكي: مستويات المقاومة والدعم ليست ثابتة؛ بل تُحسب بناءً على تحليل الشموع اليابانية على مدى فترة زمنية محددة، مما يجعلها مُكيفة مع ظروف السوق الحالية.
2. المستويات الديناميكية (مستويات المقاومة والدعم)
- مستويات المقاومة: تُمثل هذه الأسعار التي يصعب على السعر تجاوزها، وتُعرف هنا بأنها ارتفاع الشمعة الأكثر أهمية خلال الفترة المحددة.
- مستويات الدعم: تُمثل هذه الأسعار التي يصعب على السعر الانخفاض دونها، وتُعرف بأنها أدنى مستوى للشمعة الأكثر أهمية.
- ديناميكي: تُعاد حساب هذه المستويات مع كل فترة بحث جديدة (ساعات البحث)، مما يعني أنها تتغير بناءً على أحدث بيانات السوق، على عكس المستويات الثابتة التقليدية.
3. إضافة خط مركزي منقط
- خط المركز: يُرسم خط أفقي منقط عند نقطة المنتصف بين أعلى وأدنى شمعة ذات أهمية.
- الغرض:
- يوفر نقطة مرجعية بصرية لتحديد وضع السعر الحالي بالنسبة لمستويات الدعم والمقاومة.
- يساعد في تقييم ما إذا كان السعر يتحرك نحو اختراق (بالقرب من المقاومة) أو اختراق (بالقرب من الدعم).
- منقط: يُميزه النمط المنقط عن الخطوط العلوية والسفلية المتصلة، مما يُسهّل تمييزه بصريًا.
4. الاعتماد على تحليل الشموع اليابانية على مدى فترة زمنية محددة (ساعات البحث)
- تحليل الشموع اليابانية: يفحص المؤشر الشموع اليابانية لتحديد أيها الأكثر تأثيرًا على حركة السعر.
- الإطار الزمني (ساعات البحث):
- يُحدد المستخدم عدد الساعات (من 1 إلى 6) لتحليل الشموع، والذي يُحدد نطاق البيانات التي يعتمد عليها المؤشر.
- مثال: إذا كانت ساعات البحث = 3 والإطار الزمني = 30 دقيقة، فسيتم تحليل 6 شموع (3 ساعات ÷ 30 دقيقة).
- المرونة: يُمكن تعديل هذه الفترة لتناسب الأسواق المختلفة (مثل العملات المشفرة المتقلبة أو سوق الفوركس الأكثر استقرارًا).
5. تحديد الشمعة الأكثر أهمية بناءً على أنماط الشموع وحجم التداول
- الشمعة الأكثر أهمية: هي الشمعة التي يُعتقد أن لها التأثير الأكبر على حركة السعر بناءً على معايير محددة.
- أنماط الشموع:
- يتم تحليل الشموع باستخدام مكتبة أنماط الشموع (مثل شمعة الابتلاع، وشمعة المطرقة، وشمعة الدوجي).
- تُمنح أنماط الانعكاس (مثل نجمة الصباح، ونجم الشهاب) درجة أهمية عالية (100 نقطة) لأنها تُشير إلى تغيرات محتملة في الاتجاه.
- حجم التداول:
- يُقاس حجم تداول كل شمعة ويُقارن بالحد الأقصى والأدنى خلال الفترة.
- يُحسب الحجم كنسبة مئوية (0-100) ويُضاف إلى درجة النمط لتحديد الشمعة الأكثر أهمية.
- النتيجة: تُستخدم الشمعة ذات أعلى درجة (الأنماط + الحجم) لتحديد مستويات الدعم والمقاومة.
٦. الإطار الزمني
- الفاصل الزمني: يختار المستخدم إطارًا زمنيًا للشموع (١٥، ٣٠، أو ٦٠ دقيقة).
- الأهمية:
- يحدد عدد الشموع المُحللة خلال فترة ساعات البحث.
- يؤثر على دقة وسرعة الإشارات (الإطار الزمني الأقصر = إشارات أسرع ولكن أقل موثوقية؛ الإطار الزمني الأطول = إشارات أبطأ ولكن أكثر موثوقية).
- مثال: إذا كان الإطار الزمني ٦٠ دقيقة وساعات البحث ٣، فسيتم تحليل ٣ شموع فقط.
---
٧. رسم مستويات الاختراق وأهداف جني الأرباح (TP)
- مستويات الاختراق:
- الخط العلوي (المقاومة): يُرسم عند أعلى سعر للشمعة الأكثر أهمية ويُسمى "CALL".
- الخط السفلي (الدعم): يُرسم عند أدنى سعر للشمعة الأكثر أهمية ويُسمى "PUT".
- تمثل هذه الخطوط المستويات التي يُتوقع أن يؤدي فيها الاختراق إلى حركة سعرية قوية.
- أهداف جني الأرباح (TP):
- يتم حساب ما يصل إلى 8 مستويات جني أرباح صعودية (فوق الخط العلوي) وهبوطية (تحت الخط السفلي).
- يتم حسابها بناءً على نسبة مئوية (tpPercentage) تُضاف أو تُطرح من خطوط الأساس.
- مثال: إذا كانت نسبة جني الأرباح = 0.6% وكان أعلى سعر = 100، فإن هدف الربح الصعودي الأول = 100.6، وهدف الربح الثاني = 101.2، وهكذا.
- العلامات: تُرسم علامات لكل مستوى جني أرباح تشير إلى القيمة والمستوى (TP1، TP2، وهكذا).
---
8. إشارات الشراء والبيع
- إشارة الشراء (BUY):
- تُولّد عند اختراق السعر للخط العلوي (ta.crossover).
- تُرسم علامة "الشراء" مع إعادة رسم مستويات جني الأرباح.
- إشارة البيع (SELL):
- تُولّد عند اختراق السعر للخط السفلي (ta.crossunder). - يُرسم مؤشر "بيع" مع إعادة رسم مستويات جني الأرباح.
- الغرض: توفير إشارات واضحة للمتداول لاتخاذ قرارات دخول الصفقة.
==========================================================================
شكرًا لكم، أيها المتداولون الجدد.
لاستخدام مكتبة الاستيراد: n00btraders/Timezone/1

لاستخدام مكتبة الاستيراد: The_lurker/AllCandlestickPatternsLibrary/1

==============================================================================
إخلاء مسؤولية:
لا يُقصد بهذه المعلومات والمنشورات أن تكون، ولا تُشكل، نصائح أو توصيات مالية أو استثمارية أو تجارية أو أي نوع آخر من النصائح أو التوصيات المُقدمة من TradingView أو المُعتمدة منها.
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.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.
Penafian
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.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.