Hunter Channel• Overview
Hunter Channel is a technical analysis indicator designed to identify structured price channels, evaluate their geometry and price interaction, monitor confirmed boundary breaks, and provide sequential post-breakout projections.
The indicator combines several related stages in one workflow. The channel engine identifies the price structure, the quality model evaluates characteristics of that structure, the breakout engine monitors interaction with the channel boundaries, the target system follows price after a breakout, and the Radar provides a separate view of the current smoothed directional environment.
These components are intended to answer different questions about the same market structure rather than operate as independent trading systems.
• Channel Construction
The channel engine uses confirmed pivot highs and pivot lows.
A potential channel can be constructed from two relevant pivot highs with an intervening pivot low, or from two relevant pivot lows with an intervening pivot high.
The two same-side pivots establish the slope of one boundary. The intervening opposite pivot is then used to position the parallel boundary, creating an equidistant channel structure.
The search is controlled by three principal settings:
• Maximum Lookback Limit — determines how far back the script can consider a qualifying pivot structure.
• Minimum Channel Length — specifies the minimum number of bars required before a candidate structure can qualify.
• Pivot Length — controls the sensitivity used to confirm pivot highs and lows.
A shorter Pivot Length generally reacts to smaller price swings, while a larger value requires broader swing structures.
• Channel Validation
Connecting pivots alone is not sufficient for the script to accept a channel.
After constructing a candidate, the indicator checks price behavior across the formation period. If price has moved excessively beyond the projected boundaries relative to the height of the channel, the candidate is rejected.
This validation is intended to distinguish a channel that has contained the relevant price structure from a geometric connection that does not adequately represent the intervening price action.
Once a qualifying newer channel is detected, the script begins tracking that structure and updates its projected boundaries as new bars are formed.
• Channel Display
A qualified structure contains an upper boundary and a parallel lower boundary.
An optional dashed midline represents the center of the channel, and the area between the outer boundaries can be shaded for visual reference.
Channel, midline, fill, and breakout-candle colors can be adjusted from the indicator settings.
• Channel Quality
After a candidate passes structural validation, Hunter Channel evaluates several characteristics of the detected structure.
The quality model considers channel width relative to recent ATR conditions, normalized channel slope, channel angle, and the amount of price movement that occurred outside a narrow tolerance around the projected boundaries.
These measurements are combined into a 0–100 structural score.
The resulting classifications are:
• Elite — score of 85 or higher.
• Strong — score from 70 to 84.
• Good — score from 50 to 69.
• Weak — score below 50.
Only structures meeting the script's qualifying threshold are activated as channels.
The score evaluates characteristics of the detected channel. It is not a historical win rate, statistical probability, or prediction of future performance.
• Channel Angle
The slope of the channel is normalized relative to recent volatility before its angle is evaluated.
The dashboard then describes the structure as Flat/Ranging, Healthy Trend, or Too Steep according to the measured angle.
This provides information about channel geometry independently of whether price will eventually break upward or downward.
• Channel Width
Channel height is also compared with recent ATR conditions.
This allows the script to identify structures that are unusually narrow, unusually wide, or within the script's normal width range.
Width is one component of the structural quality assessment and is not by itself a directional signal.
• Breakout Detection
Once a channel is active, the script continuously evaluates the current upper and lower projected boundaries.
Three breakout methods are available:
• Conservative (Close) — requires the candle to close beyond the relevant channel boundary.
• Aggressive (Wick) — reacts when the candle high or low crosses the relevant boundary.
• 10% Body Breakout — requires price to extend beyond the boundary by an additional amount derived from the channel height.
These alternatives allow users to choose how strict the boundary-break confirmation should be.
A bullish breakout state represents a confirmed break above the upper channel boundary according to the selected method. A bearish breakout state represents the corresponding break below the lower boundary.
A breakout state describes the programmed boundary condition; it does not represent a recommendation to enter a position.
• Sequential Targets
Following a confirmed breakout, the indicator uses the height of the detected channel as the reference for its projection system.
Target levels progress in half-channel-height increments from the breakout reference.
When price reaches the active target, the script advances to the next target and retains completed target levels on the chart.
This creates a sequential projection process rather than displaying only one fixed objective.
The targets are geometric extensions of the detected channel. They do not estimate the probability that price will reach a particular level.
• Retest Monitoring
After a breakout, Hunter Channel continues monitoring the relationship between price and the projected channel boundary.
After the initial breakout bars have passed, the script checks whether price revisits the relevant boundary area and then closes back on the breakout side of that boundary.
When those programmed conditions occur, the indicator marks the event as a retest.
A retest describes price interaction with the former channel boundary and does not guarantee continuation.
• Failed Breakout
The script also defines a condition for invalidating the active breakout state.
If price closes sufficiently back inside the projected channel after the breakout, relative to the height of the channel, the breakout is treated as failed.
The current channel graphics and associated target sequence are then cleared, allowing the channel engine to continue evaluating subsequent structures.
This creates a state-based workflow in which the indicator moves from channel identification to breakout monitoring and then either target/retest tracking or breakout invalidation.
• Radar Context
Hunter Channel includes a separate Radar overlay to provide directional context alongside the geometric channel structure.
The Radar uses two differently smoothed price-midpoint series. The default lengths are 11 and 33, followed by additional short smoothing.
The relative position of the faster and slower Radar lines determines the color of the area between them. A center line is also plotted between the two structures.
Radar does not determine the channel pivots, channel boundaries, channel quality score, or breakout condition.
It is included because the two components describe different aspects of price behavior: the channel represents geometric structure and boundary interaction, while Radar provides a smoothed view of the current directional environment.
This allows users to compare a channel or breakout with the surrounding directional context without merging the two calculations into a single signal.
• Analytical Dashboard
The dashboard summarizes the currently tracked channel using Quality Score, Channel Angle, Channel Width, breakout-context classification, and the next active target.
The quality and breakout-context fields are descriptive outputs derived from the script's structural measurements. They should not be interpreted as empirical probabilities, statistical success rates, or expected trading returns.
• Dashboard Language
The dashboard supports both English and Arabic.
The language can be selected from:
Settings → Dashboard → Table Language / لغة الجدول
Changing the dashboard language only changes displayed text. It does not modify channel detection, scoring, breakout conditions, targets, or Radar calculations.
• Alerts
The script includes alerts for several programmed events, including detection of a new qualifying channel, a confirmed boundary breakout, achievement of a target level, completion of a retest, and detection of a failed breakout.
An alert only indicates that the corresponding programmed condition has occurred. It does not represent an order or personalized trading instruction.
• Suggested Use
A practical way to read Hunter Channel is to begin with the channel itself: review its boundaries, width, angle, and structural quality.
Next, observe how price interacts with the upper and lower boundaries and apply the preferred breakout-confirmation method.
If a breakout occurs, the sequential targets and retest state provide information about subsequent price development.
Radar can then be used as additional directional context rather than as a requirement for channel detection or breakout confirmation.
• Limitations
Hunter Channel is a technical analysis tool and not an automated trading system.
Pivot-based structures require confirmed swing points, so a channel can only be identified after the required pivot information becomes available.
A valid historical channel does not guarantee that its boundaries will continue to contain price.
Breakouts can fail, reverse, or produce limited follow-through.
Channel-quality scores describe the characteristics of detected structures and do not measure future profitability.
Sequential targets are geometric projections and do not guarantee future price levels.
Radar describes smoothed price behavior and does not predict future direction with certainty.
Because the script displays directional breakout states, it is intended for use on standard price charts. Synthetic chart types such as Heikin Ashi, Renko, Kagi, Point & Figure, and Range charts can produce different price data and should not be used to interpret the script's breakout behavior as realistic trading performance.
• Disclaimer
Hunter Channel is provided for technical analysis and educational purposes.
It does not provide investment advice, financial advice, or a recommendation to buy or sell any financial instrument.
No channel, quality score, breakout state, retest, target, Radar condition, or other script output guarantees future market direction or trading results.
Users remain responsible for their own analysis, execution, position sizing, and risk management.
________________________________________
• نظرة عامة
Hunter Channel هو مؤشر للتحليل الفني صُمم لاكتشاف القنوات السعرية المنظمة، وتقييم خصائصها الهندسية وتفاعل السعر معها، ومتابعة اختراق حدودها، ثم عرض مستويات إسقاط متتابعة بعد تحقق الاختراق.
يجمع المؤشر عدة مراحل مترابطة ضمن سير عمل واحد. يتولى محرك القنوات تحديد البنية السعرية، ويقيّم نظام الجودة خصائص القناة المكتشفة، ويراقب محرك الاختراق تفاعل السعر مع حدودها، بينما يتابع نظام الأهداف تطور السعر بعد الاختراق. ويقدم Radar قراءة منفصلة للسياق الاتجاهي الممهد للسعر.
هذه المكونات تقيس جوانب مختلفة من البنية نفسها، ولا تعمل باعتبارها أنظمة تداول مستقلة عن بعضها.
• تكوين القناة
يعتمد محرك القنوات على قمم وقيعان Pivot مؤكدة.
يمكن تكوين قناة محتملة باستخدام قمتين Pivot مناسبتين مع وجود قاع Pivot بينهما، أو باستخدام قاعين Pivot مناسبين مع وجود قمة Pivot بينهما.
تحدد نقطتا الارتكاز الواقعتان في الجهة نفسها ميل أحد حدود القناة، ثم تستخدم نقطة الارتكاز المقابلة لوضع الحد الموازي الآخر، وبذلك تتكون قناة متساوية الأبعاد.
وتتحكم في عملية البحث ثلاثة إعدادات رئيسية:
• Maximum Lookback Limit — يحدد أقصى نطاق تاريخي يمكن للسكربت البحث داخله عن بنية Pivot مناسبة.
• Minimum Channel Length — يحدد الحد الأدنى لعدد الشموع المطلوبة قبل قبول القناة المرشحة.
• Pivot Length — يتحكم في حساسية اكتشاف القمم والقيعان.
القيم الأصغر لـ Pivot Length تتفاعل عادة مع تحركات سعرية أصغر، بينما تتطلب القيم الأكبر تكوينات Swing أوسع قبل تأكيد نقاط الارتكاز.
• التحقق من القناة
مجرد توصيل نقاط Pivot لا يكفي لاعتماد القناة.
بعد تكوين قناة مرشحة، يفحص المؤشر حركة السعر خلال فترة تكوينها. وإذا تجاوز السعر الحدود المتوقعة بدرجة كبيرة مقارنة بارتفاع القناة، يتم رفض البنية.
الغرض من هذا الفحص هو التفريق بين قناة احتوت الحركة السعرية ذات الصلة وبين مجرد اتصال هندسي بين نقاط منفصلة لا يمثل حركة السعر الواقعة بينها بصورة مناسبة.
وعند اكتشاف قناة أحدث مستوفية للشروط، يبدأ السكربت في متابعة تلك البنية وتحديث حدودها المتوقعة مع تكوّن الشموع الجديدة.
• رسم القناة
تتكون البنية المؤهلة من حد علوي وحد سفلي متوازٍ معه.
ويمكن عرض خط متقطع في منتصف القناة، إضافة إلى تظليل المنطقة الواقعة بين الحدين الخارجيين.
كما يمكن التحكم في ألوان القناة وخط المنتصف والتظليل وشمعة الاختراق من الإعدادات.
• تقييم جودة القناة
بعد اجتياز القناة لفحص البنية، يقيم Hunter Channel مجموعة من خصائصها.
يأخذ التقييم في الاعتبار عرض القناة مقارنة بظروف ATR الأخيرة، وميل القناة بعد التطبيع، وزاويتها، ومقدار خروج حركة السعر عن نطاق ضيق حول الحدود المتوقعة.
يتم دمج هذه القياسات في تقييم هيكلي من 0 إلى 100.
وتقسم النتائج إلى:
• Elite / ممتاز — من 85 فأعلى.
• Strong / قوي — من 70 إلى 84.
• Good / جيد — من 50 إلى 69.
• Weak / ضعيف — أقل من 50.
ولا يتم تفعيل القناة إلا عندما تحقق الحد المطلوب في نموذج التقييم.
هذا الرقم يصف خصائص القناة المكتشفة، ولا يمثل نسبة نجاح تاريخية أو احتمالًا إحصائيًا أو توقعًا للأداء المستقبلي.
• زاوية القناة
يتم تطبيع ميل القناة مقارنة بالتذبذب الأخير قبل تقييم زاويتها.
ثم تصف لوحة التحليل البنية بحالات مثل أفقي/عرضي، ترند صحي، أو حاد جدًا بحسب الزاوية المقاسة.
توفر هذه الخانة معلومات عن الشكل الهندسي للقناة بصورة مستقلة عن اتجاه الاختراق الذي قد يحدث لاحقًا.
• عرض القناة
يقارن السكربت ارتفاع القناة بظروف ATR الأخيرة.
ويتيح ذلك التمييز بين القنوات الضيقة بصورة غير معتادة، والقنوات ذات العرض المناسب وفق النموذج، والقنوات الواسعة بصورة كبيرة.
ويمثل العرض أحد مكونات تقييم البنية ولا يشكل بمفرده إشارة اتجاهية.
• اكتشاف الاختراق
بعد تفعيل القناة يراقب السكربت بصورة مستمرة الحدود العلوية والسفلية المتوقعة.
وتتوفر ثلاث طرق لتحديد الاختراق:
• Conservative (Close) — تتطلب إغلاق الشمعة خارج حد القناة ذي الصلة.
• Aggressive (Wick) — تعتمد على تجاوز أعلى أو أدنى سعر داخل الشمعة للحد المناسب.
• 10% Body Breakout — تتطلب امتداد السعر خارج الحد بمسافة إضافية مشتقة من ارتفاع القناة.
وتسمح هذه الخيارات للمستخدم بتحديد درجة الصرامة المطلوبة في تأكيد كسر حدود القناة.
الحالة الصاعدة تعني أن شرط اختراق الحد العلوي قد تحقق وفق الطريقة المختارة، والحالة الهابطة تعني تحقق الشرط المقابل أسفل الحد السفلي.
وصف الاختراق يعني تحقق الشرط البرمجي المرتبط بحد القناة، ولا يمثل توصية بالدخول في صفقة.
• الأهداف المتتابعة
بعد تأكيد الاختراق يستخدم المؤشر ارتفاع القناة المكتشفة باعتباره مرجعًا لنظام الإسقاط السعري.
تتقدم الأهداف بمراحل تعادل نصف ارتفاع القناة انطلاقًا من مرجع الاختراق.
وعند وصول السعر إلى الهدف النشط ينتقل السكربت إلى المستوى التالي، مع الاحتفاظ بمستويات الأهداف التي تم الوصول إليها على الشارت.
وبذلك تتم متابعة امتداد الحركة على مراحل بدل الاعتماد على هدف واحد ثابت.
هذه المستويات عبارة عن إسقاطات هندسية مشتقة من القناة، ولا تقيس احتمال وصول السعر إلى أي مستوى معين.
• متابعة إعادة الاختبار
بعد الاختراق يستمر Hunter Channel في مراقبة العلاقة بين السعر والحد المتوقع للقناة.
بعد مرور الشموع الأولى من الاختراق، يفحص السكربت ما إذا كان السعر قد عاد إلى المنطقة القريبة من الحد ذي الصلة ثم أغلق مرة أخرى في جهة الاختراق.
وعند تحقق الشروط المبرمجة تظهر حالة إعادة الاختبار.
وتمثل إعادة الاختبار وصفًا لتفاعل السعر مع حد القناة السابق ولا تضمن استمرار الحركة.
• فشل الاختراق
يحتوي السكربت كذلك على شرط لإبطال حالة الاختراق النشطة.
إذا أغلق السعر بدرجة كافية مرة أخرى داخل القناة المتوقعة بعد الاختراق، مقارنة بارتفاع القناة، تتم معاملة الحالة باعتبارها اختراقًا فاشلًا.
بعد ذلك يتم مسح القناة وأهدافها المرتبطة بها، ويستمر محرك القنوات في تقييم البنى اللاحقة.
وبذلك يعمل المؤشر وفق دورة حالة تبدأ باكتشاف القناة، ثم متابعة الاختراق، ثم متابعة الأهداف أو إعادة الاختبار، أو إبطال الاختراق عند تحقق شروط الفشل.
• سياق Radar
يتضمن Hunter Channel مكونًا مستقلًا باسم Radar لتوفير سياق اتجاهي إضافي إلى جانب البنية الهندسية للقناة.
يعتمد Radar على بنيتين سعريتين بتنعيم مختلف. الأطوال الافتراضية هي 11 و33، يليهما تنعيم قصير إضافي.
ويحدد الموقع النسبي بين خطي Radar لون المنطقة الواقعة بينهما، كما يتم رسم خط في منتصف البنيتين.
Radar لا يحدد نقاط Pivot الخاصة بالقناة، ولا حدودها، ولا تقييم جودتها، ولا شروط الاختراق.
سبب وجوده إلى جانب القناة هو أن كل مكون يصف جانبًا مختلفًا من حركة السعر. القناة تصف البنية الهندسية والتفاعل مع الحدود، بينما يقدم Radar قراءة ممهدة للبيئة الاتجاهية الحالية.
وبذلك يستطيع المستخدم مقارنة القناة أو الاختراق بالسياق الاتجاهي المحيط دون دمج الحسابين في إشارة واحدة.
• لوحة التحليل
تلخص لوحة التحليل حالة القناة التي تتم متابعتها من خلال تقييم الجودة، وزاوية القناة، وعرض القناة، والتقييم السياقي للاختراق، والهدف النشط التالي.
هذه القراءات عبارة عن أوصاف مشتقة من قياسات البنية داخل السكربت، ولا ينبغي تفسيرها على أنها احتمالات إحصائية أو نسب نجاح أو عوائد تداول متوقعة.
• لغة لوحة التحليل
تدعم لوحة المؤشر اللغتين الإنجليزية والعربية.
يمكن تغيير اللغة من:
Settings → Dashboard → Table Language / لغة الجدول
تغيير اللغة يؤثر فقط في النصوص المعروضة ولا يغير اكتشاف القنوات أو تقييمها أو شروط الاختراق أو الأهداف أو حسابات Radar.
• التنبيهات
يتضمن السكربت تنبيهات لعدد من الأحداث المبرمجة، ومنها اكتشاف قناة جديدة مستوفية للشروط، وتأكيد اختراق أحد الحدود، والوصول إلى هدف، واكتمال إعادة الاختبار، واكتشاف فشل الاختراق.
ظهور التنبيه يعني أن الشرط البرمجي المقابل قد تحقق، ولا يمثل أمر تداول أو توجيهًا شخصيًا للدخول أو الخروج.
• طريقة مقترحة لقراءة المؤشر
يمكن البدء بمراجعة القناة نفسها من خلال حدودها وعرضها وزاويتها وتقييم بنيتها.
بعد ذلك تتم مراقبة تفاعل السعر مع الحدين العلوي والسفلي واستخدام طريقة تأكيد الاختراق التي يختارها المستخدم.
إذا تحقق الاختراق، توفر الأهداف المتتابعة وحالة إعادة الاختبار معلومات إضافية عن تطور السعر بعد الحدث.
أما Radar فيمكن استخدامه باعتباره سياقًا اتجاهيًا إضافيًا، وليس شرطًا لاكتشاف القناة أو تأكيد الاختراق.
• حدود الاستخدام
Hunter Channel أداة للتحليل الفني وليس نظام تداول آليًا.
تعتمد البنية على نقاط Pivot مؤكدة، ولذلك لا يمكن تحديد القناة إلا بعد توفر بيانات الارتكاز المطلوبة.
وجود قناة صحيحة تاريخيًا لا يعني أن السعر سيستمر في احترام حدودها.
وقد يفشل الاختراق أو ينعكس أو ينتج عنه امتداد محدود.
تقييم الجودة يصف خصائص القناة المكتشفة ولا يقيس الربحية المستقبلية.
الأهداف عبارة عن إسقاطات هندسية ولا تضمن وصول السعر إلى المستويات المعروضة.
كما أن Radar يصف حركة سعرية ممهدة ولا يستطيع تحديد الاتجاه المستقبلي بصورة مؤكدة.
ونظرًا إلى أن السكربت يعرض حالات اختراق اتجاهية، فهو مخصص للاستخدام على الشارتات السعرية القياسية. أنواع الشارت الاصطناعية مثل Heikin Ashi وRenko وKagi وPoint & Figure وRange قد تنتج بيانات سعرية مختلفة، ولذلك لا ينبغي استخدام نتائجها لتقييم سلوك إشارات الاختراق باعتباره أداء تداول واقعيًا.
• إخلاء المسؤولية
Hunter Channel مخصص للتحليل الفني والأغراض التعليمية.
ولا يقدم نصيحة استثمارية أو مالية أو توصية بشراء أو بيع أي أداة مالية.
ولا تضمن أي قناة أو تقييم جودة أو حالة اختراق أو إعادة اختبار أو هدف أو قراءة Radar أو أي مخرج آخر من السكربت اتجاه السوق المستقبلي أو نتائج التداول.
ويبقى المستخدم مسؤولًا عن تحليله وقرارات التنفيذ وحجم المراكز وإدارة المخاطر.
مؤشر

