OPEN-SOURCE SCRIPT
SuperBands: Smart Pullback Strategy

Indicator Name: SuperBands (Smart Pullback Strategy)
1. Core Concept (The Philosophy)
This indicator represents a smart fusion of two powerful trading methodologies: Trend Following and Mean Reversion. Instead of trying to predict market tops or bottoms, it focuses on joining an established trend at a "Discount Price."
In short: "Buy the dips in an Uptrend, and Sell the rallies in a Downtrend."
2. Technical Components
The indicator consists of two main engines working in harmony:
First: The Trend Filter (Supertrend):
Settings: (ATR 20 / Factor 6.0).
Function: Identifies the long-term market direction. The high Factor (6.0) is deliberately used to filter out noise and minor fluctuations, ensuring the trend direction only changes when there is a significant market shift.
Rule: If the line is Green, only Long trades are allowed. If Red, only Short trades are allowed.
Second: The Sniper (Bollinger Bands):
Settings: (Length 20 / StdDev 2.0).
Function: Identifies temporary Overbought and Oversold zones within the trend.
Rule: The Lower Band acts as a "Value Zone" for buying, while the Upper Band acts as a "Premium Zone" for selling.
3. Signal Logic (How it Works)
The indicator scans the market for specific, high-probability conditions:
A. Buy Signal (Green Triangle):
Appears only when both conditions are met:
Trend is Bullish: Supertrend is Green.
Price is "Cheap": Price drops to touch or break the Lower Bollinger Band.
Logic: The general trend is Up, and the price has pulled back to a dynamic support level. This is a buying opportunity.
B. Sell Signal (Red Triangle):
Appears only when both conditions are met:
Trend is Bearish: Supertrend is Red.
Price is "Expensive": Price rises to touch or break the Upper Bollinger Band.
Logic: The general trend is Down, and the price has rallied to a dynamic resistance level. This is a selling opportunity.
4. User Guide (How to Trade It)
To achieve the best results, consider the following approach when a signal appears:
A. Entry:
Enter the trade immediately upon the close of the candle where the triangle appears (or place a pending order slightly above/below the signal candle for confirmation).
B. Stop Loss (SL):
Conservative: Place the SL at the Supertrend line (if this line breaks, the trend is invalid).
Aggressive: Place the SL slightly below the signal candle's low or the most recent Swing Low.
C. Take Profit (TP):
Target 1: The Bollinger Bands Middle Line (Basis/SMA 20).
Target 2: The Opposite Band (Upper Band for Buy signals, Lower Band for Sell signals).
5. Key Strengths & Limitations
Main Advantage: This indicator prevents a common trader mistake: "FOMO" (Fear Of Missing Out). It stops you from buying at the top or selling at the bottom. It psychologically forces you to wait for the price to come to you.
Best Use Case: The wide Supertrend settings make this highly effective for Crypto and Volatile Stocks where trends are strong and pullbacks are deep.
Limitation: In tight, ranging markets (choppy markets), the price might not touch the bands often, or it might generate a signal followed by sideways movement.
Summary for the Trader:
This indicator tells you: "The trend is Up, but don't chase the price... wait for it to drop to the Lower Band, then strike."
اسم المؤشر: SuperBands (Smart Pullback Strategy)
1. الفكرة الأساسية (الفلسفة وراء المؤشر)
هذا المؤشر هو دمج ذكي بين استراتيجيتين شهيرتين: تتبع الاتجاه (Trend Following) و اقتناص الارتدادات (Mean Reversion). هو لا يحاول التنبؤ بقمة أو قاع السوق، بل يحاول الدخول مع الاتجاه العام القوي ولكن من "نقطة سعرية مخفضة" (Discount Price).
باختصار: "اشترِ الانخفاضات في الاتجاه الصاعد، وبع الارتفاعات في الاتجاه الهابط".
2. المكونات التقنية
يتكون المؤشر من جزأين رئيسيين يعملان كفريق واحد:
أولاً: الحارس (Supertrend):
الإعدادات: (ATR 20 / Factor 6.0).
الوظيفة: تحديد الاتجاه العام "طويل المدى". استخدام العامل 6.0 (وهو رقم كبير) يجعل المؤشر يتجاهل التذبذبات الصغيرة ولا يغير لونه إلا إذا تغير الاتجاه الحقيقي للسوق بقوة.
القاعدة: إذا كان الخط أخضر، يُسمح بالشراء فقط. إذا كان أحمر، يُسمح بالبيع فقط.
ثانياً: القناص (Bollinger Bands):
الإعدادات: (Length 20 / StdDev 2.0).
الوظيفة: تحديد مناطق ذروة البيع والشراء المؤقتة (Overbought/Oversold) داخل الاتجاه.
القاعدة: الحد السفلي يعتبر منطقة "رخيصة" للشراء، والحد العلوي منطقة "غالية" للبيع.
3. كيف تتكون الإشارة (آلية العمل)
يقوم المؤشر بمسح السوق بحثاً عن شروط محددة بدقة:
A. إشارة الشراء (المثلث الأخضر):
تظهر فقط عند تحقق الشرطين معاً:
الاتجاه صاعد: السوبر تريند لونه أخضر.
سعر مغري: السعر هبط ليلامس أو يكسر الحد السفلي للبولنجر باند (Lower Band).
المنطق: الاتجاه العام صاعد، والسعر قام بعمل تصحيح (Pullback) لمستوى دعم ديناميكي، إذن هي فرصة للشراء بسعر أفضل.
B. إشارة البيع (المثلث الأحمر):
تظهر فقط عند تحقق الشرطين معاً:
الاتجاه هابط: السوبر تريند لونه أحمر.
سعر مرتفع: السعر صعد ليلامس أو يخترق الحد العلوي للبولنجر باند (Upper Band).
المنطق: الاتجاه العام هابط، والسعر قام بعمل تصحيح صعودي لمقاومة ديناميكية، إذن هي فرصة للبيع من مكان مرتفع.
4. كيفية الاستفادة منه (دليل المستخدم)
لتحقيق أفضل نتائج، يُنصح باتباع الخطوات التالية عند ظهور الإشارة:
أ. نقاط الدخول (Entry):
ادخل الصفقة بمجرد إغلاق الشمعة التي ظهر عليها المثلث (أو ضع أمر معلق فوق/تحت الشمعة لتأكيد الحركة).
ب. وقف الخسارة (Stop Loss):
الخيار الآمن: ضع الوقف عند خط السوبر تريند (لأنه إذا كُسر الخط، يعني أن الاتجاه تغير).
الخيار المغامر: ضع الوقف أسفل قاع الشمعة السابقة بمسافة بسيطة، أو أسفل آخر قاع (Swing Low).
ج. جني الأرباح (Take Profit):
الهدف الأول: خط المنتصف للبولنجر باند (الخط البرتقالي الخفي أو متوسط 20).
الهدف الثاني: الحد المعاكس للبولنجر باند (الحد العلوي في حالة الشراء، والسفلي في حالة البيع).
5. مميزات وعيوب يجب الانتباه لها
الميزة القوية: يمنعك هذا المؤشر من ارتكاب خطأ شائع وهو "الشراء في القمة" أو "البيع في القاع". هو يجبرك نفسياً على انتظار السعر ليأتي إليك في مناطق التصحيح.
نقطة القوة: إعدادات السوبر تريند (6.0) تجعل الإشارات قوية جداً في العملات الرقمية (Crypto) والأسهم ذات الاتجاه الواضح (Trending Markets).
نقطة الضعف: في الأسواق العرضية المملة (Ranging Markets) ذات النطاق الضيق جداً، قد لا تلمس الأسعار حدود البولنجر كثيراً، أو قد يعطي إشارات دخول والسوق لا يتحرك بعدها بقوة.
ملخص للمتداول:
هذا المؤشر يقول لك: "السوق صاعد، لكن لا تطارد السعر.. انتظر حتى يهبط السعر إليك عند الخط السفلي ثم اشترِ".
1. Core Concept (The Philosophy)
This indicator represents a smart fusion of two powerful trading methodologies: Trend Following and Mean Reversion. Instead of trying to predict market tops or bottoms, it focuses on joining an established trend at a "Discount Price."
In short: "Buy the dips in an Uptrend, and Sell the rallies in a Downtrend."
2. Technical Components
The indicator consists of two main engines working in harmony:
First: The Trend Filter (Supertrend):
Settings: (ATR 20 / Factor 6.0).
Function: Identifies the long-term market direction. The high Factor (6.0) is deliberately used to filter out noise and minor fluctuations, ensuring the trend direction only changes when there is a significant market shift.
Rule: If the line is Green, only Long trades are allowed. If Red, only Short trades are allowed.
Second: The Sniper (Bollinger Bands):
Settings: (Length 20 / StdDev 2.0).
Function: Identifies temporary Overbought and Oversold zones within the trend.
Rule: The Lower Band acts as a "Value Zone" for buying, while the Upper Band acts as a "Premium Zone" for selling.
3. Signal Logic (How it Works)
The indicator scans the market for specific, high-probability conditions:
A. Buy Signal (Green Triangle):
Appears only when both conditions are met:
Trend is Bullish: Supertrend is Green.
Price is "Cheap": Price drops to touch or break the Lower Bollinger Band.
Logic: The general trend is Up, and the price has pulled back to a dynamic support level. This is a buying opportunity.
B. Sell Signal (Red Triangle):
Appears only when both conditions are met:
Trend is Bearish: Supertrend is Red.
Price is "Expensive": Price rises to touch or break the Upper Bollinger Band.
Logic: The general trend is Down, and the price has rallied to a dynamic resistance level. This is a selling opportunity.
4. User Guide (How to Trade It)
To achieve the best results, consider the following approach when a signal appears:
A. Entry:
Enter the trade immediately upon the close of the candle where the triangle appears (or place a pending order slightly above/below the signal candle for confirmation).
B. Stop Loss (SL):
Conservative: Place the SL at the Supertrend line (if this line breaks, the trend is invalid).
Aggressive: Place the SL slightly below the signal candle's low or the most recent Swing Low.
C. Take Profit (TP):
Target 1: The Bollinger Bands Middle Line (Basis/SMA 20).
Target 2: The Opposite Band (Upper Band for Buy signals, Lower Band for Sell signals).
5. Key Strengths & Limitations
Main Advantage: This indicator prevents a common trader mistake: "FOMO" (Fear Of Missing Out). It stops you from buying at the top or selling at the bottom. It psychologically forces you to wait for the price to come to you.
Best Use Case: The wide Supertrend settings make this highly effective for Crypto and Volatile Stocks where trends are strong and pullbacks are deep.
Limitation: In tight, ranging markets (choppy markets), the price might not touch the bands often, or it might generate a signal followed by sideways movement.
Summary for the Trader:
This indicator tells you: "The trend is Up, but don't chase the price... wait for it to drop to the Lower Band, then strike."
اسم المؤشر: SuperBands (Smart Pullback Strategy)
1. الفكرة الأساسية (الفلسفة وراء المؤشر)
هذا المؤشر هو دمج ذكي بين استراتيجيتين شهيرتين: تتبع الاتجاه (Trend Following) و اقتناص الارتدادات (Mean Reversion). هو لا يحاول التنبؤ بقمة أو قاع السوق، بل يحاول الدخول مع الاتجاه العام القوي ولكن من "نقطة سعرية مخفضة" (Discount Price).
باختصار: "اشترِ الانخفاضات في الاتجاه الصاعد، وبع الارتفاعات في الاتجاه الهابط".
2. المكونات التقنية
يتكون المؤشر من جزأين رئيسيين يعملان كفريق واحد:
أولاً: الحارس (Supertrend):
الإعدادات: (ATR 20 / Factor 6.0).
الوظيفة: تحديد الاتجاه العام "طويل المدى". استخدام العامل 6.0 (وهو رقم كبير) يجعل المؤشر يتجاهل التذبذبات الصغيرة ولا يغير لونه إلا إذا تغير الاتجاه الحقيقي للسوق بقوة.
القاعدة: إذا كان الخط أخضر، يُسمح بالشراء فقط. إذا كان أحمر، يُسمح بالبيع فقط.
ثانياً: القناص (Bollinger Bands):
الإعدادات: (Length 20 / StdDev 2.0).
الوظيفة: تحديد مناطق ذروة البيع والشراء المؤقتة (Overbought/Oversold) داخل الاتجاه.
القاعدة: الحد السفلي يعتبر منطقة "رخيصة" للشراء، والحد العلوي منطقة "غالية" للبيع.
3. كيف تتكون الإشارة (آلية العمل)
يقوم المؤشر بمسح السوق بحثاً عن شروط محددة بدقة:
A. إشارة الشراء (المثلث الأخضر):
تظهر فقط عند تحقق الشرطين معاً:
الاتجاه صاعد: السوبر تريند لونه أخضر.
سعر مغري: السعر هبط ليلامس أو يكسر الحد السفلي للبولنجر باند (Lower Band).
المنطق: الاتجاه العام صاعد، والسعر قام بعمل تصحيح (Pullback) لمستوى دعم ديناميكي، إذن هي فرصة للشراء بسعر أفضل.
B. إشارة البيع (المثلث الأحمر):
تظهر فقط عند تحقق الشرطين معاً:
الاتجاه هابط: السوبر تريند لونه أحمر.
سعر مرتفع: السعر صعد ليلامس أو يخترق الحد العلوي للبولنجر باند (Upper Band).
المنطق: الاتجاه العام هابط، والسعر قام بعمل تصحيح صعودي لمقاومة ديناميكية، إذن هي فرصة للبيع من مكان مرتفع.
4. كيفية الاستفادة منه (دليل المستخدم)
لتحقيق أفضل نتائج، يُنصح باتباع الخطوات التالية عند ظهور الإشارة:
أ. نقاط الدخول (Entry):
ادخل الصفقة بمجرد إغلاق الشمعة التي ظهر عليها المثلث (أو ضع أمر معلق فوق/تحت الشمعة لتأكيد الحركة).
ب. وقف الخسارة (Stop Loss):
الخيار الآمن: ضع الوقف عند خط السوبر تريند (لأنه إذا كُسر الخط، يعني أن الاتجاه تغير).
الخيار المغامر: ضع الوقف أسفل قاع الشمعة السابقة بمسافة بسيطة، أو أسفل آخر قاع (Swing Low).
ج. جني الأرباح (Take Profit):
الهدف الأول: خط المنتصف للبولنجر باند (الخط البرتقالي الخفي أو متوسط 20).
الهدف الثاني: الحد المعاكس للبولنجر باند (الحد العلوي في حالة الشراء، والسفلي في حالة البيع).
5. مميزات وعيوب يجب الانتباه لها
الميزة القوية: يمنعك هذا المؤشر من ارتكاب خطأ شائع وهو "الشراء في القمة" أو "البيع في القاع". هو يجبرك نفسياً على انتظار السعر ليأتي إليك في مناطق التصحيح.
نقطة القوة: إعدادات السوبر تريند (6.0) تجعل الإشارات قوية جداً في العملات الرقمية (Crypto) والأسهم ذات الاتجاه الواضح (Trending Markets).
نقطة الضعف: في الأسواق العرضية المملة (Ranging Markets) ذات النطاق الضيق جداً، قد لا تلمس الأسعار حدود البولنجر كثيراً، أو قد يعطي إشارات دخول والسوق لا يتحرك بعدها بقوة.
ملخص للمتداول:
هذا المؤشر يقول لك: "السوق صاعد، لكن لا تطارد السعر.. انتظر حتى يهبط السعر إليك عند الخط السفلي ثم اشترِ".
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.