Swing Portfolio Trim Dashboard v1.5**Swing Portfolio Trim Dashboard**
A technical portfolio-ranking tool designed for swing traders who typically hold positions for roughly **1–3 months** and need a systematic way to decide which holdings to trim, exit, hold, or continue riding.
The indicator is designed for portfolios containing many positions and focuses entirely on **price action, momentum, trend strength, volatility-adjusted performance, and technical deterioration** rather than fundamentals.
### Technical Score
Every holding receives a **0–100 Technical Score** based on:
* **10-day raw momentum — 5%**
* **20-day raw momentum — 10%**
* **50-day raw momentum — 15%**
* **10-day volatility-adjusted momentum — 2.5%**
* **20-day volatility-adjusted momentum — 7.5%**
* **50-day volatility-adjusted momentum — 15%**
* **10/20/50 EMA trend structure — 20%**
* **ATR-normalized trend health — 25%**
Raw momentum captures absolute leadership, while volatility-adjusted momentum helps normalize comparisons between securities with very different volatility profiles.
This is particularly useful when comparing ordinary stocks, ETFs, and higher-volatility instruments within the same portfolio.
### Portfolio Relative Ranking
Momentum components are converted into **cross-sectional percentile ranks relative to the other securities in the portfolio**.
A stock ranking highly therefore means it is technically stronger than most of the alternatives currently held.
**Tech#** represents this overall ranking:
* **#1 = strongest holding**
* Higher numbers = progressively weaker holdings
### Multi-Horizon Momentum
The model uses three time horizons:
* **10D** — short-term acceleration/deceleration
* **20D** — current swing momentum
* **50D** — broader swing trend
The shorter 10-day horizon receives less weight to reduce sensitivity to temporary price noise.
### Volatility Normalization
The dashboard uses realized volatility and ATR so that securities with very different volatility characteristics can be compared more fairly.
For example, a +10% move in a low-volatility ETF may represent much stronger risk-adjusted momentum than the same +10% move in a highly volatile leveraged product.
### Trend Score
Trend strength is evaluated using:
* Price above EMA10
* Price above EMA20
* Price above EMA50
* EMA10 above EMA20
* EMA20 above EMA50
* Rising EMA20
* Rising EMA50
A **Trend score of 100** represents a very strong and well-structured swing trend.
### ATR20
**ATR20** measures the stock's distance from its 20-day EMA in ATR units:
`(Price - EMA20) / ATR(14)`
Examples:
* **+2.0** = price is 2 ATR above EMA20
* **+0.2** = slightly above EMA20
* **-0.5** = modestly below EMA20
* **-1.0** = meaningful technical damage
* **-2.0** = severe deterioration relative to normal volatility
Using ATR allows the model to distinguish normal volatility from genuinely abnormal price deterioration.
### Score Deterioration
The dashboard tracks how Technical Score changes over time.
**Δ5**
`Current Score - Score 5 trading days ago`
**Δ10**
`Current Score - Score 10 trading days ago`
Negative values indicate deterioration.
For example:
`Δ5 = -12`
means the Technical Score has fallen 12 points during the last five trading sessions.
### RankΔ5
**RankΔ5** measures how the security's portfolio ranking changed during the last five sessions.
Negative values mean the stock is being overtaken by other holdings.
This can help distinguish between:
* a stock whose own technical condition is breaking down, and
* a stock that remains healthy but is losing relative leadership.
### Action Engine
Each security receives an Action classification:
**EXIT**
Severe technical weakness with confirmed longer-term trend damage.
**TRIM**
Weak portfolio ranking combined with confirmed EMA/ATR deterioration.
**TRIM WATCH**
A weak holding approaching or beginning a technical breakdown.
**DETERIORATING**
Momentum or relative ranking is deteriorating, but the underlying price trend has not yet broken enough to justify an automatic trim.
**HOLD**
Technical condition remains acceptable.
**RECOVERING**
A historically weak holding whose technical score is improving materially.
**LEADER**
A top-ranked holding with strong trend structure.
### Trim Priority
Technical Score and Trim Priority are deliberately separate.
**Technical Score** answers:
> How strong is this holding today?
**Trim Priority** answers:
> If I need to reduce positions, which holding deserves attention first?
Trim Priority combines:
* **65% current technical weakness**
* **25% 5-day score deterioration**
* **10% 10-day score deterioration**
However, the dashboard does **not** blindly rank positions by this number.
The Action Engine takes priority.
Sell-eligible states are considered first:
**EXIT → TRIM → TRIM WATCH**
Trim Priority then helps rank securities within those groups.
This prevents an improving laggard from being sold before a genuinely broken position.
### Trim# vs Tech#
The dashboard contains two different rankings:
**Tech#**
Ranks holdings from technically strongest to weakest.
**Trim#**
Ranks holdings according to which positions should be reviewed first when reducing exposure.
These numbers may differ substantially because Trim# also considers deterioration, trend damage, and recovery.
### SPY / QQQ Comparison
The Diagnostics view also displays relative 20-day performance versus:
* SPY
* QQQ
These values are informational and currently **do not affect the Technical Score**, allowing securities from different sectors and asset exposures to compete primarily on their own technical characteristics.
### Portfolio Management Use
The dashboard is designed to answer a practical question:
> If I own 30–40 positions and need to remove 3–4 names, where should I look first?
Rather than manually reviewing every chart, the trader can begin with the highest-ranked **EXIT / TRIM / TRIM WATCH** candidates and then examine the underlying technical evidence.
The indicator is calculated from **daily data** and is intended primarily for decisions made after the daily close rather than intraday trading.
The portfolio ticker list can be edited directly from the indicator settings, allowing holdings to be added or removed without rewriting the Pine Script.
**This indicator is a technical decision-support and portfolio-ranking tool. It is not financial advice and should not be used as a standalone trading or risk-management system.**
مؤشر

MFx Trend Vitality Engine V4Trend Vitality Engine V4
Trend Vitality Engine is a market-analysis indicator designed to describe the evolving condition of buyer and seller campaigns rather than generate entry, exit, top, bottom, or price-prediction signals.
The underlying concept is to treat an active directional move as a developing campaign. Instead of asking only whether price is moving up or down, TVE evaluates several characteristics of the buyer and seller sides and organizes them into an instrument-panel view of trend condition.
Core framework
TVE evaluates several related but distinct aspects of campaign health:
Vitality represents the overall aliveness and condition of the active buyer or seller campaign.
Structural Vitality represents the slower structural condition underlying that campaign.
Live Vitality represents its more immediate condition.
Power represents current applied directional pressure.
Efficiency / Transmission represents how effectively campaign energy is being converted into directional progress.
Durability represents recent structural resilience or accumulated wear.
Reserve / Fuel is a composite measure of usable campaign capacity derived from Power, Efficiency and Durability.
Dominance identifies which side currently holds greater control according to the TVE framework.
State and Phase describe the current internal condition of the buyer-versus-seller contest.
Lifecycle is a heuristic evidence-voting model that describes campaign evolution through stages such as expansion, maturity, distribution, fatigue, capitulation, repair, accumulation and emergence.
Market Health is a composite summary of underlying TVE measurements. It should not be interpreted as an additional independent confirmation signal.
Timeframe cascade
TVE evaluates market condition in the context of a higher-timeframe cascade . The dashboard displays the chart timeframe and the corresponding higher-timeframe context so that the current campaign can be interpreted within a broader market structure.
This allows the indicator to be used as an instrument panel rather than reducing market condition to a single directional reading.
What changed in V4
V4 preserves the established TVE architecture while correcting the live Durability mechanism.
In the previous version, lifetime accumulated damage could continue building across campaign history until the usable Durability range became saturated. This could cause Durability to remain at or near its lower boundary and reduce its ability to represent current structural wear.
V4 retains lifetime accumulated damage as historical diagnostic information but uses rolling live damage for the active Durability calculation. This allows current structural wear to increase during deterioration and recover as damaging evidence leaves the active measurement window.
Repaired Durability is then passed through the existing Reserve calculation and existing downstream TVE systems. The Reserve equation itself was not redesigned for this release.
Because Durability is once again an active input, users should expect some Reserve, Market Health, Lifecycle and related downstream readings to differ from the previous version.
Lifecycle interpretation
Lifecycle stages describe campaign evolution and should not be interpreted as direct forecasts of immediate price direction.
In particular, stages such as Bear Repair, Bear Accumulation and Bear Emergence describe developments occurring within, or emerging from, a bearish campaign context. The word "Bear" identifies the campaign context and does not necessarily mean that the indicator is forecasting an immediate price decline.
Lifecycle Evidence Score represents the strength of evidence supporting the selected lifecycle classification. It is not a calibrated probability or statistical confidence level.
How to use TVE
TVE is intended to be read as a collection of related gauges rather than as a single signal.
A user can begin with Dominance and the higher-timeframe context to understand which side currently controls the campaign. Vitality and Power describe campaign condition and applied pressure. Efficiency describes conversion quality. Durability and Reserve provide information about structural wear and usable capacity. Lifecycle provides context about campaign evolution, while Market Health summarizes the broader condition represented by the underlying gauges.
Divergence, decay, structural events and warning conditions provide additional context when the internal condition of a campaign begins to differ from its surface behavior.
The Command Center summarizes these measurements in plain-language descriptions while the detailed dashboard exposes the underlying buyer and seller measurements.
Alerts
V4 includes alert conditions for Trend Vitality Critical, Trend Vitality Rapid Decay, Critical Vitality plus Structural Event, Late Cycle Divergence, and Silent Damage Accumulating.
These alerts identify TVE conditions. They are not automated trade recommendations.
Research and limitations
TVE was developed as an experimental framework for observing trend health and buyer-versus-seller campaign behavior across multiple timeframes.
V4 follows a validation process that included comparison of internal measurements across multiple instruments and timeframes and investigation of the Durability mechanism. The V4 Durability change addresses an identified mechanical behavior in the previous implementation.
This validation should not be interpreted as evidence that TVE predicts future returns. Individual TVE measurements can overlap because several gauges intentionally summarize related aspects of the same underlying campaign.
TVE does not claim to predict market tops or bottoms, forecast future prices, identify guaranteed reversals, or provide statistically guaranteed entries or exits.
It is intended as an analytical instrument panel that helps users observe the evolving health, pressure, efficiency, wear, reserve, lifecycle and control of buyer and seller campaigns.
Version continuity
V4 is the current version of the Trend Vitality Engine. V3 remains the legacy version so existing charts and previous observations can be preserved and compared without silently changing the historical implementation. مؤشر

ADX/DI Profile & Volume Footprint🔶Overview
This script merges two powerful analytical frameworks—"Algorithmic ADX/DI Price Profile" and "High-Precision Volume Footprint"—into a single chart overlay. By moving Directional Movement data from the time axis (X-axis) to the price axis (Y-axis) and scanning lower timeframe (LTF) tick arrays, it accurately visualizes where trend energy is concentrated and how buyers and sellers interact at discrete price levels. This allows you to objectively verify market structure before committing capital.
🔶System Modules and Execution Flow
Volume Footprint Engine: Utilizes request.security_lower_tf() to scan up to 50 historical bars on a lower timeframe (down to 1-second for Premium users) to reconstruct intra-bar order flow. : Toggle between "Individual Bars" mode for per-candle footprints, and "Composite (N Bars)" mode to aggregate order flow over a specified range into a single comprehensive structure.
ADX/DI Profile Matrix: Computes standard 14-period DMI components, scalable via a Multi-Timeframe (MTF) engine. Generates fixed bounding boxes over historical sessions to project +DI, -DI, and ADX intensity as horizontal histograms. : Profiles are visually separated (Left, Right, Center aligned). A real-time heatmap shader shifts from "Cold" to "Hot" based on energy concentration, instantly identifying trend exhaustion or accumulation zones.
Local VWAP & Fibonacci Controller: Using the dynamically calculated profile range as an anchor, it draws a local Volume Weighted Average Price (VWAP) and customizable Fibonacci extensions, providing highly logical stop-loss and take-profit targets.
Analytical HUD (Default OFF): A fixed 50-column matrix table dynamically tracks Delta, Total Volume, Total Buy, and Total Sell orders, eliminating the need to manually decipher individual numbers inside the boxes.
🔶Configuration and Filtering Options
Resolution & Boundaries: Defines profile row counts (10 to 50 tiers; max 40 recommended for perfect stability, though this does not apply to line rendering) and width multipliers. When trading highly volatile assets like crypto or indices, reducing this to 30 thickens the price buckets and improves visibility.
Algorithmic Noise Filter: A critical threshold gate (0.0 to 1.0). Price tiers failing to meet this relative intensity ratio are visually muted. Increasing the default 0.08 to 0.15 (15%) mathematically erases low-impact price zones, leaving only institutional-level support/resistance clusters.
Volume Weight Toggle: An option to fuse volume data into DMI calculations. Prioritizes directional moves backed by real capital over empty price spikes.
Premium Seconds-Timeframe Guard: An automated downgrade protocol to ensure script stability. If a non-Premium plan is detected, it automatically converts 1-second (1S) requests to a 1-minute timeframe to prevent fatal array compilation errors.
🔶Trading Strategy and Practical Applications
"Wait & See" Filter (Avoiding Chop): The system's color shader acts as your first gate of discipline. If the ADX profile (center) shows "Cold" colors (e.g., dark orange/amber), it means trend energy is low. Do not trade; remain in a no-position state until the ADX blocks turn "Hot" (bright yellow), confirming massive algorithmic participation.
Absorption and Exhaustion Setups: Watch the Footprint engine boxes drawn over the candles closely. If a massive spike of aggressive buying (high positive delta, green text) occurs, yet the candle fails to break out and is immediately capped by a dense -DI profile block (right side, Hot Red), this is "Absorption." Buyers are trapped. Enter short right below this Point of Control (POC) with a tight stop-loss just above the profile box.
VWAP / Fibonacci Targeting: Once an entry is validated by Footprint delta, use the dynamically plotted VWAP as a baseline. For longs, target the upper Fibonacci bands (0.618 or 1.000). The beauty of this system is that these bands are derived strictly from the profiled session's "volume", reacting mathematically to the current market environment rather than arbitrary historical swings.
🔶Architecture and Quantitative Logic (Code Breakdown)
This script relies on multiple mathematical matrices to transform time-based indicators into price-based structures.
1. Footprint Volume Distribution (Tick Estimation)
ticks_1s = math.round((c_h - c_l) / syminfo.mintick) + 1
v_tick = c_v / ticks_1s
Why this calculation is performed: TradingView cannot provide sub-second Bid/Ask data. To measure aggressive market participation at specific price levels and objectively distinguish local buying absorption from selling pressure, the engine mathematically divides the lower timeframe bar's spread (High - Low) and distributes volume evenly across each tick to synthesize aggressive trading behavior.
Actual Output Value: A raw Float representing estimated volume at a single price tick. For example, if a 1-second volume (c_v) is 100 contracts and the spread covers 5 ticks, the output (v_tick) is exactly 20.0 per tick. Absolute volumes are formatted as strings (e.g., "1.5K") for the UI, while net delta is output to the HUD summary table as raw positive/negative floats.
2. DMI Profile Allocation and Normalization
net_di_ratio = math.abs(raw_p_plus - raw_p_minus) / (raw_p_plus + raw_p_minus)
p_plus = raw_p_plus * c_vol * (1 + net_di_ratio)
Why this calculation is performed: To pinpoint the exact price nodes where trend strength (ADX) and direction (+DI/-DI) physically occurred, filtering out empty volatility. Standard DMI ignores volume; this script multiplies DI intensity by trading volume (c_vol) and scales it via net_di_ratio to highlight zones where one side completely overwhelmed the other.
Actual Output Value: A large integer/float representing the local energy assigned to that price tier. If raw +DI is 30, raw -DI is 10, and volume is 1,000, the net_di_ratio is 20 / 40 = 0.5. The final p_plus output assigned to that tier is 30 * 1000 * 1.5 = 45,000 energy points.
3. Box Scaling and Noise Filter
ratio_plus = val_plus / max_plus
// If ratio_plus >= noise_filter, render the box
Why this calculation is performed: To eliminate market noise. max_plus is the Point of Control (POC)—the price tier with the absolute maximum energy. All other tiers are divided by this maximum to output a percentage (0.0 to 1.0). The noise filter (default 0.08, or 8%) culls tiers holding less than 8% of the POC's intensity.
Actual Output Value: A Float ratio between 0.0 and 1.0. A tier with 22,500 energy against a POC of 45,000 outputs 0.5. This 0.5 is passed directly to the f_get_heatmap_color function, outputting an RGBA hex color code that dynamically blends "Cold" and "Hot" variables based on intensity.
4. VWAP and Geometric Fibonacci Derivation
Why this calculation is performed: To establish a baseline fair value and logical standard deviation bands derived directly from the profiled session's volume distribution.
Actual Output Value: Exact absolute price coordinates (Y-axis floats). The Local VWAP is calculated by dividing the sum of (Typical Price * Volume) by Total Volume within the profile window. Fibonacci levels are output as the absolute distance from the VWAP to the session high/low multiplied by standard ratios (0.382, 0.618, 1.000). These are mapped as solid, dashed, or dotted lines across the X-axis bounds of the profile box.
🔶Capabilities and Limitations
Capabilities: Synthesizes massive LTF data arrays into clean, readable UI boxes without repainting. Modular layout prevents candlesticks from being obscured.
Limitations: TradingView imposes strict limits of 500 boxes, 500 lines, and 500 labels per script. On highly volatile assets with deep tick resolution, maximizing row_count or setting footprint lookbacks to 50 bars may cause older UI elements to clip (disappear) due to platform-level garbage collection constraints.
مؤشر

Index Peak Dispersion█ OVERVIEW
Index Peak Dispersion plots, in a separate pane, two normalized series computed across a configurable universe of up to twelve equity indexes: the calendar-day dispersion of their all-time-high dates, expressed as a percent of a topping window, and the share of indexes that printed a fresh all-time high within a short recent window. The thesis is that healthy advances register all-time highs across indexes nearly simultaneously, while major distributive tops fragment, spreading index peak dates across weeks or months.
█ HISTORY / BACKGROUND
The concept descends from the non-confirmation principle of Dow Theory as developed by Charles Dow, William Hamilton and Robert Rhea, in which a new high in one average unaccompanied by a new high in another warns that the trend is losing sponsorship. Classic non-confirmation is measured in the price domain: one index fails to exceed its prior peak while another does.
Market historians and technicians, including Robert Prechter, have documented a related phenomenon in the time domain: at major tops, the final all-time highs of the major indexes scatter across the calendar rather than clustering. At the 2000 top, the Dow Industrials peaked in January, the S&P 500 and NASDAQ Composite in March, and the NYSE Composite in September. At the 2007 top, the Dow Jones Composite peaked in July while the Dow Industrials and S&P 500 peaked in October. This script converts that qualitative observation into a mechanical, reproducible statistic.
█ HOW IT WORKS
The script performs the following steps on each bar:
• For each of up to twelve enabled symbols, one same-timeframe request.security() call evaluates a function inside the requested symbol's context. The function maintains a running maximum of closing prices over the symbol's loaded history and records the timestamp of the bar on which that maximum was last exceeded. This running maximum is point-in-time by construction: no future data enters the calculation, and lookahead is off.
• On the chart symbol, each recorded timestamp is converted to an age in calendar days: current bar time minus the all-time-high time, divided by the number of milliseconds in a day.
• Each enabled index with data is classified. An age at or below the fresh window makes it Fresh. An age at or below the topping window makes it part of the in-window set. An age beyond the topping window makes it Stale.
• When the in-window set contains at least the minimum required count of indexes, the dispersion span equals the maximum in-window age minus the minimum in-window age, in calendar days. The plotted dispersion value is that span divided by the topping window length, times 100. When the in-window count is below the minimum, the dispersion plot returns na.
• The participation value equals the count of Fresh indexes divided by the count of enabled indexes with data, times 100, plotted as columns.
• The fractured top condition is true when the dispersion value is at or above the warning threshold while at least one index is Fresh. The pane background is shaded on those bars, and an alert fires on the first bar of each new occurrence. A second alert fires when every enabled index with data is simultaneously Fresh, which marks a synchronized advance, the opposite condition.
• On the last bar, an optional table lists each index with its all-time-high date, age in days and classification, plus summary counts and the raw span in days.
█ HOW TO USE
The script is designed for the 1D timeframe. The running all-time high is intended to operate on daily closes, and both windows are specified in calendar days, so daily resolution matches the granularity of the logic.
In plain terms, the blue columns answer one question: how many of the enabled indexes hit a record high this week? The red line answers another: how spread out in time are everyone's record highs? In a strong market, the indexes peak together, so the columns are tall and the line stays low. At major tops, the market tends to fall apart in slow motion: one index peaks, then months later another, and by the time the last index prints its final record, several others stopped making records long ago. Each new high is carried by fewer indexes, so the columns thin out while the line climbs. The shaded background marks the combination of both: the market is still printing record highs, but the set of indexes confirming them has been shrinking for months. That is the structure documented at the 2000 and 2007 tops. The same combination also appears during rotation phases that resolve higher, so treat it as a statement that conditions resemble past major tops, not as an instruction to act.
Read the two plotted series together. Low dispersion with high participation describes a synchronized advance in which the enabled indexes are registering highs together. Rising dispersion while some indexes continue to print fresh highs describes fragmentation: leadership is narrowing and earlier leaders have stopped confirming. The shaded background marks bars on which the dispersion value is at or above the dashed threshold line while at least one fresh high exists, the specific combination in which fragmentation is present at a live high rather than in an established downtrend.
The table gives the attribution behind the numbers: which indexes are Fresh, which remain inside the topping window, and which have gone Stale, along with each all-time-high date. Stale entries are non-confirmations older than the topping window and are deliberately excluded from the span so that a single long-dormant index does not saturate the statistic.
The condition is a warning context, not a timing trigger. It identifies an environment consistent with historical distributive tops. It does not predict the date or the existence of a decline.
█ SETTINGS
• Index universe, twelve slots, each with an enable checkbox and a symbol field. Defaults: DJI, DJT, DJU, DJA, SPX, NDX, IXIC, NYA, RUT, SOX, MID, SPXEW. All twelve are enabled by default. Any slot can be repointed to another symbol or disabled.
• Fresh high window, calendar days. Default 7. An index whose all-time high printed within this many days counts as Fresh.
• Topping window, calendar days. Default 378. An index whose all-time high printed within this many days participates in the dispersion span. Older highs are classified Stale.
• Dispersion warning threshold, percent of topping window. Default 25. The dashed reference line and the threshold for the fractured top condition.
• Minimum in-window index count for a valid span. Default 4. Below this count the dispersion plot returns na, which prevents a span computed from too few indexes.
• Show status table. Default on.
• Table position. Default Top right.
█ WHAT MAKES IT ORIGINAL
Breadth and non-confirmation tools on this platform generally measure the price domain: divergences between an index and an internal line, counts of components above a moving average, or new-high and new-low tallies within one exchange universe. This script instead measures the time domain across whole indexes. It reduces the peak-date scatter of a user-defined index universe to a single bounded statistic, the in-window span of all-time-high ages, and pairs it with a participation series so that fragmentation is only flagged while a high is live. The classification into Fresh, in-window and Stale, with the Stale exclusion and the minimum-count validity gate, is what allows the scatter of a historical topping process to be plotted as one continuous, comparable series across eras.
█ NOTES / LIMITATIONS
• The running all-time high is computed only over the bars loaded for each requested symbol. Symbols with short available history, and the early portion of any chart, understate the true age of the all-time high. Treat the plot as reliable only after all enabled symbols have substantial loaded history.
• The logic is designed for the 1D timeframe. On intraday charts the running maximum operates on intraday closes and the calendar-day windows lose their intended granularity. On weekly or monthly charts a fresh window shorter than one bar cannot register.
• All request.security() calls run on the chart timeframe with lookahead off. Values on the developing bar update until the bar closes and do not repaint afterward.
• The script issues twelve security calls. A symbol slot that fails to resolve or returns no data is excluded from every count and appears in the table as No data.
• Ages and spans are measured in calendar days, not trading days, so weekends and holidays are included in the counts.
• The warning threshold is expressed as a percent of the topping window. Changing the topping window changes the day-equivalent of the same percent threshold.
• The dispersion plot returns na whenever fewer than the minimum required indexes have an all-time high inside the topping window.
• The status table renders on the last bar only. مؤشر

ATR PulseATR Pulse is an ATR-based trend and signal indicator designed to identify transitions around a dynamic volatility-adjusted trailing stop.
The script combines one core ATR transition engine with optional validation filters. These filters are not separate trading systems merged together; they act as configurable confirmation layers around the same underlying price-versus-trailing-stop event. This allows users to keep the indicator simple or make signal requirements more selective without changing the core concept.
**How it works**
The indicator calculates Average True Range over the selected ATR Period and multiplies it by the ATR Sensitivity setting.
This produces a dynamic loss distance:
ATR distance = ATR x Sensitivity
The trailing stop then adjusts according to the relationship between the current price, the previous price, and the previous trailing-stop value.
When price remains above the trailing stop, the stop follows upward without moving lower.
When price remains below the trailing stop, the stop follows downward without moving higher.
A directional transition is detected when price crosses the ATR trailing stop:
* A bullish signal requires price to cross above the trailing stop.
* A bearish signal requires price to cross below the trailing stop.
The indicator uses standard chart prices and does not request data from another symbol or timeframe.
**ATR Sensitivity**
ATR Sensitivity controls how closely the trailing stop follows price.
Lower values create a tighter stop that reacts to smaller price movements.
Higher values create a wider stop that requires a larger price movement before a directional transition occurs.
ATR Period controls the lookback used to calculate market volatility.
**Optional EMA trend filter**
When enabled:
* Bullish signals require price to be above the selected EMA.
* Bearish signals require price to be below the selected EMA.
The purpose of this filter is to restrict ATR transitions to the selected broader price direction.
**Optional ADX / DMI filter**
When enabled, the indicator requires both directional strength and directional agreement.
For bullish signals:
* ADX must be at or above the selected minimum.
* +DI must be greater than -DI.
For bearish signals:
* ADX must be at or above the selected minimum.
* -DI must be greater than +DI.
DI Length, ADX Smoothing, and Minimum ADX are independently adjustable.
**Optional RSI filter**
The RSI filter provides an additional directional condition.
When enabled:
* Bullish signals require RSI above the selected RSI Direction Level.
* Bearish signals require RSI below that level.
The default center level is 50, but both the RSI length and directional level can be changed.
**Optional volume filter**
When enabled, current volume must be at least the selected multiple of its moving average.
For example, a setting of 1.5 requires current volume to be at least 1.5 times the selected average-volume reference.
If usable volume data is not available for the symbol, the volume condition is bypassed rather than preventing all signals. Volume therefore should be interpreted according to the quality of volume data provided for the selected market.
**Optional candle-quality filter**
This filter evaluates the signal candle itself.
When enabled:
* A bullish signal requires a bullish candle.
* A bearish signal requires a bearish candle.
* The candle body must represent at least the selected percentage of the candle's full high-to-low range.
This can be used to exclude transition candles with relatively small bodies and large wicks.
**Signal cooldown**
The Minimum bars between signals setting can be used to reduce closely spaced signals.
A value of 0 disables the cooldown.
Higher values require the specified number of bars to pass before another signal can be accepted.
**Candle-close confirmation**
Confirm signals on candle close is enabled by default.
When enabled, Buy and Sell signals are accepted only after the current candle is confirmed closed.
When disabled, signal conditions can become true while the realtime candle is still developing. In that mode, a signal may appear or disappear before the candle closes as price changes.
**Visual controls**
The indicator can display:
* Buy and Sell labels.
* The ATR trailing stop.
* The trend EMA.
* A bullish or bearish background.
* An information dashboard.
Most supplementary visuals are optional so users can keep the chart clean and display only the elements relevant to their analysis.
The dashboard can show the current trend state together with ATR, ADX, RSI, sensitivity, and current filter readiness.
**Alerts**
Two alert conditions are included:
* ATR Pulse Buy
* ATR Pulse Sell
These alerts use the same final signal conditions as the chart labels, including any optional filters that the user has enabled.
Users should configure the indicator settings before creating an alert so the alert reflects the intended configuration.
**Pine Screener support**
ATR Pulse can also be used with TradingView's Pine Screener.
The script includes dedicated Buy and Sell alert conditions that can be used as screening filters, allowing users to scan a watchlist for symbols currently meeting the ATR Pulse bullish or bearish conditions.
This can be particularly useful when the same ATR Pulse settings need to be evaluated across multiple symbols instead of checking charts individually.
Pine Screener has its own platform limitations and calculation scope, so screening results should be interpreted within the data and timeframe processed by the Screener.
**Example workflow**
A user who wants the basic ATR transition behavior can leave all optional filters disabled.
A more selective configuration can enable one or more of the following:
* EMA trend alignment.
* ADX / DI directional strength.
* RSI direction.
* Volume expansion.
* Candle quality.
* Signal cooldown.
Each enabled filter becomes an additional requirement for the same underlying ATR transition signal.
There is no single recommended combination for every symbol or timeframe. Settings should be selected according to the market, timeframe, and type of analysis being performed.
**Repainting and realtime behavior**
ATR Pulse does not use future data or lookahead calculations.
With Confirm signals on candle close enabled, signal confirmation occurs only on closed candles.
The ATR trailing stop itself continues to update as new market data arrives.
If candle-close confirmation is disabled, conditions on the realtime candle can change before that candle closes. This is normal realtime behavior and should not be interpreted as a confirmed historical signal until the bar is complete.
Changing indicator settings, symbol, timeframe, or available chart history causes TradingView to recalculate the indicator.
**Limitations**
ATR Pulse is sensitive to volatility and parameter selection.
A tight ATR Sensitivity may produce more frequent transitions in sideways markets, while a wider setting can respond more slowly to directional changes.
Optional filters can reduce the number of signals, but they can also delay or exclude transitions that would otherwise qualify under the core ATR logic.
ADX, RSI, EMA, volume, and candle-quality conditions describe different aspects of current market behavior. Their inclusion does not guarantee that a subsequent price move will continue in the signal direction.
Signals are descriptive outputs of the selected rules, not forecasts of future price movement.
ATR Pulse is an indicator, not a strategy. It does not place orders, provide performance statistics, or claim a particular win rate. It is intended as a configurable technical-analysis and screening tool to help users identify and evaluate ATR-based directional transitions.
مؤشر

All-Markets Movement Extremes ToolA causal all-markets movement tool for identifying retained terminal PEAK/TROUGH extremes and exposing the earliest available confirmation of those extrema after the required price structure develops.
Name:
All-Markets Movement Extremes Tool
Searchable Name:
All-Markets Movement Extremes Tool
Technical Name:
All-Markets Non-Repainting Terminal-to-Causal Directional Movement Extremes Tool
Short title:
Movement Extremes
Summary
All-Markets Movement Extremes Tool identifies terminal peaks and troughs within developing directional movement and preserves the causal confirmation that makes each retained extreme available.
The central difficulty is that a completed extreme and the generated signal capable of establishing that extreme are not necessarily available at the same time.
A trough can already exist before enough upward structure has developed to confirm that the downward movement terminated there.
A peak can already exist before enough downward structure has developed to confirm that the upward movement terminated there.
Price can therefore move meaningfully away from the terminal before the corresponding confirmation becomes available.
The tool is built around that separation.
During an active directional leg, the current extreme remains provisional and can be replaced by a newer same-side high or low.
Once the required opposite structure confirms, the retained extreme becomes:
TROUGH for the completed low of the prior downward movement
PEAK for the completed high of the prior upward movement
The terminal marker remains attached to the retained movement extreme.
The causal confirmation remains attached to the later bar where that extreme became confirmable.
This keeps two important references visible at the same time:
where the directional movement terminated
and
where the corresponding confirmation became available
The confirmed PEAK/TROUGH stream can therefore provide context for directional-movement trading, filtering, confirmation, and broader trading decisions, while the stream itself represents confirmed movement extremes and their causal availability rather than a complete standalone buy/sell signal.
The result is a directional-movement tool that provides:
movement direction and transition context
terminal peak/trough identification
directional-movement trading context
confirmation and filtering context
entry/exit context
movement-cycle review
and comparison of completed movement with what became causally available
Terminal extremes
The script follows an active directional leg and retains its strongest extreme.
During an upward leg, the highest retained high remains the potential terminal PEAK.
During a downward leg, the lowest retained low remains the potential terminal TROUGH.
A newer same-side extreme can replace the previous candidate while that directional movement remains active.
The extreme becomes confirmed only after the required opposite structure develops.
This prevents a temporary move away from a high or low from automatically being treated as the completed terminal.
Causal confirmation
Every confirmed terminal has two important locations.
Terminal
The retained PEAK or TROUGH belonging to the completed directional movement.
Causal confirmation
The later confirmed-bar event where enough completed structure exists to establish that terminal.
The terminal shows where the completed movement ended.
The causal confirmation shows when the script could establish that terminal through its forward process.
Those two points can be close together or separated by several bars.
The optional Causal Confirmation Comparison makes that difference visible directly on the chart.
Earliest available confirmation
The tool attempts to expose a retained terminal on the first confirmed transition that satisfies its active structural requirements.
That does not move the historical terminal forward.
The PEAK or TROUGH remains attached to the completed movement extreme, while the causal marker remains attached to the later confirmation event.
This is what allows the tool to preserve both the final movement location and its actual causal availability.
Directional movement
The PEAK/TROUGH sequence forms a continuing directional structure.
A confirmed TROUGH establishes the completed low of the preceding downward movement.
A confirmed PEAK establishes the completed high of the preceding upward movement.
Consecutive opposite terminals describe the completed movement between retained extrema.
The tool can display those relationships with HOLD paths and directional backgrounds so the broader directional movement remains visible rather than reducing the chart to isolated labels.
Directional-movement trading context
The confirmed extremes and their causal transitions provide directional-movement context that can be examined alongside confirmation rules, filtering, entry/exit context, or other market-state methods.
The value of the output is the movement structure it establishes:
terminal extreme → causal confirmation → directional movement context
That structure remains available for broader trading-related evaluation without changing what the PEAK/TROUGH stream itself represents.
Movement cycles
Consecutive opposite confirmed extrema form completed directional cycles.
The tool keeps two reference systems available.
Terminal-to-terminal
The completed movement between retained extrema.
Confirmation-to-confirmation
The corresponding directional movement between the causal confirmation points.
These measurements can differ substantially because part of the terminal movement can occur before confirmation becomes available.
Last capture / confirm gap
The Movement Cycle page shows Last capture / confirm gap for the most recent completed cycle.
The capture value compares the latest completed terminal-to-terminal directional result with the corresponding confirmation-to-confirmation result when the terminal movement is positive.
The confirm gap shows the difference between those two completed-cycle results.
Together, they provide a compact comparison between the retained movement extremes and the corresponding causal confirmation references.
Unconfirmed context
Not every developing extreme becomes the retained terminal.
An earlier high can be superseded by a higher high.
An earlier low can be superseded by a lower low.
When enabled, the tool can expose this context separately from the confirmed PEAK/TROUGH sequence.
The optional Minimum Reversal Filter can also reject structural transitions that do not meet the selected movement requirement.
Current movement
For the latest confirmed extreme, the tool can compare:
terminal price
confirmation close
current price
terminal-to-confirm move
price change from confirmation to current
directional move from confirmation to current
best move after confirmation
and bars since confirmation
This provides a current directional reference after the extreme has been established.
Status pages
The tool includes four compact status pages:
Summary
Movement Cycle
Timing
Guide
Summary provides the broad state of confirmed extrema and completed movement cycles.
Movement Cycle focuses on the latest terminal, its confirmation, current movement, and the previous completed cycle.
Timing focuses on terminal-to-confirmation separation and structural timing.
Guide provides a compact interpretation of the active PEAK/TROUGH framework.
Alerts
Optional alerts are available for confirmed PEAK and TROUGH events.
The alert occurs when the causal confirmation becomes available.
The terminal remains attached to the retained movement extreme, while the alert reflects the later confirmation event.
This preserves the difference between terminal location and causal availability.
Features
all-markets directional movement framework
retained terminal PEAK identification
retained terminal TROUGH identification
causal confirmed-bar operation
terminal-versus-confirmation separation
Causal Confirmation Comparison
Confirmed Hold Path
Confirmed Hold Background
movement-cycle tracking
terminal-to-current directional movement
confirm-to-current directional movement
best move after confirm
Last capture / confirm gap
Unconfirmed Extreme Context
Minimum Reversal Filter
compact Summary, Movement Cycle, Timing, and Guide pages
confirmed PEAK/TROUGH alerts
Strengths
Terminal Extreme Preservation — the completed PEAK/TROUGH remains anchored to the retained movement endpoint.
Causal Availability — the corresponding confirmation remains separately visible where it actually became available.
Directional Context — the output describes continuing directional movement rather than isolated bar labels.
All-Markets Use — the framework can be applied across different markets because it is based on directional price structure.
Early Causal Exposure — the tool attempts to establish the retained terminal on the first qualifying confirmed transition.
Terminal-versus-Causal Comparison — completed movement and causally available movement remain directly comparable.
Broader Trading Context — the confirmed extrema provide directional, confirmation, filtering, and entry/exit context while retaining their underlying movement-extreme meaning.
Weaknesses
Confirmation Delay — the terminal can exist before enough opposite structure develops to confirm it.
Movement Before Confirmation — part of the next directional movement can occur before the causal confirmation becomes available.
Superseded Extremes — developing terminal candidates can be replaced by newer same-side extremes.
Standalone Trade Outcome Variability — confirmed PEAK/TROUGH extremes can remain structurally reliable movement references while the result of directly trading every confirmation as its own buy/sell action can vary substantially across market conditions.
Structural Dependence — confirmation timing depends on the selected structural requirements.
No Complete Trade Management — position sizing, risk management, stop placement, profit targets, and wider trade-management logic are separate from the movement-extreme output.
Who it’s for
This tool is suited for users interested in:
terminal market peaks and troughs
directional movement trading
movement-transition confirmation
structural filtering
entry/exit context
causal versus completed movement
terminal-to-terminal cycles
confirmation timing
Last capture / confirm gap
and incorporating confirmed extrema into broader trading methods
It is especially relevant when the question is not only:
“Where did the movement terminate?”
but also:
“When did that terminal become causally available?”
Known limitations
The final retained extreme cannot be confirmed until enough opposite structure has developed.
Some movement can therefore occur before confirmation.
Some developing terminal candidates can be superseded.
Some confirmation-to-confirmation cycles can be non-positive.
The distinction between the terminal and the causal confirmation is therefore explicitly preserved as part of the tool's output.
Final note
All-Markets Movement Extremes Tool identifies retained terminal PEAK/TROUGH extremes and exposes the causal confirmation of those extrema.
The terminal remains attached to the completed movement extreme.
The causal confirmation remains attached to the point where the required structure becomes available.
The relationship between those two references provides directional movement context for confirmation, filtering, cycle comparison, and broader trading-related evaluation. مؤشر

Edo Equal Highs/LowsEdo Equal Highs/Lows — Detects Equal Highs and Equal Lows as Resting Liquidity and Flags When Price Takes It
When two swing highs form at the same level, or two swing lows, they create one of the clearest forms of resting liquidity in price action. Traders place their stops just beyond a double top or double bottom, and breakout orders cluster there too — so that matched level becomes a pool of liquidity that price is frequently drawn to take. In the Smart Money Concepts approach these are equal highs (EQH), holding buy-side liquidity above price, and equal lows (EQL), holding sell-side liquidity below it.
Edo Equal Highs/Lows maps these levels automatically and tracks what happens to them. It marks each EQH and EQL when two swings match within an ATR-based tolerance, extends the level as resting liquidity, and flags the exact moment price closes through it and takes that liquidity — all validated on closed bars so the indicator does not repaint. It is the equal-levels specialist of the Edolab structure family, designed to work alongside liquidity sweep and liquidity zone analysis.
EQUAL HIGHS AND EQUAL LOWS
The indicator compares each new swing pivot with the previous one of the same type. When two consecutive swing highs sit at the same price within the tolerance, it draws an Equal Highs (EQH) level — buy-side liquidity resting above. When two swing lows match, it draws an Equal Lows (EQL) level — sell-side liquidity resting below. The level is drawn from the earlier matching pivot and labelled EQH or EQL, extending to the right as a live reference.
THE ATR TOLERANCE
What counts as "equal" is not a single tick but a configurable band. The Equal Tolerance input is expressed as a fraction of ATR (0.10 by default): two swings are treated as equal when their difference is within that fraction of the average true range. A lower value is stricter — only near-perfect matches qualify; a higher value is looser, catching approximate double tops and bottoms. Tying the tolerance to ATR keeps it adaptive across instruments and timeframes, so the same setting behaves consistently whether the chart is a low-volatility index or a fast-moving crypto.
SWING PROFILES
The swings compared for equality come from pivots whose sensitivity is set by the Swing Profile: Scalper (5 bars each side) for short-term levels on low timeframes, Swing (10 bars, the default) for the balanced 4H and daily read, and Long Term (21 bars) for the major levels on weekly and higher horizons.
ACTIVE AND TAKEN
Each equal level lives in one of two states, evaluated on every closed bar. Active: the level is intact, holding its resting liquidity, drawn as a solid coloured line extending to the right — red for EQH, teal for EQL by default. Taken: price has closed through the level and swept the liquidity — the line turns dashed and faded grey and the label gains a ✕. An EQH is taken when price closes above it; an EQL, when price closes below it. Only Active levels count in the panel, since a taken level has already done its job. To keep the chart clean, only the most recent levels per side are kept, up to Max EQ Levels per side (10 by default).
INFORMATION PANEL
The panel condenses the read into a compact table: the number of active EQH and active EQL levels, and the nearest unswept level on each side — the closest Equal Highs above the current price and the closest Equal Lows below it, with their exact prices. Those nearest levels are the most immediate liquidity targets above and below, the quickest way to see where price may be drawn next. The panel sits in any of the four chart corners (Top Right by default), comes in three sizes (Tiny / Small / Normal) and two themes (Dark / Light), and can be hidden entirely.
NO REPAINTING
Equal levels are built on confirmed pivots and their taken state is validated on closed bars, so a level never appears or disappears intrabar. A wick that pierces an equal level but closes back on the same side does not mark it as taken — the indicator waits for the close. There are no higher-timeframe functions: all logic runs on the current chart timeframe.
CONFIGURATION
The inputs are grouped by block. Detection sets the swing profile, the equal tolerance in ATR and the maximum number of levels kept per side. Style exposes the equal highs and equal lows colours, the taken colour, the label size and the Dark/Light theme. Panel controls panel visibility, position and size. The defaults are calibrated to work without adjustment on stocks, crypto, forex, indices and futures, on any timeframe — the inputs most users touch are the Swing Profile and the Equal Tolerance, to set how strict the matching should be.
ALERTS
Four predefined alerts cover the life of an equal level: Equal Highs formed and Equal Lows formed fire when a new EQH or EQL level is drawn; Equal Highs taken and Equal Lows taken fire when price closes through a level and sweeps its liquidity. The formed alerts flag fresh liquidity targets, and the taken alerts fire exactly when that liquidity is swept — often the trigger for a reaction. All alerts fire on bar close, consistent with the indicator's anti-repaint validation.
HOW TO READ IT
Equal highs and lows are liquidity targets, not entries: price is often drawn toward an EQH above or an EQL below to take the stops resting there, so the nearest levels in the panel point to where the move may head next. Watch the take: when price closes through an equal level and it turns Taken, the liquidity has been swept — that sweep frequently precedes a reaction, and classifying it as confirmed or faded turns the event into a fuller read. Trade levels in confluence: an EQL that sits on a demand zone or a higher-timeframe support is a stronger reference than an isolated one. And set inside broader liquidity zones, the equal levels mark precise liquidity pools, completing the liquidity map.
OPEN SOURCE
Edo Equal Highs/Lows is published as a free open source indicator. The full Pine Script is publicly accessible on TradingView for study, adaptation and integration into any workflow. Part of the Edolab Markets free tools ecosystem, with more structure, liquidity and order-flow indicators available on TradingView.
This indicator is a technical analysis tool for educational and informational purposes only. It does not generate automatic buy or sell signals and should not be considered financial advice. Trading financial markets involves significant risk of capital loss. Past performance does not guarantee future results. Always use proper risk management.
مؤشر

QuantLine Auction State EngineQuantLine Auction State Engine asks one question: what is price doing with the
edge of its prior range?
Many breakout tools mark the first trade above a rolling high or below a rolling
low. That does not distinguish a wick from acceptance, and the rolling level can
move while the event is still being judged. This script separates the process
into explicit states and locks the point-in-time range when a test begins.
States
- BAL — price remains in balance inside the prior range.
- CMP — balance with low ATR percentile: potential energy, no direction.
- T↑ / T↓ — price is testing beyond a locked range edge; acceptance is not yet confirmed.
- A↑ / A↓ — the required closes remain outside the edge and the move passes the selected efficiency and relative-volume checks.
- FA↑ / FA↓ — price returns inside after an attempted auction beyond the edge.
- RT↑ / RT↓ — the first retest holds on the accepted side of the locked edge.
How it is calculated
1. The reference range is the highest high and lowest low of prior bars. The
current bar is excluded.
2. When a close moves beyond an edge by the selected ATR distance, both edges
are locked. They cannot slide while the test is active.
3. Acceptance requires a user-selected number of closes beyond the locked edge.
4. Kaufman-style efficiency ratio separates directional travel from a noisy
path. Optional relative volume checks whether participation is above its
recent average.
5. ATR percentile identifies compression. It does not predict the direction of
the next expansion.
6. A return inside the edge marks a failed auction. After acceptance, the first
touch that closes on the accepted side marks a held retest.
State transitions and alerts occur on confirmed bars. No future bars are used,
and the active range is locked at the time of the test.
How to use it
The tool is a market-structure classifier. It can help a trader distinguish
between “price traded beyond a level” and “price was accepted beyond a level.”
It does not provide an entry, stop, target, position size, probability, or
profitability claim.
All defaults are round research hypotheses and are user-adjustable. Market
quality, fees, slippage and higher-timeframe context remain outside this script.
Educational context only. Not financial advice. مؤشر

Smart Money Structure & Dynamic Equilibrium Suite [ICT Pro]Smart Money Structure & Dynamic Equilibrium Suite
Overview & Purpose
Smart Money Structure & Dynamic Equilibrium Suite is an advanced, high-precision technical analysis visual tool engineered for Pine Script v6. Designed specifically for modern Price Action, Smart Money Concepts (SMC), and Inner Circle Trader (ICT) analysts, this script provides clean visual overlays for key liquidity boundaries, trend momentum, and range midpoints without cluttering chart aesthetics.
Instead of displaying unnecessary lines or repainting historical indicators, this suite focuses purely on real-time structural clarity, dynamic range evaluation, and institutional volume tracking.
Key Features & Technical Components
1. Auto-Swept Previous Day High & Low (PDH / PDL)
- Institutional Liquidity Levels: Automatically tracks and plots the Previous Day High (PDH) and Previous Day Low (PDL) as horizontal daily boundaries.
- Dynamic Disappear / Swept Logic: Once price crosses or sweeps a daily liquidity level during an active trading session, the swept level automatically vanishes from the chart. This ensures your view remains clean and focused only on active, unmitigated daily liquidity targets.
- Full Visual Customization: Adjust line colors, text colors, line thickness, and stroke style (Solid, Dashed, or Dotted) directly from the inputs menu.
2. Connected Dynamic Equilibrium Range
- 50% Midpoint Calculation: Continuously calculates the real-time 50% Equilibrium price zone based on customizable local swing lookback periods.
- Connected Line Extension: Features an extended horizontal line that connects seamlessly to the "EQUILIBRIUM" text label on the right margin, eliminating visual gaps or confusion about range boundaries.
3. Smart Volume Spike & Trend Candle Glow Engine
- Directional Candle Glow: Color-codes chart candles based on dual Moving Average alignments—Neon Green during bullish momentum and Neon Red during bearish momentum.
- Golden Volume Spike Highlighting: Dynamically overlays high-volume institutional candles in a distinct Glowing Gold color whenever current bar volume exceeds customizable moving average multipliers. This makes it effortless to spot institutional expansion bars.
4. Major Intermediate Term Swing Badges (ITH / ITL)
- Structural Pivot Badges: Automatically flags confirmed major high and low points using clear ITH (Intermediate Term High) and ITL (Intermediate Term Low) badges.
- Customizable Sensitivity: Adjust the pivot lookback sensitivity to tailor the detector for scalp, intraday, or higher-timeframe swing trading.
Full Inputs & Parameter Configuration Guide
1. Moving Average & Ribbon Controls
- Show MAs: Enables or disables the visibility of the two core Moving Averages on the chart.
- MA Type: Choose between EMA (Exponential), SMA (Simple), or WMA (Weighted) calculation methods.
- Fast MA Length: Defines the lookback period for the fast directional moving average (Default: 9).
- Slow MA Length: Defines the lookback period for the baseline moving average (Default: 21).
- MA Line Thickness: Adjusts stroke width for both moving averages (1 to 4 pixels).
- Show MA Ribbon Glow: Toggles the background color fill between the Fast and Slow MAs on or off.
2. Smart Candle Glow Settings
- Enable Trend Candle Coloring: Toggles custom candle coloring based on MA trend direction.
- Highlight Volume Spikes: Turns on or off the special Golden Candle overlay for high-volume bars.
- Volume Spike Threshold: Set the volume multiplier relative to the 20-period volume average (Default: 1.8x).
3. Equilibrium Settings
- Show Equilibrium Level: Turns the 50% range midpoint line on or off.
- Equilibrium Lookback Period: Sets the number of historical bars evaluated to compute the local range midpoint.
- Line Style & Thickness: Customize whether the line appears Solid, Dashed, or Dotted, as well as its thickness and color.
4. Daily Liquidity Settings (PDH / PDL)
- Show PDH & PDL: Toggles display of Previous Day High and Low levels.
- PDH/PDL Line Style & Thickness: Select custom visual preferences for daily boundaries.
- Color Pickers: Separate line and text color options for both High and Low daily levels.
Step-by-Step Guide: How to Use This Tool Effectively
Step 1: Determine Structural Bias
Use the Trend Ribbon Cloud and candle coloring to establish current market bias. Green candles and ribbons indicate bullish control, while Red candles signify bearish dominance.
Step 2: Monitor Daily Liquidity Targets
Observe active PDH and PDL lines as primary liquidity pools. When a line disappears from your chart, it confirms that liquidity at that level has been swept by price.
Step 3: Evaluate Value Zones
Refer to the Equilibrium step-line to determine whether current price trades above 50% (Premium territory) or below 50% (Discount territory) relative to recent market swings.
Step 4: Identify Institutional Volume Expansion
Pay close attention to Glowing Gold candles. Volume spikes often coincide with smart money entries, order block mitigations, or explosive range breakouts.
Trading Disclaimer & Risk Warning (House Rules Compliance)
Educational Disclaimer:
This script is strictly a visual analysis and charting utility designed for technical educational purposes. It does NOT offer financial advice, trade signals, investment recommendations, or automated buy/sell algorithms.
Risk Acknowledgment:
Financial trading carries inherent risk, and historical market behavior depicted by visual indicators does not guarantee future results. Users are fully responsible for their own trading decisions and risk management strategies. مؤشر

FRFFlat Range Finder (FRF)
FRF is a high-performance analysis tool developed to detect consolidation (sideways movement) zones in the market.
About FRF Drawing
Purpose and Usage:
The primary purpose of the FRF drawing is to objectively identify zones where the price is compressed within a channel without forming a significant trend over a certain period. This channel allows you to visualize the "uncertain" or "rest" phase of the market.
Update Mechanism:
The FRF drawing periodically scans within the "Min FRF Search Length" and "MAX FRF Search Length" range defined by the system. At each new bar close, the most appropriate channel length is recalculated using the "Channel Fixed R" coefficient. If a stronger consolidation structure forms in the current data, the channel automatically updates itself to adapt to this new data.
Fibonacci & Risk/Reward Box
This feature helps you determine entry, target, and stop-loss levels by using the boundaries of the detected channel.
Why and How to Use It?
Why: In moments of market uncertainty, it provides a disciplined Risk/Reward management based on the channel's own internal dynamics (statistical deviations) rather than arbitrary levels.
How: Activate the box by selecting "Long" or "Short" from the "Position Mode" setting. The box uses the 0.236 Fibonacci ratio as the entry level. The badges on the box dynamically display the current Open P&L status and the Risk/Reward Ratio at the end of the channel.
⚠️ WARNING: THE FIBONACCI & RISK BOX IS AUTOMATICALLY RECALCULATED UPON EVERY NEW CHANNEL DETECTION OR CHANGE IN PRICE DATA. PREVIOUS BOXES AND LABELS ARE DELETED AND REDRAWN ACCORDING TO THE MOST CURRENT CHANNEL DATA. TO AVOID LOSING YOUR PREVIOUS TRADE ANALYSES, ENSURE YOU ARE TRACKING THE LATEST BOX DATA.
Technical Specifications of the Indicator
FRF is equipped with the following capabilities within the classic TradingView library:
MTF (Multi-Timeframe) Support: The indicator can process data from a different timeframe regardless of the current timeframe. You can select your desired TF by activating the Enable MTF option.
Dynamic Channel Fixed R Analysis: This is a statistical metric used to determine the strength of the consolidation. You can optimize how "flat" the channel should be using the Target Threshold <= this setting.
Breakout Alerts: When the upper or lower boundaries of the channel are broken by the body of a candle, the indicator triggers the alert() function to send you a notification.
Advanced Visualizations:
Debug Table: You can view the statistical data of the channel in real-time in the corner of your screen.
Channel Customization: You can fully adjust the channel line style, transparency, and fill colors according to your personal chart preferences.
Midline: You can display the middle baseline within the channel, allowing you to distinguish more clearly which half of the channel the price is dominant in.
Debugging: You can toggle the labels on the bars to understand the indicator's operational logic by using the Show Debug Label option.
This indicator is not a prediction tool, but a data-driven channel detection engine. مؤشر

DUAL Relative Strength Index (Settings: 14 14 28)RSI with Dual Smoothing MA
A modified version of TradingView's built-in RSI indicator with a second RSI-based moving average added.
The standard RSI includes a single smoothing MA. This version adds a second, fully independent one — so you can run a fast MA alongside a slow MA and compare the RSI's short-term movement against its longer-term trend in the same pane.
Features
Two separate RSI-based MAs, each with its own type and length (SMA, EMA, SMMA/RMA, WMA, VWMA)
Independent color selection for each line
Either MA can be switched off entirely by setting its type to "None"
Optional Bollinger Bands on the first MA (as in the original)
Regular bullish/bearish divergence detection and alerts (as in the original)
Settings
RSI Settings: RSI length, source, divergence calculation
Smoothing: first MA — defaults to 14 SMA, yellow
Smoothing 2: second MA — defaults to 28 SMA, orange
Ways to use it
The fast MA crossing above the slow MA can be read as strengthening momentum; crossing below, as weakening
Both MAs sitting on the same side of the 50 level can serve as directional confirmation
The distance between the two lines gives a sense of how quickly momentum is shifting
This indicator does not generate standalone buy or sell signals. It is intended as a confirmation tool within your own system, and settings should be tested against the symbol and timeframe you trade.
Based on TradingView's open-source built-in "Relative Strength Index" indicator.
İngilizce:
Ways to use it
The fast MA crossing above the slow MA can be read as strengthening momentum; crossing below, as weakening
Crossovers that occur in the extreme zones (below 30 / above 70) tend to be more meaningful than those in the middle range (roughly 40–60), where the RSI often moves sideways and the MAs cross back and forth, producing noise
Both MAs sitting on the same side of the 50 level can serve as directional confirmation
The distance between the two lines gives a sense of how quickly momentum is shifting مؤشر

مؤشر

Professional Volume Delta & CVD SuiteEnglish Version
Professional Volume Delta & CVD Suite
Professional Volume Delta & CVD Suite is an all-in-one order flow and volume analysis indicator engineered to deliver institutional-grade market context across any timeframe. By combining Intrabar Volume Delta estimation, Cumulative Volume Delta (CVD), Order Flow Divergences, Volume Climax detection, and a dynamic Real-Time Data Table, this script condenses multiple advanced trading tools into a single, clean workspace.
Key Features & Internal Mechanics
Dual Volume Delta Calculation Engine:
Wick-Based Estimation (Recommended): Evaluates intrabar price action by analyzing high, low, and close prices (volume * (close - low) / (high - low)) to accurately distribute buying and selling volume within each candle.
Color-Based Alternative: Calculates net volume based strictly on candle close vs. open.
Automated Multi-Timeframe Adaptation (Auto-Adjust):
Intraday Mode (1m - 1H): Calculates a Session CVD that resets to 0 at the start of each trading day (00:00 UTC), ideal for tracking day-trading order flow absorption. Divergence lookback is set to 5 bars, Volume MA to 20 periods, and Climax Multiplier to 2.0x.
Daily & Weekly Mode (1D, 1W, 1M): Automatically switches to a Continuous Accumulated CVD (no daily reset) to track multi-week accumulation/distribution cycles. Sets the volume Moving Average to 21 periods (1 trading month) and divergence lookback to 10 bars for high-conviction swing signals.
In-Bar Buyer/Seller Percentage Labels:
Plots exact percentages of buying (%C) and selling (%V) pressure on each individual volume bar.
Fully customizable display: show both percentages, only the winning side, adjust font sizes, toggle % symbols, and control vertical offset distance.
Algorithmic Price vs. Delta Divergence Detection:
Bullish Divergence (Green Arrow): Triggers below the volume histogram when price marks a lower low but Volume Delta forms a higher low (indicates institutional supply absorption).
Bearish Divergence (Red Arrow): Triggers above the volume histogram when price marks a higher high but Volume Delta forms a lower high (indicates demand exhaustion/distribution).
Volume Climax & Trend Filters:
Volume Moving Average (MA): Smoothed volume baseline (default 21 periods for daily charts).
Volume Climax Highlights: Highlights exceptional volume spikes in bright gold when total volume exceeds the moving average by the configured multiplier (e.g., 1.8x or 2.0x), signaling heavy institutional positioning or potential exhaustion.
Dynamic Real-Time Information Table:
Candle Status: Live indicator (Bullish 🟢 / Bearish 🔴).
% Buyer / % Seller: Exact percentage breakdown for the current open candle.
Candle Delta: Net delta percentage of the active bar.
Session CVD / Accumulated CVD: Shows continuous capital flow adapted to the current timeframe.
Volume Activity: Displays current volume activity relative to the MA percentage or alerts CLIMAX ⚡.
Inputs & Customization Settings
Timeframe Configuration: Toggle auto-adaptation or manually enforce Intraday / Daily modes.
Calculations & Display: Choose calculation methods, toggle label modes, change text sizes, and adjust label offsets.
Divergences & MA Filters: Customize MA period, divergence lookback window (bars), and climax thresholds.
Table & Aesthetics: Full control over UI table placement (9 anchor points), table size, row visibility, and custom color palettes for buyers, sellers, climax bars, and divergence shapes.
Versión en Español
Professional Volume Delta & CVD Suite
Professional Volume Delta & CVD Suite es un indicador de análisis de flujo de órdenes (order flow) y volumen todo-en-uno, diseñado para proporcionar contexto de nivel institucional en cualquier marco temporal. Al combinar la estimación de Delta por vela, el Delta Acumulado (CVD), Divergencias de Order Flow, detección de Clímax de Volumen y una Tabla de Datos en Tiempo Real, este script sintetiza múltiples herramientas avanzadas en un único panel limpio y eficiente.
Características Principales y Mecánica Interna
Motor Doble de Cálculo de Volumen Delta:
Estimación por Mechas (Recomendado): Evalúa la acción del precio dentro de la vela analizando máximos, mínimos y cierres (volumen * (cierre - mínimo) / (máximo - mínimo)) para distribuir de manera precisa el volumen comprador y vendedor.
Alternativa por Color de Vela: Calcula el volumen neto basándose estrictamente en el cierre vs. la apertura.
Adaptación Automática según Temporalidad (Auto-Adjust):
Modo Intradía (1m - 1H): Calcula un CVD de Sesión que se reinicia a 0 al inicio de cada jornada (00:00 UTC), ideal para medir la absorción en el day trading. Configura la evaluación de divergencias en 5 velas, la Media Móvil en 20 períodos y el Clímax en 2.0x.
Modo Diario y Semanal (1D, 1W, 1M): Cambia automáticamente a un CVD Acumulado Continuo (sin reseteo diario) para medir ciclos de acumulación y distribución de mediano/largo plazo. Ajusta la Media Móvil de volumen a 21 ruedas (1 mes bursátil) y la evaluación de divergencias a 10 velas para señales swing de alta probabilidad.
Etiquetas de Porcentaje Comprador/Vendedor en Barras:
Muestra en tiempo real los porcentajes exactos de presión compradora (%C) y vendedora (%V) sobre cada barra de volumen.
Personalización visual total: muestra ambos porcentajes, solo el lado ganador, ajusta el tamaño de texto, activa/desactiva el símbolo % y modifica la distancia vertical.
Detección Algorítmica de Divergencias (Precio vs. Delta):
Divergencia Alcista (Flecha Verde): Salta debajo del histograma cuando el precio hace un mínimo más bajo pero el Delta de Volumen hace un mínimo más alto (señal de absorción de oferta institucional).
Divergencia Bajista (Flecha Roja): Salta arriba del histograma cuando el precio marca un máximo más alto pero el Delta de Volumen marca un máximo más bajo (señal de agotamiento de demanda o distribución).
Clímax de Volumen y Filtros de Tendencia:
Media Móvil de Volumen (MA): Línea base del volumen promedio (fijada en 21 ruedas para gráficos diarios).
Resaltado de Clímax: Pinta las barras en color dorado brillante cuando el volumen total supera drásticamente la media móvil según el multiplicador configurado (1.8x o 2.0x), alertando sobre volumen institucional masivo o posible agotamiento.
Tabla Informativa Dinámica en Tiempo Real:
Estado Vela: Indicador en vivo del sesgo actual (ALCISTA 🟢 / BAJISTA 🔴).
% Comprador / % Vendedor: Desglose porcentual exacto de la vela en formación.
Delta Vela: Porcentaje de delta neto de la barra activa.
CVD Sesión / CVD Acumulado: Flujo continuo de dinero adaptado dinámicamente según la temporalidad del gráfico.
Actividad Vol.: Muestra la actividad de volumen respecto a la Media Móvil o la alerta de CLÍMAX ⚡.
Parámetros y Opciones de Configuración
Configuración de Temporalidad: Activa/desactiva la autoconfiguración o fuerza manualmente los modos Intradía o Diario/Semanal.
Cálculos y Visualización: Elección del método de cálculo, formatos de etiqueta, tamaños de texto y distancias en el gráfico.
Divergencias y Filtros de MA: Ajuste de períodos de Media Móvil, rango de velas para divergencias (lookback) y umbrales de clímax.
Estética de la Tabla: Control total sobre la posición de la tabla (9 anclajes), tamaño de celda, visibilidad de filas y paletas de colores totalmente personalizables (compradores, vendedores, clímax y flechas de divergencia).
مؤشر

VWAP Regime AI [AxeAlgo]OVERVIEW
VWAP Regime AI is an anchored VWAP (Volume-Weighted Average Price) with
standard-deviation bands, enhanced by a native, from-scratch k-means
clustering engine that classifies recent market volatility into three
regimes — Low, Medium, and High — and adapts the indicator's behavior
based on which regime is currently active.
At its foundation this is the same tool institutional desks use every
day: a running volume-weighted average price with bands around it, used
to judge where "fair value" sits and how far price has stretched away
from it. What this script adds on top is a genuine unsupervised machine
learning step that reads the market's own volatility and lets that
reading drive three things: how wide the bands are, which signal logic
is active, and how much the indicator should trust its own regime call
before acting on it.
This script is free and open-source. All calculations happen natively in
Pine Script on your own chart data.
============================================================
FULL TRANSPARENCY ABOUT THE "AI" IN THIS SCRIPT
============================================================
Pine Script cannot call an LLM, a remote model, or any external AI
service — TradingView does not allow outbound network requests from
indicators, and this script makes none. There is no hidden API call,
no "black box," and nothing running outside of what you can read in the
source code.
What "AI" means here specifically: this script implements k-means
clustering — a well-established unsupervised machine learning algorithm
— entirely in native Pine Script math and arrays. It groups a rolling
window of recent ATR (volatility) readings into three clusters by
repeatedly assigning each reading to its nearest cluster center and then
recomputing each center as the mean of everything assigned to it. This
publication states plainly what is and is not happening so nobody
mistakes this for predictive AI, sentiment analysis, or anything that
consults external data or forecasts the future. It classifies what has
already happened; it does not predict what will happen next.
============================================================
HOW IT WORKS
============================================================
VWAP & Standard Deviation Bands
--------------------------------
The core VWAP resets at the start of each new anchor period (Session,
Week, Month, Quarter, or Year — configurable) and accumulates a running
volume-weighted average from there. Standard deviation is calculated
using the same volume-weighted variance formula TradingView's own
built-in VWAP-with-bands tool. Up to three bands can be shown,
each set at a configurable standard-deviation distance from VWAP.
AI Volatility Clustering (K-Means)
------------------------------------
A rolling window of recent ATR readings (length and window size are both
configurable) is periodically re-clustered into three groups — Low,
Medium, High — using k-means. Reclustering happens every N bars rather
than every single bar, purely for performance; the live classification
of the current bar still updates continuously between reclusters.
Alongside the classification, the script computes a Confidence score
(0-100%): how much closer the current reading sits to its nearest
cluster than to its second-nearest one. A reading sitting right on a
cluster's center scores near 100%; a reading sitting on the boundary
between two regimes — an effectively ambiguous call — scores near 0%.
A "Minimum Regime Confidence" input lets you require a minimum score
before the regime is allowed to influence anything else in the script,
so an unconfident, boundary-line classification doesn't silently drive
behavior.
Adaptive Band Width
----------------------
When enabled, the standard-deviation band multipliers are scaled by a
per-regime factor: tighter in Low volatility, wider in High volatility,
instead of one fixed multiplier that's too tight in some conditions and
too loose in others. This only engages once the AI is both ready
(its lookback window has filled and it has run at least once) and
confident, per the Minimum Regime Confidence setting above.
Signal Logic — Mean Reversion, Breakout, or Auto
----------------------------------------------------
Two independent signal styles are built in, both measured off Band 2:
Mean Reversion looks for price crossing back inside the band from
outside (betting an extreme move snaps back toward VWAP); Breakout looks
for price crossing outside the band (betting the move has momentum to
keep running). "Auto" mode lets the detected volatility regime decide
which logic applies bar by bar — Low/Medium volatility defaults to Mean
Reversion, High volatility defaults to Breakout — falling back to Mean
Reversion whenever the AI isn't ready or confident enough to trust.
Three independent, stackable filters reduce noise on top of the raw
band cross:
- Bar-Close Confirmation: a cross only counts once the bar has fully
closed, filtering out intrabar wicks that reverse before the close.
- Signal Cooldown: blocks a new signal, in either direction, for a
configurable number of bars after the last one — aimed directly at
whipsaw (price crossing back and forth across a band repeatedly).
- Band Cross Buffer (hysteresis): requires price to clear a band by a
small extra distance, in standard deviations, rather than an exact
touch, so noise sitting right on the line doesn't keep re-triggering
crosses back and forth.
AI Volume Confirmation Filter
---------------------------------
The same k-means engine used for volatility is optionally reused on raw
volume, classifying each bar's volume as Low, Normal, or High. When
enabled, signals are only allowed on Normal-or-above volume, filtering
out low-conviction moves.
Secondary VWAP
-----------------
An optional second VWAP anchored to a different (typically higher)
period can be plotted alongside the primary one — for example a Weekly
VWAP behind a Session VWAP — for confluence, since multiple VWAP anchors
are commonly watched together rather than trusting a single one in
isolation. It is a reference line only; no bands are drawn for it.
Signal Track Record
-----------------------
An on-chart scorecard tracks, in a simple and fully model-free way, how
the signals have actually performed: each signal opens a virtual
position at that bar's close, and the next opposite-direction signal
closes it out, scored as a win or a loss purely on which way price
moved in between. No target or stop-loss assumption is built into this
score — see the Limitations section below for exactly what this number
does and does not tell you.
Status Table
---------------
An optional on-chart table shows the current regime and its confidence,
the active band scale, the current VWAP value, a "Stretch Score" (see
below), and the Signal Track Record numbers, all in one place.
Stretch Score
----------------
A signed z-score of how many standard deviations price currently sits
from VWAP. Because it's measured in the same standard deviations the
bands are drawn in, it stays consistent with whatever the adaptive band
width currently has in effect — a reading of +2.00 always means "sitting
on Band 2," whether that band is currently tight or wide.
============================================================
HOW TO USE THIS INDICATOR
============================================================
1. Start with the default settings and watch the status table for a
while before changing anything. Let the AI Volatility Clustering
lookback window fill (the table will show "Calibrating..." until it
has enough data) so the regime classification is meaningful.
2. Decide whether you want Mean Reversion, Breakout, or Auto signal
logic. Auto is a reasonable starting point since it adapts to
detected conditions automatically.
3. Watch the Confidence score alongside the regime label. If confidence
is frequently low on your instrument/timeframe, consider raising the
Minimum Regime Confidence input so the indicator falls back to
neutral behavior more readily instead of acting on ambiguous calls.
4. Use the Stretch Score to judge how extended price currently is
relative to VWAP in a way that stays consistent even as band width
adapts.
5. Treat the Signal Track Record as a rough, ongoing sanity check on
signal quality — not a backtest and not a promise (see Limitations).
6. This is a visual/analytical tool, not an auto-trading system. It
does not place trades. Any alerts it can generate are notifications
only.
============================================================
INPUT GROUPS (SUMMARY)
============================================================
VWAP Settings
- Anchor Period (Session / Week / Month / Quarter / Year)
- Source price used for the VWAP calculation
Secondary VWAP (Confluence)
- Show/hide toggle, its own anchor period, and its own color
Standard Deviation Bands
- Independent show/hide and distance (in standard deviations) for
three bands, plus a toggle for the gradient fill shading around them
AI Volatility Clustering (K-Means)
- Enable/disable the clustering engine
- ATR length used as the raw volatility reading that gets clustered
- Clustering lookback window (bars) and reclustering frequency
- Number of k-means refinement iterations per reclustering
- Adaptive band width toggle and the three per-regime scale factors
- Minimum Regime Confidence threshold
Signals
- Show/hide signal markers
- Signal Mode (Mean Reversion / Breakout / Auto)
- Volume confirmation filter toggle
- Bar-close confirmation toggle
- Signal cooldown (bars)
- Band cross buffer (hysteresis, in standard deviations)
Visuals
- Regime background highlight toggle
- Status table toggle and Signal Track Record toggle
- Colors for VWAP, each band, each regime, and each signal direction
============================================================
REPAINTING & REAL-TIME BEHAVIOR
============================================================
This script does not use any higher-timeframe security() calls and does
not look ahead — every value at every historical bar is a function of
data available up to and including that bar. Once a historical bar is
confirmed, its VWAP, bands, regime classification, and signals do not
change on subsequent chart loads or reloads.
Like any real-time indicator, values on the currently forming (unclosed)
bar update as new price/volume ticks arrive, and will settle once that
bar closes — this is standard behavior for any live indicator, not
repainting of historical data. If you want signal markers to appear only
after a bar has fully closed rather than updating intrabar, keep the
"Require Bar Close Confirmation" input enabled (it is on by default).
============================================================
LIMITATIONS — PLEASE READ
============================================================
- The Signal Track Record is a simplified, model-free heuristic, not a
backtest. It ignores commissions, spread, slippage, position sizing,
and any stop-loss/take-profit logic, and it scores a "trade" purely by
whether price was above or below the entry price when the next
opposite signal fired. It exists to give a rough, ongoing sense of
signal direction quality — it is not a performance guarantee and
should not be relied on as one.
- K-means clustering, like any clustering method, can produce a
misleadingly high confidence score if recent volatility (or volume)
readings happen to be nearly constant for an extended window — a rare
condition, more likely on thinly-traded instruments, but worth being
aware of.
- Regime classification and adaptive behavior depend on the Clustering
Lookback window filling with data first; expect "Calibrating..." on a
freshly loaded chart or a short history until then.
- This is a discretionary analysis tool intended to support your own
judgment, not a mechanical, guaranteed-signal system. No combination
of settings eliminates false signals entirely, which is why several
independent, adjustable filters (bar-close confirmation, cooldown,
hysteresis buffer, volume confirmation, regime confidence threshold)
are provided rather than relied on individually.
============================================================
RISK DISCLAIMER
============================================================
This script is provided for educational and informational purposes
only. It is not financial advice, and it is not a recommendation to buy
or sell any security or instrument. Trading and investing involve
substantial risk of loss and are not suitable for every investor. Past
performance — whether real, simulated, or shown via the on-chart Signal
Track Record — is not indicative of future results. Always do your own
research and consider consulting a licensed financial advisor before
making trading decisions. Use this indicator, and any alerts it
generates, entirely at your own risk. مؤشر

EMA Reversal Squeeze K8EEMA Reversal Squeeze K8E
The EMA Reversal Squeeze K8E is designed to identify potential momentum reversals by detecting a specific sequence of EMA compression and directional flipping.
Works on lower time frames only
The indicator monitors the 9 EMA, 20 EMA, and 50 EMA internally and looks for situations where the three averages come tightly together before reversing their order.
How LONG signals work
A LONG setup begins when:
EMA 9 < EMA 20 < EMA 50
All three EMAs are within 1 point of each other
The EMAs compress further to within 0.5 points
The EMA structure then flips to EMA 9 > EMA 20 > EMA 50
The final flip occurs while the EMAs remain within 1 point
The indicator then prints a LONG signal on the first qualifying candle.
How SHORT signals work
A SHORT setup is the exact opposite:
EMA 9 > EMA 20 > EMA 50
All three EMAs are within 1 point
The EMAs compress to within 0.5 points
The EMA structure flips to EMA 9 < EMA 20 < EMA 50
The final flip occurs while the EMAs remain within 1 point
The indicator then prints a SHORT signal on the first qualifying candle.
Why the squeeze matters
The idea behind the setup is that when the 9, 20, and 50 EMAs become extremely compressed, the market is showing a period of reduced separation between short-, medium-, and longer-term momentum.
When that compression is followed by a complete EMA order reversal, it can indicate that momentum is transitioning to the opposite direction.
The EMA lines are intentionally hidden from the chart so the indicator provides clean LONG and SHORT signals without clutter.
Note: This indicator is a technical analysis tool and should not be considered financial advice. Signals should be evaluated alongside price action, market structure, volatility, session levels, and your own risk-management rules. مؤشر

BearScope Pattern RadarBearScope - Bearish Pattern Scanner
OVERVIEW
BearScope is a bearish chart-pattern research indicator that identifies five commonly followed bearish formations on the current symbol and timeframe.
The indicator displays pattern-shaped outlines directly over the price chart and provides a separate lower panel showing when each formation was identified throughout the available chart history.
PATTERNS IDENTIFIED
• Classic Bear Flag
• Descending Triangle
• Rising Wedge
• Double Top
• Inverse Cup and Handle
HOW IT WORKS
Classic Bear Flag
BearScope searches for a strong downward flagpole followed by a controlled, upward-sloping consolidation channel. The upper and lower channel slopes must be reasonably parallel, and the consolidation must remain within the selected maximum retracement.
Descending Triangle
The indicator looks for approximately horizontal support combined with descending resistance and repeated tests near the support area. The pattern is identified when price confirms a downside breakdown beneath the fitted support line.
Rising Wedge
BearScope searches for rising upper and lower boundaries that converge as the pattern develops. The lower boundary must rise faster than the upper boundary, creating a narrowing structure. Identification requires a confirmed downside breakdown.
Double Top
Two confirmed pivot highs must occur within the selected price tolerance and bar-separation limits. A meaningful decline must appear between the two tops.
Because pivot highs require subsequent candles for confirmation, a Double Top is recognized only after the selected pivot-strength period has elapsed.
Inverse Cup and Handle
The indicator searches for two similar lower rim areas separated by a rounded price advance, followed by a smaller upward handle. Identification requires price to break below the rim area.
CHART DISPLAY
Pattern-shaped outlines are drawn directly on the main price chart:
• Red — Classic Bear Flag
• Yellow — Descending Triangle
• Orange — Rising Wedge
• Purple — Double Top
• Aqua — Inverse Cup and Handle
LOWER PATTERN PANEL
The lower panel contains five permanently labeled rows corresponding to the five pattern types.
• Faint dotted lines identify each pattern row.
• Thick colored segments show the complete historical duration of identified patterns.
• Colored confirmation markers identify the candle on which the script confirmed the pattern.
• Pattern names remain positioned at the left edge of the visible chart and automatically adjust when the chart is scrolled or zoomed.
ALERTS
Individual alert conditions are available for:
• Bear Flag
• Descending Triangle breakdown
• Rising Wedge breakdown
• Double Top
• Inverse Cup and Handle breakdown
IMPORTANT INFORMATION
BearScope evaluates only the symbol and timeframe currently displayed on the chart. It does not scan the entire stock market or a TradingView watchlist.
Pattern detection is based on mathematical approximations of price structure. Real-world formations are subjective, and no automated method will identify every valid pattern or exclude every questionable one.
Historical markings show when the script’s programmed conditions were satisfied. They are not evidence that a trade would have been profitable.
Double Top detection uses confirmed pivots and therefore occurs after the actual pivot candle. Pattern drawings may extend back to the formation’s earlier bars, but the information was not available until confirmation occurred.
DISCLAIMER
BearScope is provided solely for educational, informational and historical research purposes. It is not financial or investment advice and does not constitute a recommendation to buy, sell or short any security.
A detected pattern does not guarantee a downside move. Bearish formations can fail, reverse or break upward. Users should independently evaluate trend, volume, liquidity, market conditions, news, risk tolerance and position sizing before making any trading decision.
Past performance and historical chart patterns are not reliable indicators of future results. مؤشر

Red Light / Green LightRed Light / Green Light (ATR Distribution & FTD Signals)
Pressing the gas when momentum favors you is easy, but the hard part is knowing when to hit the brakes before getting caught in a sharp distribution drop.
Red Light / Green Light is an overlay indicator designed to keep you on the right side of heavy market moves. It combines ATR-based volatility expansion on down days with Follow-Through Day (FTD) breakout logic to give clear visual entry and exit cues right on your chart.
How It Works
Red Light (Bearish Exit Signal): Triggers on down-bars where the body size expands beyond a customizable ATR threshold (default: 1.5x 10-period ATR). This flags heavy institutional selling or distribution before a deeper pullback unfolds.
Green Light (Bullish Entry Signal): Triggers on a custom Follow-Through Day setup requiring a minimum +1.5% single-day gain, higher volume than the prior bar, and structural price support off a 10-day lookback low.
Key Features & Customization
Custom Emojis or Text: Choose from preset emojis (e.g., 🍆 / ☠️, 🚀 / 💥) or type in your own custom text labels (e.g., "BUY", "SELL", "GTFO", "DONT BE A HERO").
Smart Wick Clearance: Uses ATR-based dynamic positioning so labels remain readable across all timeframes without crowding candle wicks.
Directional Arrows: Optional toggleable pointer arrows (↑ / ↓) pointing directly at signal candles.
Alert Ready: Includes native alertcondition triggers for both Red Light and Green Light signals so you can route them to webhooks, pop-ups, or SMS.
How to Use
1. Add to Chart: Works across standard timeframes (Daily recommended for standard swing trading logic).
2. Adjust Inputs: Fine-tune ATR length, percentage gain thresholds, or lookback periods in the settings menu to fit your asset class (Equities, Crypto, Futures).
3. Set Alerts: Create a TradingView alert selecting "Red Light Alert" or "Green Light Alert" for real-time notification.
Disclaimer: For educational and informational purposes only. Always manage risk and conduct your own analysis before entering any trade. مؤشر

OLS Slope For Loop [MiesOnCharts]Ordinary Least Squares Slope For Loop
An ensemble of least squares regression lines, one for every window length in a range. Each fits a straight line to recent price and votes on whether that line points up or down. The plotted score is the margin of the vote, running from -1 when every window is falling to +1 when every window is rising.
Built and tuned for the daily timeframe. The inputs adjust for others.
Why an ensemble
Any single regression length is an arbitrary pick, and the best one is only obvious afterwards. Short windows turn fast and catch noise. Long windows are steady and late. This runs the whole range at once and treats direction as a vote, so no single length decides the answer.
Why a slope instead of a crossing
Price above a moving average, or price above where it sat some bars ago, both compare one number against one other number. A single violent bar can push either across the line.
A regression slope is fitted to every bar in its window. One outlier is one point among many, so the fit barely moves. A wick, a gap or a liquidation candle does not get a vote of its own.
That resistance is the whole trade, and it cuts both ways. The reading holds steady when price is chopping inside a range, which is where crossing based tools whipsaw. It is also slower to commit during a clean fast run, where a simple moving average vote will usually be ahead of it. This is meant to sit beside those tools rather than replace them.
How it works
A loop steps from the min window to the max window. Each step fits a least squares line over that many bars and votes +1 if the line rises, -1 if it falls. The votes are averaged into the score.
Every member keeps two running totals that update once per bar, so its slope comes out at a fixed cost no matter how long its window is. Re-summing every window on every bar would not survive a long chart.
A second line shows the average move the fitted lines imply, as a percent of price. It is rescaled to share the vote's axis and clipped at the edges, so if it sits pinned at the top it has run off the scale rather than maxed out. The exact figure is in the data window as Consensus Slope %.
Signals
Score at or above the threshold turns the state to uptrend and everything green. Score at or below the mirror of it turns the state to downtrend and everything red. In between, the previous state holds.
Holding between the thresholds is deliberate. A brief loss of agreement does not end a regime, and the state only turns when the other side wins outright. Triangles mark each flip, and both flips have alerts.
Inputs
Source: the price series the lines are fitted to.
Min Window and Max Window: the shortest and longest lookbacks in the ensemble. A wider span mixes more timescales and gives a smoother, slower score.
Window Step: the spacing between members. Smaller packs in more lines, finer but heavier. Larger uses fewer, coarser ones.
Trend Threshold: how much agreement is needed before the state flips. Higher is more selective and later. Lower reacts sooner and flips more often.
Show Consensus Slope and Fill To Zero: display toggles.
How to use it
Read the colour as a regime filter. A score near an extreme means every horizon agrees. A score near the middle means they are split and directional trades have less behind them.
Watch it beside a faster tool. When that one has flipped and this has not, the move so far rests on the newest bars rather than on the shape of the whole window.
Check the slope as well as the score. A full vote on a shallow drift and a full vote on a steep run look identical in the score.
Limits
It is reactive. It describes the trend price is already in and will lag turns. It does not forecast.
Nearby window lengths give similar answers, so a narrow range delivers less of the averaging benefit than a wide one.
The score moves in steps set by how many members there are. A small ensemble gives a coarse, stair stepped reading, and one member changing its mind moves the score a long way. Wider spans and smaller steps smooth this out.
Runtime grows with the number of members.
No setting is right everywhere. Test on your own market and timeframe.
Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute financial, investment, or trading advice, nor a recommendation to buy or sell any asset. مؤشر

مؤشر

Confirmed Structure Transition Map [Pineify]Confirmed Structure Transition Map
Overview
This Pine Script v6 indicator separates confirmed swings, break-of-structure events, and direction candidates. A finite state appears as a stepped price corridor.
Problem Definition
A common baseline finds fractal highs and lows, then labels any crossing BOS or CHoCH. It hides the pivot bar, the later confirmation bar, and the still later break. One level may emit repeated labels, while one counter-break may be called a reversal. Label density replaces a distinction between swing formation, continuation, and transition. This script separates those events and never triggers an earlier break with future information.
Design Rationale
Confirmed pivots provide stable levels; a moving extreme has no fixed identity. Each high and low becomes a one-use rail. A break with the bias is BOS; the first qualified counter-break is only a potential CHoCH. Bias changes after a fresh rail breaks again in that direction. Crossing the frozen opposite rail or age limit cancels the candidate. This rejects immediate reversal on one counter-break. The tradeoff is lag for explicit evidence. ATR scaling filters tiny overruns but does not estimate probability.
Key Features
Optional confirmed HH, LH, HL, and LL labels.
One-use rails that suppress duplicate breaks.
BOS, potential CHoCH, shift, invalidation, and expiry states.
ATR displacement, state corridor, alerts, and dashboard.
How It Works
The script reads chart OHLC and a symmetric pivot window. A pivot is accepted after its right-side bars close. Its price and index are stored, compared with the prior same-type pivot, and armed as a rail. If price already exceeded the required displacement when it became knowable, that rail is consumed without a hindsight event.
Each confirmed bar compares the Close or Wick probe with both rails. Distance beyond a rail is divided by ATR and must meet Minimum Break Displacement. On a two-sided outside bar, the larger normalized wick defines one event. The first event sets bias; a same-direction event is BOS. A counter-event freezes break rail, invalidation rail, displacement, and start bar. Confirmation needs a fresh rail and second break in the candidate direction. Invalidation or expiry ends the candidate. The corridor shows bullish, bearish, pending, or neutral state; early bars stay neutral.
How Multiple Indicators Work Together
This is one dependent state model, not a mashup. Pivot confirmation supplies stable rails; otherwise levels move while tested. ATR displacement separates a tiny overrun from a range-scaled break. The ordered state machine consumes those qualified breaks; otherwise crossings remain a label stream. The corridor encodes the resulting state instead of adding an unrelated signal.
Trading Ideas and Insights
Read BOS as evidence that price cleared a rail with the established bias, not as an entry command. Violet marks a candidate; amber shows why it ended. A wide corridor requires a larger absolute move. Apply separate risk, liquidity, and execution rules: the map does not select stops, size positions, or forecast events.
Unique Aspects
The contribution is an ordered lifecycle. Rails arm only when knowable, each fires once, a counter-break stays provisional, and a second newly armed break is required before bias changes. Invalidation level and age limit freeze at candidate start, so later pivots cannot rewrite the test. One corridor carries bias and transition while labels, wash, bar colors, and table remain optional. This is more than a renamed fractal plot.
How to Use
Begin with Close and default pivots, then check swing density for the market and timeframe. Read rails first: BOS continues state, P-CH opens a candidate, and SHIFT completes the two-break transition. HH/HL locations are revealed after the right-bar delay, not known on their historical bars. Use BOS and shift alerts only within an existing process.
Customization
Pivot Left/Right Bars control granularity and delay: smaller values add noise; larger values add lag. Close requires settlement beyond a rail. Wick uses extremes and resolves outside bars by larger excursion. Minimum Break Displacement sets ATR clearance; Candidate Expiry limits age. Corridor, labels, wash, bar colors, and dashboard are independently configurable.
Assumptions and Limitations
Pivots need future bars for confirmation, so markers appear on pivot bars only after the right-side delay; breaks and shifts remain on confirmation bars. Probes move live, but state and alerts require bar close. ATR and pivot settings are market-sensitive. Gaps can jump rails, Wick mode reduces an outside bar to one event, and chop can repeat candidates. The model reads chart prices, not order flow, news, higher timeframes, or execution quality. A shift is an ordered event, not a guaranteed reversal or profitable trade.
Conclusion
The map turns delayed pivots and breaks into an auditable sequence: location, one-use break, provisional counter-break, then confirmation or invalidation. It provides structural context; interpretation and risk remain with the user.
مؤشر

Dynamic Oscillator (RSI, MACD, Stoch, Stoch RSI)Description:
This indicator combines four of the most widely used momentum and trend oscillators—RSI, MACD, Stochastic RSI, and Stochastic—into a single, unified pane.
Originality and Usefulness:
The primary issue with combining multiple bounded (0-100) and unbounded (MACD) oscillators into a single pane is overlapping, which creates an unreadable chart. This script solves that problem by introducing a Dynamic Auto-Scaling and Stacking Algorithm.
Instead of rendering all indicators on the same axis, the script dynamically assigns a visual 100-point tier (base level) to each activated indicator. If an indicator is toggled off in the settings, the script automatically recalculates the bases and shifts the remaining active indicators down to fill the void (auto-scale). This ensures a clean, non-overlapping visualization that saves valuable chart space, especially for users who rely on multiple momentum confirmations.
To achieve this, the script utilizes invisible base plots and custom helper functions drawing extended dashed lines (line.new with extend.both) to act as smart visual separators that adapt dynamically based on how many indicators are currently active.
Underlying Concepts & How It Does It:
1. MACD Normalization (Unbounded to Bounded):
Since the MACD does not have a fixed upper or lower bound, directly overlaying it with bounded oscillators is impossible without distortion. This script uses a mathematical workaround: it calculates the highest absolute value among the MACD line, Signal line, and Histogram over a 100-bar lookback window using ta.highest(). It then generates a proportional scaling factor to compress the MACD data precisely into a 100-point visual zone. The visual crosses, trend direction, and histogram shapes remain mathematically accurate to a traditional MACD, but scaled to fit the stacking environment.
2. Relative Strength Index (RSI) & Divergence:
The script includes a standard RSI (default 14-period). It is equipped with an automated Regular Divergence detection system. The logic uses ta.pivotlow and ta.pivothigh with customizable lookback windows (left and right) to identify price extremes compared to RSI extremes. Furthermore, users can enable a moving average smoothing line directly applied to the RSI calculation (SMA, EMA, WMA, VWMA, or Bollinger Bands).
3. Stochastic & Stochastic RSI:
The script calculates the traditional Stochastic Oscillator (%K and %D) using the standard ta.stoch() function based on Close, High, and Low. Additionally, it provides the Stochastic RSI, applying the Stochastic formula directly to the RSI values rather than price data, increasing sensitivity for identifying short-term overbought/oversold conditions.
How to Use It:
● Toggle System: Open the indicator settings and use the checkboxes to turn specific oscillators ON or OFF. The layout will adapt automatically.
● Confluence Trading: Use this stacked view to spot confluences. For example, spotting a Regular Bullish Divergence on the RSI occurring simultaneously with a MACD zero-line cross and a Stochastic %K/%D crossover in the oversold zone.
● Clean Visualization: The indicator uses custom transparent boundaries and dashed separator lines to keep your workspace structured.
(Note: This script is published for educational purposes to demonstrate dynamic vertical scaling of mixed-bound arrays).
Disclaimer:
This script is strictly an analytical tool for educational and informational purposes only. It does not constitute financial advice, nor is it an invitation, solicitation, or recommendation to buy or sell any financial instrument. The developer of this indicator assumes no responsibility or liability for any trading decisions, financial losses, or actions you take based on this tool. Trading in financial markets involves a high degree of risk, and all trading decisions are entirely in your own hands. Past performance of any trading system is not indicative of future results. Always Do Your Own Research (DYOR) and test strategies on a paper trading account before risking real capital. مؤشر

TRADLEWARE-DCA+Trend ETF
DCA + Trend: Monthly Contributions with a Bear-Market Exit and Dip-Ladder Re-entry
This strategy treats "putting money in every month" and "managing the pile of money already invested" as two separate jobs. A fixed monthly contribution never stops, even in a bear market — but the accumulated stack gets pulled out entirely when the long-term trend breaks, and put back to work gradually as the market recovers rather than all at once.
The target here is beating plain monthly dollar-cost averaging, not simple buy-and-hold. On broad-market ETFs, which tend to trend upward over long horizons, DCA already captures much of the benefit of buying dips just by staying systematic — a real bar to clear, not a strawman. It's also the one this strategy has consistently cleared across every asset tested so far (see Known limitations for where it falls short of buy-and-hold's raw return instead).
How it works
Every calendar month, a fixed dollar amount is invested, regardless of what the trend is doing — this means fixed dollars buy more shares exactly when the market is cheap, which is the whole point of dollar-cost averaging. Separately, a 200-day SMA acts as a trend filter for the accumulated position: when price closes below it, the entire stack built up so far is sold. When the trend recovers, that money doesn't necessarily go back in all at once — instead it can be split into tranches that buy in stages as price falls further below its prior peak during the bear market, so more of the recovery budget lands at genuinely lower prices instead of guessing the exact bottom.
Entry
Three separate mechanisms add to the position:
Monthly DCA: on the first bar of every calendar month, a fixed dollar amount is invested — by default, this keeps happening even during a bear market (can be turned off to pause contributions below the trend line instead)
Dip-ladder tranches: after a bear-market exit, the re-entry budget is split equally across up to three pieces, regardless of how deep each one triggers — each buys when price falls a further fixed percentage below the running all-time high (15%, 20%, and 30% below, by default) — this uses the all-time high as the reference level specifically because, unlike the moving average, it does not sink during the bear market
Lump sum recovery: any part of the re-entry budget that wasn't already spent by the dip-ladder tranches is deployed in one shot on the first bar the trend recovers
Exit
The entire accumulated position (not the monthly contributions still to come) is sold in full the moment price closes below the 200-day SMA — a trend-broken event, not something that unwinds gradually. An optional "death cross" confirmation (50-day SMA also below the 200-day SMA) can be required before treating a dip as a genuine bear market, which reduces false exits during brief pullbacks.
Parameters
SMA period: 200 days (the trend filter for the exit)
SMA hysteresis band: a dead zone around the SMA, on by default. The regime only flips bullish above SMA×(1+band) or bearish below SMA×(1-band); price sitting between those two lines just holds whatever state it was already in. This filters out marginal SMA crossings that would otherwise trigger an exit and re-entry over a move that never became a real trend break — most such round trips re-buy at close to the same price they sold at, paying costs without capturing anything. Set to 0 to require only a plain SMA cross.
Monthly DCA amount: fixed dollar amount invested on the first bar of each month
Lump re-entry percentage: how much of the value that was sold at the exit gets redeployed on recovery (0 = skip lump entirely and resume monthly DCA only; higher = more of the recovery captured, at the cost of more drawdown if the recovery turns out to be a false one)
Death cross confirmation: off by default; when enabled, requires the 50-day SMA below the 200-day SMA before treating the market as unsafe
DCA during bear regime: on by default; contributions keep buying through the bear market instead of pausing
Dip-ladder toggle and three rung levels (percentage below the running high): default 15%, 20%, 30% below; any rung can be set to 0 to disable it
Whole-share DCA: off by default. A fractional monthly quantity (contribution amount smaller than one share) rounds down to zero on most equity brokers and never fills or fires an alert. Turning this on banks any unspent contribution and carries it to the next month, firing a whole-share order once enough has accumulated
Label offset: how far the buy/sell trade labels sit from the bar, in multiples of ATR(14)
Chart labels
Every fill is marked directly on the chart: a green label below the bar for each buy (tagging which mechanism fired — DCA, LUMP, or RUNG 1/2/3, combined if more than one lands on the same bar) and a red label above the bar for each exit (CRASH EXIT or PERIOD END), showing the blended profit/loss across everything that closed on that bar. Since one crash exit can unwind dozens of separate monthly contributions and dip-ladder buys at once, the P&L shown is the combined result of all of them, not just one trade. Both label types also show the cash left in the account after that fill — useful for keeping an eye on how close the pool is to running dry, since TradingView blocks an order it can't cover and DCA/lump/rung buys stall until the next sale refills it.
Costs modelled
0% commission (typical for US equity brokers), 1 tick slippage, fills at next bar's open.
Intended assets and timeframe
Daily bars, US equity ETFs. Built and tested on MGK specifically, using the settings published as its defaults (death-cross confirmation off, rungs at 15/20/30% below the running high) — that combination is the only one checked end-to-end against a live TradingView run. Seven other broad-market, growth, value, equal-weight, and momentum funds — QQQ, VOO, IVW, IVE, RSP, SPYM, and SPMO — were also tested, each with its own settings rather than MGK's defaults left unchanged, and are very likely to beat plain monthly DCA too: that pattern held without exception on every asset checked so far. Their validated combination is different from what's published here — death-cross confirmation on and wider rungs at 20/30/40% — which is the better starting point if you switch tickers, with QQQ as the one exception even to that (see Known limitations): it pairs better with death-cross confirmation off and the hysteresis band set to 2% instead. Parameter choices matter more than they might look — death-cross on/off, the lump percentage, and the rung spacing have each swung the outcome by a wide margin in testing — so tuning for whichever asset and regime you're actually using, rather than leaving the MGK-tuned defaults unchanged, is worth the effort.
Known limitations
The exit reacts at the next bar's open after the trend breaks, so it lags fast crashes rather than anticipating them. In a slow, grinding bear market, the dip ladder's fixed rungs can all fire and the market can keep falling anyway, leaving a larger paper loss than the version without a ladder — the extra return the ladder aims to capture on recovery is paid for with real, and sometimes severe, worst-case pain during a prolonged decline. Size the lump and rung percentages to a drawdown you could actually hold through, not just a comfortable one. Bear-market DCA contributions can sit on paper losses for a long time before a recovery arrives. Switching to one of the other seven validated funds calls for different settings than the published MGK defaults — see Intended assets and timeframe above. QQQ specifically pairs better with the death-cross confirmation off and the hysteresis band at 2% rather than either of the other two combinations. For VOO, turning death-cross confirmation on is a genuine trade-off rather than a clear-cut fix: it gives a smaller drawdown and better Calmar ratio at the cost of slightly lower return and Sharpe. TradingView's own chart price does not include dividends, so a live TradingView backtest will differ somewhat from a dividend-adjusted one, though trade dates should still match. Over the published defaults' validated window, trade count sits below the sample size usually wanted for stable statistics — treat this as a directional result to build on, not a confirmed edge, until it's been checked over a longer window or across more of the validated assets.
If you already hold a lump-sum position and plan to add ongoing contributions on top of it, don't feed the lump into this strategy's own trading — a crash exit sells everything it holds at once, lump included, and testing found that dragged results down noticeably compared to keeping an existing lump in a separate buy-and-hold position and only running new contributions through this strategy. Even limited to just the ongoing contributions, though, this strategy's trading is not guaranteed to beat simply holding those same contributions — in the scenarios tested so far, plain buy-and-hold of the contributions matched or outperformed running them through the strategy's exit/re-entry logic. Treat this as a tool for managing how an existing trend-following thesis gets traded, not as a proven improvement over doing nothing.
استراتيجية
