Engulfing Confirmation Signals [algotim]Overview
Engulfing Confirmation Signals is a two-stage price action indicator designed to distinguish basic engulfing candle formations from engulfing setups that receive additional confirmation from market context.
The script does not treat every bullish or bearish engulfing candle as a signal. First, an engulfing candle must satisfy structural requirements and pass a rule-based quality score using trend alignment, relative volume, and ATR expansion. A qualifying engulfing candle then creates a temporary confirmation zone based on its full high-low range.
The second stage waits for price to close beyond that range within a configurable number of bars. This separates the initial pattern from the subsequent breakout confirmation.
Problem Statement
A traditional engulfing detector can produce a large number of signals because the candlestick pattern itself only describes the relationship between the current candle and the previous candle.
This script adds a filtering and confirmation process around that pattern.
Instead of treating the engulfing candle as the final event, the indicator asks two separate questions:
1. Does the engulfing candle have sufficient structural and market-context quality?
2. After qualification, does price subsequently break the engulfing candle's range before the setup expires?
This creates a distinction between a qualified engulfing setup and a confirmed breakout.
Methodology
Stage 1: Engulfing Structure
A bullish engulfing candle must close above its open while the previous candle is bearish.
A bearish engulfing candle must close below its open while the previous candle is bullish.
When full-body engulfing is enabled, the current candle must also open and close beyond the previous candle's corresponding open and close.
The current candle body must be at least the configured multiple of the previous candle's body. The default minimum is 1.05 times the previous candle body.
The pattern is evaluated on the confirmed bar close.
### Stage 2: Quality Score
A qualifying engulfing candle receives a score from three rule-based components.
**Trend alignment - 40 points**
For bullish setups, the close is compared with the configured EMA. A close above the EMA receives the full 40 points. A close within the defined 0.2% proximity band receives 20 points.
For bearish setups, the corresponding relationship is reversed.
**Relative volume - 30 points**
Volume is compared with its simple moving average:
Volume ratio = Current volume / Average volume
The resulting value is converted into a score and capped at 30 points.
This allows the scoring engine to distinguish an engulfing candle occurring with relatively high participation from one occurring on comparatively weak volume.
**ATR expansion - 30 points**
Current ATR is compared with an average of ATR values.
ATR expansion contributes additional points when current volatility is above its ATR baseline, with the contribution capped at 30 points.
The three components are added together. An engulfing candle is accepted only when its total score reaches the user-defined minimum score.
The score is a rule-based filter and should not be interpreted as a probability or expected win rate.
Signal Workflow
Bullish workflow
1. Detect a bullish engulfing candle.
2. Verify the required body relationship with the previous candle.
3. Calculate trend, volume, and ATR components.
4. Add the components into the 0-100 quality score.
5. Ignore the setup if the score is below the minimum threshold.
6. If qualified, create a bullish confirmation zone using the engulfing candle's high and low.
7. Monitor subsequent bars for a close above the engulfing candle high.
8. Generate the confirmed bullish signal when that breakout occurs.
9. Expire the zone if the breakout does not occur within the configured waiting period.
Bearish workflow
1. Detect a bearish engulfing candle.
2. Verify the required body relationship with the previous candle.
3. Calculate trend, volume, and ATR components.
4. Add the components into the 0-100 quality score.
5. Ignore the setup if the score is below the minimum threshold.
6. If qualified, create a bearish confirmation zone using the engulfing candle's high and low.
7. Monitor subsequent bars for a close below the engulfing candle low.
8. Generate the confirmed bearish signal when that breakout occurs.
9. Expire the zone if the breakout does not occur within the configured waiting period.
Why This Indicator Is Different
A conventional engulfing indicator normally stops at identifying the candlestick pattern.
This script uses the engulfing candle as the beginning of a two-stage process.
The first stage evaluates whether the pattern has sufficient contextual support using three measurable conditions: its position relative to an EMA, current volume relative to average volume, and current ATR relative to its ATR baseline.
The second stage does not immediately convert a qualified engulfing candle into a confirmed breakout signal. Instead, the engulfing candle's range becomes a temporary state that is monitored for a subsequent closing breakout.
This distinction is the main purpose of the indicator: the initial engulfing event and the later range break are treated as separate analytical events.
Inputs
Engulfing Detection
**Min Body Size vs Prior Candle**
Controls how large the engulfing candle's body must be relative to the previous candle.
**Require Full Body Engulf**
When enabled, the current candle's open and close must fully engulf the previous candle's body.
Confirmation Engine
**Trend EMA Length**
Sets the EMA used for the trend-alignment component of the score.
**Volume Average Length**
Controls the moving-average baseline used to evaluate relative volume.
**ATR Length**
Controls the ATR calculation used by the volatility component.
**Minimum Quality Score**
Sets the minimum combined score required for an engulfing candle to create a confirmation zone.
Confirmation Zone
**Max Bars to Wait for Confirmation**
Defines how long an active engulfing zone remains valid while waiting for a breakout.
**Extend Zone Box While Active**
Controls whether the active zone visually extends as subsequent bars are processed.
Visual Style
The visual inputs control bullish and bearish colors, zone transparency, Stage 1 markers, and whether the numerical quality score is displayed.
Alerts
The script provides alerts for:
* Qualified bullish engulfing
* Qualified bearish engulfing
* Confirmed bullish breakout
* Confirmed bearish breakout
Qualified alerts identify the first stage of the process. Confirmed breakout alerts identify the second stage.
Practical Usage
The Stage 1 marker can be used to locate engulfing candles that have passed the configured contextual filters.
The Stage 2 confirmation marker can then be used to identify cases where price subsequently closes beyond the qualified engulfing candle's range.
Users can adjust the minimum score to control selectivity. Higher thresholds require stronger combined trend, volume, and volatility conditions and will generally produce fewer qualifying setups.
The confirmation window can also be adjusted depending on how long the user wants an engulfing setup to remain valid.
The indicator is intended for chart analysis and can be evaluated across different instruments and timeframes. Settings should be tested against the characteristics of the market being analyzed.
Limitations
The quality score is a rule-based classification and is not a statistical probability, accuracy percentage, or guarantee of future performance.
Engulfing patterns can fail, and a confirmed range breakout does not guarantee continued price movement.
Volume behavior varies between instruments, particularly where volume data is limited or represents different types of market activity.
EMA, volume, and ATR parameters can produce different results across instruments and timeframes.
Signals are generated from completed bar conditions, but the confirmation process can still produce false breakouts during volatile or ranging conditions.
The indicator does not provide trade management, position sizing, stop-loss, or take-profit recommendations.
Notes
The script is designed as a structured confirmation framework around engulfing price action.
Its output should be interpreted as analytical information rather than a standalone trading decision. Users should evaluate the indicator with their own market context, risk management, and trading methodology. Индикатор

Optimal Trade Entry (OTE) Zone Plotter [algotim]Optimal Trade Entry (OTE) Zone Plotter locates the 62%-79% institutional retracement zone of a confirmed impulsive swing and keeps only the single most relevant zone per direction on the chart, fading it through disclosed mitigation states as price interacts with it.
Problem Statement
The Optimal Trade Entry concept, retracing into the 62%-79% region of an impulsive leg before continuation, is a well-known Fibonacci convention, but most public implementations simply plot every Fibonacci level on every swing they detect. This produces charts covered in overlapping retracement boxes, most of which come from insignificant swings that carry no real weight, and gives no visual indication of which zones are still fresh, already tested, or fully invalidated.
This indicator addresses that gap by filtering which swings are allowed to generate a zone in the first place, by showing only the current zone per direction at full strength, and by changing each zone's appearance as price actually interacts with it.
Methodology
Swing highs and lows are identified with ta.pivothigh/ta.pivotlow using a user-defined Pivot Length, so every swing referenced by the script is a confirmed pivot, evaluated only after barstate.isconfirmed is true.
Consecutive pivots of the same type extend a running swing extreme; a leg is only registered when the pivot type alternates (a low following a high, or a high following a low). Each candidate leg must then clear three disclosed checks before it is allowed to create a zone: the leg's price range must reach a minimum multiple of ATR, the swing candle's own body-to-range ratio must reach a minimum threshold, and, if the Break of Structure filter is enabled, the new swing must exceed the prior swing of the same type. Legs that fail any check produce no zone, no label, and no alert.
A qualifying leg generates one OTE zone: the shaded region between the 62% and 79% retracement of that leg, with the 70.5% level drawn as a two-layer glowing midline inside it. Only one bullish and one bearish zone are ever active at a time. When a new qualifying leg forms, the previous zone of that direction is frozen in place and, if enabled, kept as a single low-opacity historical reference rather than removed outright or left overlapping the new zone.
Each active zone tracks its own mitigation state on every confirmed bar: Fresh (untouched), Touched (price has wicked into the 62%-79% region), Mitigated (a confirmed close through the 79% boundary), or Invalidated (a confirmed close back through the leg's own origin point). State can only advance forward, and the zone's fill opacity and border color update automatically at each transition, so the chart communicates a zone's condition without any additional label or panel.
Signal Workflow
Step 1 — a confirmed swing pivot alternates direction, registering a candidate leg from the prior opposite pivot to the new one.
Step 2 — the leg is checked against the Minimum Swing Size, Body Ratio, and optional Break of Structure filters; legs that fail are discarded with no chart output.
Step 3 — a qualifying leg creates a new active OTE zone (62%-79%) with its 70.5% midline, and the previous zone of the same direction is frozen and faded.
Step 4 — the active zone's state advances from Fresh to Touched as price wicks into the zone on a confirmed bar.
Step 5 — the zone advances to Mitigated on a confirmed close through the 79% boundary, or to Invalidated on a confirmed close back through the leg's origin, at which point it is greyed out.
Step 6 — each transition and each zone entry/exit can trigger its own alert, gated by the corresponding toggle in the Alerts group.
Why This Indicator Is Different
Most public OTE/Fibonacci scripts draw a zone for every detected swing regardless of its significance, leaving multiple overlapping retracement boxes on the chart at once.
This script applies a disclosed three-part quality filter (ATR-relative swing size, swing candle body ratio, optional break-of-structure confirmation) before a swing is even allowed to generate a zone.
Only one zone per direction is ever shown at full strength; the prior zone automatically fades to a quiet historical reference the moment a new qualifying swing appears, keeping the chart focused on the current opportunity.
Zone fill opacity and border color are driven entirely by a four-state mitigation engine (Fresh/Touched/Mitigated/Invalidated) computed from confirmed price action against the zone's own boundaries, so the visual state of a zone is informative rather than purely decorative.
The 70.5% equilibrium level is rendered as a two-layer glow line rather than a plain dashed line, giving the zone's mid-point a distinct, non-generic appearance.
Inputs
Swing Detection
Pivot Length
ATR Length
OTE Quality Filter
Minimum Swing Size (x ATR)
Minimum Swing Candle Body Ratio
Require Break of Structure
OTE Zone
Show Bullish OTE Zones
Show Bearish OTE Zones
Zone Extension (bars)
Show Institutional Midline (70.5%)
Fade Previous Zone on New Swing
Visual Settings
Bullish/Bearish Zone Colour
Bullish/Bearish Midline Colour
Label Size
Alerts
Alert: New OTE Zone Created
Alert: Price Entered OTE Zone
Alert: Price Left OTE Zone
Alert: OTE Zone Mitigated
Alert: OTE Zone Invalidated
Alerts
Alerts are available for:
New Bullish/Bearish OTE Zone Created
Price Entered Bullish/Bearish OTE Zone
Price Left Bullish/Bearish OTE Zone
Bullish/Bearish OTE Zone Mitigated
Bullish/Bearish OTE Zone Invalidated
Practical Usage
Treat an active, Fresh OTE zone in the direction of the prevailing structure as a region to watch for a retracement entry, not a standalone entry signal by itself.
Use the Break of Structure filter on trending instruments to restrict zones to swings that genuinely extended structure, and disable it on ranging instruments where internal swings may still be meaningful.
Raise the Minimum Swing Size and Body Ratio filters on lower timeframes or noisy instruments to reduce the number of zones generated.
Watch the zone's fill opacity as a quick visual read of its condition: a bold zone has not been tested, a lighter fill has already been touched or mitigated, and a greyed zone has been invalidated and should generally be disregarded.
Combine the Entered/Exited alerts with your own confirmation criteria (candlestick behavior, lower-timeframe structure, etc.) rather than treating zone entry alone as a trigger.
Limitations
Swing pivots require bars to form on both sides before they confirm, so every zone is inherently placed a Pivot Length number of bars after the actual swing extreme occurred.
The quality filter reduces the number of zones shown but does not evaluate or predict the outcome of any individual retracement.
Only one active zone per direction is displayed at a time; if you want to review multiple historical zones simultaneously, enable "Fade Previous Zone on New Swing" and note that only the single most recent prior zone is retained, not a full history.
As with any retracement-based tool, results will vary across instruments, timeframes, and market regimes.
Notes
This indicator is a zone-location tool intended to highlight the current, quality-filtered Optimal Trade Entry region and its mitigation state through a disclosed, rule-based process.
All swing confirmations, zone creation, mitigation-state transitions, and invalidations are evaluated on confirmed bar closes only, so no element of the script repaints once drawn.
The output is intended to support retracement-based analysis and is not a standalone buy or sell recommendation. Индикатор

Converging Triangles [The_lurker]🔻 CONVERGING TRIANGLES — المثلثات المتقاربة 🔺
No repaint. Nothing that appears ever moves, shifts, or disappears.
Converging Triangles identifies contracting price structures built from confirmed swing pivots: a falling resistance line and a rising support line that coexist in time and close on each other. It runs three independent scales at once, freezes each structure the moment it is identified, and reports the two boundary prices and the exact bar they were crossed.
🔶 1 — THE STRUCTURE
A converging triangle here is not a shape matched against a template. It is a state: two independently valid trendlines, alive at the same time, closing on each other.
Upper boundary — anchored on the two most recent confirmed swing highs, sloping down.
Lower boundary — anchored on the two most recent confirmed swing lows, sloping up.
Because the constraint is on the sign of each slope, the detected family covers symmetric triangles and the near-flat ascending and descending variants. Wedges, where both boundaries slope the same way, are excluded by construction and never appear.
🔶 2 — HOW A STRUCTURE IS ADMITTED
Each boundary must pass every test below, and both boundaries must pass simultaneously before a structure is drawn. One failed test drops the whole structure.
🔸 PER BOUNDARY — five conditions
Pivot confirmation — both anchors are swing points confirmed by "length" bars on each side.
Span — at least 3 bars between anchors, at most length × Max span.
Slope direction — the upper boundary must fall, the lower must rise.
Interior containment — no bar between the two anchors violates the line.
Forward containment — no bar from the second anchor to the present violates the line.
🔸 PER STRUCTURE — three conditions
Both sides live — neither boundary has been broken.
Time overlap — the two boundaries share a common bar range, so no line is drawn across a region where it has no anchors.
Convergence horizon — the projected intersection falls inside Min bars to apex … Max bars to apex.
🔒 Once admitted, the geometry is frozen. Anchor points and slopes never change for the life of that structure.
🔶 3 — READING THE DRAWING
Each boundary is drawn in two segments, and the difference is deliberate.
Solid segment — spans the boundary's own two anchors. This is measured containment, confirmed by the market.
Dotted segment — from the last anchor to the present bar. This is pure extrapolation.
You can always see where the confirmed part ends and the projected part begins.
A single fill binds the two boundaries into one object rather than two unrelated strokes. Its corners are the two starting anchors and the two current endpoints, so the left edge is a slant, not a vertical cut, and the wedge tip is filled.
🔸 COLOUR STATES
⚪ Forming — neutral grey. No directional claim is made before resolution.
🟢 Broken up — green. Lines and fill together.
🔴 Broken down — red. Lines and fill together.
The structure stays neutral for its entire life. Direction is asserted only after a break is confirmed at bar close.
🔶 4 — BREAK DETECTION
On every confirmed bar, the break source is compared against both boundaries at that bar.
If one boundary is violated, the structure resolves in that direction.
If a single bar violates both boundaries, resolution goes to the side with the larger excursion beyond its line.
The shape is then redrawn in the break colour and frozen at the break bar. It does not extend forward afterward.
🏷️ A break label is placed at the bar, carrying its layer letter and any tags that fired.
🔶 5 — THREE INDEPENDENT SCALES
📏 Large (21) · Mid (14) · Small (5)
Contraction is not a single event. A large structure can be narrowing while a small one narrows inside it, and each can resolve in the opposite direction to the other. That is information worth seeing, not a conflict to hide.
Each layer detects, tracks, and resolves independently. Break labels carry L, M, or S, so the scale is always identifiable. Any layer can be switched off.
🔶 6 — HISTORICAL ARCHIVE
🗂️ Optional, off by default.
When enabled, a resolved structure is not deleted but redrawn at a faded shade. Over time this builds a map of where previous contractions broke on that symbol, under a count cap you control, with oldest-first eviction.
The fade is a separate control: set it to zero and archived structures render identically to live ones.
A structure that expires at the apex without resolving is not archived, since there is no event in it to keep.
Archived structures carry no label. Their colour and position already carry the direction.
🔶 7 — INFORMATION PANEL
📋 Reports the nearest live structure, or the nearest recently resolved one if none is live.
Layer — Large / Mid / Small. Coloured by resolution direction once broken.
Upper — the exact upper boundary price, ready to place an order against.
Lower — the same for the lower boundary.
Width (ATR) — current width in ATR units. After a break it becomes "Width at break", measured against the ATR recorded at that same bar, so the number stays fixed for a frozen structure and does not drift as volatility changes.
Projected apex — bars until the two boundaries intersect. After a break it becomes "Since break".
Status — Active · Break pending at close · Broken up · Broken down.
⚠️ The status row alone reads the live bar. It can move between pending and active within a single bar as price crosses back and forth. That is a live readout, labelled as such, not a repaint. The drawn geometry does not move.
🔶 8 — BREAK TAGS
Two optional descriptive measurements, shown on the break bar when they occur.
📊 V — break-bar volume exceeded its moving average by the configured multiplier.
📐 E — break-bar true range exceeded ATR by the configured multiplier.
These describe what happened on that bar. They are not quality scores or confidence grades, and they do not filter anything.
🔶 9 — ALERTS
🔔 Pattern formed — a new structure is admitted.
🔔 Break up — upper boundary broken.
🔔 Break down — lower boundary broken.
🔔 Any resolution — either break.
All alerts fire once per bar close, never before.
🔶 10 — SETTINGS REFERENCE
The icons below match the group headers you see inside the indicator's settings window.
🔸 ⚙️ SETUP
Language — default English. Switching to Arabic changes the entire interface.
Log scale — default Off. Must be matched to your chart's scale manually. See section 12.
ATR length — default 14. Feeds the E tag, the demote distance, and the panel width reading.
🔸 📏 LAYERS
Large L — default On, length 21.
Mid M — default On, length 14.
Small S — default On, length 5.
🔸 🔎 DETECTION
Close-only pivots — default Off. Off anchors on highs and lows; On anchors on closes.
Break source — default Close. One switch governing three things at once: interior containment, forward containment, and break detection.
Max span (× length) — default 5. Ceiling on bars between a boundary's two anchors.
Min side overlap — default 0. Required shared bar range between the two boundaries.
Min bars to apex — default 2.
Max bars to apex — default 200.
🔸 🎨 APPEARANCE
Fill triangle — default On, transparency 78.
Line width 2, line transparency 15.
Colours — grey while forming, green for an upward break, red for a downward break.
🔸 🗂️ HISTORY AND LIFETIME
Keep as current (bars) — default 30. After this the structure is demoted to the archive, or deleted if the archive is off.
Demote beyond (ATR) — default 8.0. Measured against current ATR by design: the question is how far price is now, in today's volatility.
Show historical patterns — default Off.
Historical kept — default 12, a cap across all three layers combined.
Historical fade — default 30, added on top of line and fill transparency.
🔸 🏷️ LABELS
Show labels — default On, 2 kept.
Volume tag V — default On. MA 20, multiplier 1.5.
Range expansion E — default On. Multiplier 1.4.
🔸 📋 PANEL
Show panel — default On, positioned top right.
🔶 11 — ON ACCURACY
Two different things get called accuracy. Only one of them is claimed here.
✅ Structural accuracy is exact and independently verifiable. Every anchor is a confirmed pivot, never a guess. Every line satisfies its containment test at the bar it is drawn. Geometry closes at formation and is never recalculated. A break is settled by a single unambiguous test on a closed bar. Nothing is repainted, backfilled, or silently adjusted. Replay any chart and trace any element yourself.
❌ Predictive accuracy is not claimed. You will find no win rate here, no signal grade, and no price target.
The indicator tells you precisely where the boundaries are and precisely when they were crossed. What that is worth in your strategy, on your instrument, at your timeframe, is yours to determine and yours to risk.
🔶 12 — BEHAVIOUR TO UNDERSTAND BEFORE TRUSTING THE CHART
⚠️ Why a structure appears late. A pivot is not a pivot until its full confirmation bars have passed. That delay is the price of the promise in the first line: nothing appears before its time, and nothing that appears is taken back afterward.
⚠️ A wick may cross a line. By default, anchors sit on highs and lows while containment and break detection are tested on the close. A wick can pierce a boundary while the structure remains valid. Set Break source = Wick for a shape no wick ever touches, and expect noticeably fewer structures from that considerably stricter test.
⚠️ Log scale is manual. Pine cannot read your chart's scale setting. If your chart is logarithmic, enable Log scale. When the two disagree, the computed break level diverges from the drawn line: negligible on narrow structures, material on wide ones. The tell is visible on the chart itself, as the left fill edge separates from the boundary at the second anchor.
⚠️ Where anchors come from. Each boundary is built from the two most recent pivots on its own side. A line that would skip an intermediate pivot is outside the detection scope.
⚠️ Density. Three layers with a full archive weighs the chart down. Disable the layers you do not need, and use the archive cap and the fade to control it.
═════════════════════════════════════════════════════════════
⚠️ DISCLAIMER
═════════════════════════════════════════════════════════════
This indicator is for educational and analytical purposes only. It does not constitute financial, investment, or trading advice. Use it alongside your own strategy and risk management. Neither TradingView nor the developer is responsible for any financial decisions or losses.
═════════════════════════════════════════════════════════════
🔻 المثلثات المتقاربة — Converging Triangles 🔺
ما يظهر على الشارت لا يتحرك ولا ينزاح ولا يُسحب لاحقاً. لا إعادة رسم.
يبحث المؤشر عن حالة واحدة لا عن شكل: أن يجتمع خط مقاومة هابط مع خط دعم صاعد في الوقت نفسه، وأن يضيق ما بينهما شمعةً بعد شمعة. فإذا اجتمعا واستوفى كلٌّ منهما شروطه، رُسم النطاق وتجمّدت هندسته في اللحظة نفسها، فلا تتغيّر بعدها مهما فعل السعر.
🔶 أول ما ينبغي أن تعرفه
لأنه لا يبحث عن شكل يطابقه بقالب جاهز، فهو لا يفرض عليك تسمية. هو يعطيك حدّين بسعرين محدّدين، ويخبرك متى عُبر أحدهما بالضبط. أما ما تفعله بذلك فأنت وحدك.
الحد العلوي — مرسي على آخر قمتين مؤكَّدتين، هابط.
الحد السفلي — مرسي على آخر قاعين مؤكَّدين، صاعد.
ولأن الشرط على إشارة كل ميل، فالعائلة المكتشَفة تشمل المثلث المتماثل والنسخ شبه المستوية من الصاعد والهابط. أما الوتدان، حيث يميل الحدّان في اتجاه واحد، فمستبعدان بالبناء ولا يظهران أبداً.
ويعمل على ثلاثة مقاييس في وقت واحد، لكل مقياس نموذجه المستقل.
🔶 متى يُرسم النطاق؟
لا يُرسم شيء ما لم يستوفِ كل حد شروطه الخمسة، ثم يجتمع الحدّان معاً على ثلاثة شروط أخرى. وأي شرط يسقط يُسقط النموذج كله.
🔸 الحد الواحد — خمسة شروط
أن يقوم على محورين مؤكَّدين. والمحور لا يُعدّ مؤكَّداً إلا بعد أن تمرّ عليه شموع التأكيد كاملة على الجانبين.
أن تكون المسافة بين المحورين ثلاث شموع فأكثر، ولا تتجاوز الطول مضروباً في «أقصى مسافة».
أن يكون العلوي هابطاً والسفلي صاعداً.
ألا تخرق أي شمعة الخط في الفترة الواقعة بين المحورين.
ألا تخرقه أي شمعة من المحور الثاني إلى اللحظة الحالية.
🔸 الحدّان معاً — ثلاثة شروط
أن يكون كلاهما سليماً لم يُكسر.
أن يتعايشا على فترة زمنية مشتركة. وهذا الشرط يمنع أن يُرسم خط في منطقة لا محاور له فيها أصلاً.
أن يقع تقاطعهما المتوقَّع ضمن المدى الذي تحدّده بين «أدنى مسافة للرأس» و«أقصاها».
🔒 وبعد القبول تُغلق الهندسة نهائياً: المحاور ثابتة والميلان ثابتان، ولا شيء يُعاد حسابه.
🔶 كيف تقرأ ما تراه
لكل حد مقطعان، والفرق بينهما مقصود لا زخرفي:
المقطع الصلب يمتد بين محوري ذلك الحد، وهو ما تحقّق فعلاً واحتواه السوق.
المقطع المنقّط يمتد من المحور الأخير إلى الشمعة الحالية، وهو استقراء لا أكثر.
فأنت ترى في كل لحظة أين ينتهي المؤكَّد ويبدأ المتوقَّع.
وتربط بين الحدّين تعبئة واحدة تجعلهما كياناً واحداً لا خطّين منفصلين. وقد أُخذت أركانها من محورَي البداية الفعليين، ولذلك جاءت الحافة اليسرى مائلة يمتلئ عندها رأس الشكل، لا مقطوعة عمودياً.
🔸 واللون يحمل الحالة وحدها
⚪ رمادي محايد ما دام النطاق حيّاً. فلا اتجاه يُدّعى قبل أن يُحسم.
🟢 أخضر إذا حُسم بالخروج من الأعلى. الخطوط والتعبئة معاً.
🔴 أحمر إذا حُسم بالخروج من الأسفل. الخطوط والتعبئة معاً.
فالنطاق يبقى محايداً طوال حياته، ولا يُعلن الاتجاه إلا بعد أن تُغلق الشمعة خارج أحد الحدّين.
🔶 متى يُعدّ النطاق مكسوراً
عند إغلاق كل شمعة يُقاس السعر على الحدّين معاً.
فإن خرج من أحدهما حُسم النطاق في اتجاهه.
وقد تأتي شمعة عنيفة تخرج من الحدّين كليهما، وعندها يُحسم للجهة التي ابتعد عنها السعر أكثر.
ثم يُعاد رسم الشكل بلون الخروج ويُثبَّت عند شمعته، فلا يمتد بعدها إلى الأمام.
🏷️ وتوضع عندها تسمية تحمل حرف المقياس (L أو M أو S) ووسوم الشمعة إن تحقّقت.
🔶 لماذا ثلاثة مقاييس
📏 كبير 21 · متوسط 14 · صغير 5
لأن الانضغاط ليس حدثاً واحداً. فقد يضيق نطاق كبير بينما يضيق داخله نطاق صغير، ويخرج كلٌّ منهما في اتجاه مضاد للآخر. وهذا في نفسه معلومة تستحق أن تُرى، لا تعارضاً يجب إخفاؤه.
ولذلك تعمل الطبقات الثلاث باستقلال تام، ويحمل كل خروج حرف مقياسه فلا يختلط عليك من أين جاء. وتستطيع إطفاء أي طبقة لا تحتاجها.
🔶 النماذج السابقة
🗂️ خيار مطفأ افتراضياً.
إن شغّلته، لم يُمحَ النموذج بعد حسمه، بل بقي مرسوماً بدرجة خافتة. وبمرور الوقت تتكوّن لديك خريطة لمواضع الخروج السابقة على الرمز نفسه، بسقف عددي تحدّده أنت، ويُخلى الأقدم فالأقدم.
ودرجة الخفوت مستقلة بيدك: إن أنزلتها إلى الصفر صارت النماذج القديمة كالحيّة تماماً.
والنموذج الذي انتهى عمره دون خروج لا يدخل الأرشيف، إذ لا حدث فيه يُحفظ.
والنماذج المؤرشفة بلا تسميات، فلونها وموضعها يكفيان.
🔶 لوحة المعلومات
📋 تعرض اللوحة أقرب نطاق حيّ إليك، فإن لم يوجد عرضت أقرب نطاق حُسم حديثاً.
الطبقة — كبير أو متوسط أو صغير، وتُلوَّن باتجاه الخروج بعد حسمه.
الحد العلوي — سعره بالضبط، جاهزاً لوضع أمر عليه.
الحد السفلي — كذلك.
العرض بوحدات ATR — وبعد الخروج يصير «العرض عند الكسر»، محسوباً بـ ATR المسجّل في تلك الشمعة نفسها. فالرقم يبقى ثابتاً لنموذج مجمّد ولا ينزاح بتغيّر التقلّب.
الرأس المتوقَّع — كم شمعة تفصل عن تقاطع الحدّين. وبعد الخروج يصير «منذ الكسر».
الحالة — نشط، أو كسر معلّق يثبت بالإغلاق، أو كُسر لأعلى، أو كُسر لأسفل.
⚠️ وسطر الحالة وحده يقرأ الشمعة الجارية، فقد ينتقل داخلها بين «معلّق» و«نشط» كلما دخل السعر وخرج. وهذه قراءة لحظية مكتوب فيها صراحة أنها تثبت بالإغلاق، وليست إعادة رسم: الشكل المرسوم لا يتحرك.
🔶 الوسمان V و E
يظهران على شمعة الخروج إن تحقّقا:
📊 V — تجاوز حجم الشمعة متوسطه بالمضاعف الذي ضبطته.
📐 E — تجاوز مداها الحقيقي مؤشر ATR بالمضاعف الذي ضبطته.
وهما وصفٌ لما جرى في تلك الشمعة، لا حكم على جودة الخروج ولا درجة ثقة فيه. ولا يمنعان ظهور أي نموذج.
🔶 التنبيهات
🔔 تكوّن نموذج
🔔 كسر لأعلى
🔔 كسر لأسفل
🔔 أي حل — يجمع الاثنين
وجميعها تشتعل مرة واحدة عند إغلاق الشمعة لا قبله.
🔶 الإعدادات
الرموز أدناه هي نفسها التي تراها على رؤوس المجموعات داخل نافذة إعدادات المؤشر.
🔸 ⚙️ الإعداد
اللغة — إنجليزي افتراضاً، وتبديلها إلى العربية يغيّر الواجهة كلها.
المقياس اللوغاريتمي — مطفأ افتراضاً. اضبطه ليطابق شارتك، وانظر آخر قسم.
طول ATR — 14. يخدم وسم E ومسافة إخلاء النماذج وقراءة العرض في اللوحة.
🔸 📏 الطبقات
كبير L — مفعّل، بطول 21.
متوسط M — مفعّل، بطول 14.
صغير S — مفعّل، بطول 5.
🔸 🔎 الكشف
محاور على الإغلاق فقط — مطفأ. فتُؤخذ المحاور من القمم والقيعان. وبتشغيله تُؤخذ من الإغلاقات وحدها.
مصدر الكسر — Close. وهو مفتاح واحد يحكم ثلاثة أشياء دفعة واحدة: الاحتواء بين المحورين، والاحتواء بعدهما، وكشف الخروج.
أقصى مسافة مضروبة في الطول — 5. سقف ما بين محورَي الحد الواحد.
أدنى تداخل بين الضلعين — 0. الفترة المشتركة المطلوبة بين الحدّين.
أدنى مسافة للرأس — 2.
أقصى مسافة للرأس — 200.
🔸 🎨 المظهر
تعبئة المثلث — مفعّلة، بشفافية 78.
عرض الخط 2، وشفافيته 15.
الألوان — رمادي للتكوّن، أخضر للخروج علواً، أحمر للخروج هبوطاً.
🔸 🗂️ التاريخ والعمر
إبقاؤه كالحالي — 30 شمعة، ثم يُنزَّل إلى الأرشيف أو يُحذف إن كان الأرشيف مطفأً.
التنزيل عند البُعد — 8 من ATR. ويُقاس بـ ATR الحالي عن قصد، لأن السؤال هنا عن بُعد السعر الآن بمقياس تقلّب اليوم لا تقلّب الأمس.
إظهار النماذج السابقة — مطفأ.
عدد النماذج المحفوظة — 12، وهو سقف على الطبقات الثلاث مجتمعة.
خفوت التاريخية — 30، تُضاف فوق شفافية الخط والتعبئة.
🔸 🏷️ التسميات
إظهار التسميات — مفعّل، ويُحفظ منها 2.
وسم الحجم V — مفعّل، بمتوسط 20 ومضاعف 1.5.
وسم التمدد E — مفعّل، بمضاعف 1.4.
🔸 📋 اللوحة
مفعّلة، وموضعها أعلى اليمين.
🔶 الدقة: أي دقة؟
تُطلق كلمة «الدقة» على معنيين مختلفين، ولا يُدّعى هنا إلا واحد منهما.
✅ فأما دقة البناء فمضبوطة، وتستطيع التحقق منها بنفسك دون أن تصدّقني: كل محور مؤكَّد لا مظنون، وكل خط يستوفي شرط احتوائه عند الشمعة التي رُسم فيها، والهندسة تُغلق عند التكوّن فلا يُعاد حسابها، والخروج يُحسم باختبار واحد على شمعة مغلقة. لا شيء يُعاد رسمه، ولا يُملأ بأثر رجعي، ولا يُعدَّل في الخفاء. أعد تشغيل أي شارت وتتبّع أي عنصر.
❌ وأما الدقة التنبؤية فغير مُدّعاة، ولن تجد هنا نسبة نجاح ولا درجة إشارة ولا هدفاً سعرياً.
المؤشر يخبرك أين الحدّان ومتى عُبرا، بدقة. أما قيمة ذلك في استراتيجيتك أنت، على أداتك أنت، وفي إطارك الزمني أنت، فتقديرك ومسؤوليتك.
🔶 أمور تعرفها قبل أن تعتمد عليه
⚠️ لماذا يظهر النموذج متأخراً. لأن المحور لا يُعدّ محوراً حتى تمرّ شموع تأكيده كاملة. وهذا التأخّر هو ثمن ما وعدناك به في السطر الأول: لا شيء يظهر قبل أوانه، ولا شيء ظهر يُسحب منك بعد ذلك.
⚠️ قد تجد ذيلاً عابراً للخط. فالمحاور افتراضياً على القمم والقيعان، بينما يُقاس الاحتواء والخروج على الإغلاق. فيجوز أن يخترق ذيلٌ حداً والنموذج ما زال سليماً. وإن أردت شكلاً لا يمسّه ذيل فاضبط مصدر الكسر على Wick، واعلم أنه اختبار أصرم بكثير وأن النماذج ستقلّ بوضوح.
⚠️ المقياس اللوغاريتمي يدوي. فـ Pine لا يستطيع قراءة إعداد شارتك. وإذا كان شارتك لوغاريتمياً فشغّل الخيار. وعند اختلاف الاثنين ينحرف مستوى الخروج المحسوب عن الخط الذي تراه: انحرافاً مهملاً على النماذج الضيّقة، ومادّياً على الواسعة. وعلامته أمام عينك مباشرة، إذ تنفصل حافة التعبئة اليسرى عن الحد عند المحور الثاني.
⚠️ من أين تُؤخذ المحاور. كل حد يُبنى من آخر محورين على جهته. فالخط الذي يتجاوز محوراً وسيطاً خارج عن نطاق الكشف.
⚠️ الكثافة. ثلاث طبقات مع أرشيف ممتلئ تُثقل الشارت. أطفئ ما لا تحتاجه، واستعن بسقف الأرشيف ودرجة الخفوت.
═════════════════════════════════════════════════════════════
⚠️ إخلاء المسؤولية
═════════════════════════════════════════════════════════════
هذا المؤشر لأغراض تعليمية وتحليلية فقط. لا يُمثل نصيحة مالية أو استثمارية أو تداولية. استخدمه بالتزامن مع استراتيجيتك الخاصة وإدارة المخاطر. لا يتحمل TradingView ولا المطور مسؤولية أي قرارات مالية أو خسائر.
═════════════════════════════════════════════════════════════ Индикатор

DATEOFBIRTH Strategy)# Date of Birth Strategy — Annual High & Low Levels
## Overview
The **Date of Birth Strategy** is an experimental market-analysis tool based on the concept of identifying and tracking the High and Low of a market's historically significant "Date of Birth."
For example, if an index or instrument has a defined inception/date-of-birth date, this script identifies the High and Low formed on that particular calendar date and plots those levels across subsequent years.
The objective is to provide a **historical reference framework** that traders can use alongside conventional technical analysis, price action, market structure, and risk-management techniques.
## How It Works
The script:
* Uses a user-defined **Date of Birth**.
* Identifies the corresponding calendar day for each year.
* Captures the **High and Low** of that day's trading session.
* Plots the levels as horizontal reference lines.
* Extends the levels so traders can observe how price reacts around historically derived levels.
* Can be used for historical analysis as well as monitoring future occurrences of the selected calendar date.
### Example
If the selected Date of Birth is **3 November**, the script attempts to identify the High and Low of 3 November for each available year.
These historical levels can then be studied for:
* Support and resistance reactions
* Breakouts and breakdowns
* Price rejection
* Market structure
* Confluence with technical indicators
* Historical price behavior around the annual date
## Important Considerations
This indicator is intended as a **research and educational tool**. Historical price levels do not necessarily have predictive power, and the appearance of a reaction around a DOB level should not be interpreted as proof of a causal relationship.
The results may vary depending on:
* The selected symbol
* Exchange trading calendar
* Historical data availability
* Timeframe
* Session settings
* Corporate actions or contract changes
* Data-feed differences between brokers and exchanges
Users should independently verify important historical levels against reliable market data.
## Suggested Usage
For better analysis, consider combining the DOB levels with established methods such as:
* Price action
* Market structure
* Volume analysis
* Support and resistance
* Moving averages
* Volatility analysis
* Trend analysis
* Risk/reward assessment
Do not use the DOB levels as a standalone signal for entering or exiting a trade.
## Disclaimer
**Educational and informational purposes only.**
This script is provided for research, educational, and analytical purposes and does **not constitute investment advice, financial advice, trading advice, or a recommendation to buy or sell any security, derivative, cryptocurrency, commodity, index, or other financial instrument.
Past performance or historical market behavior does not guarantee or imply future results. No representation is made that the levels, signals, or observations generated by this script will accurately predict future market movements.
Trading and investing involve substantial risk, including the possible loss of capital. Users are solely responsible for their own trading and investment decisions.
Always conduct your own research and use appropriate risk-management practices. If required, consult a qualified financial professional before making investment decisions.
## Transparency
This script is based on a **calendar-date / historical-level methodology** and should not be interpreted as a guaranteed forecasting system.
The author makes no guarantee regarding the accuracy, completeness, reliability, or future performance of the levels or observations generated by the script.
**Use at your own risk.**
---
**Tags:** `Date of Birth` `DOB Strategy` `Annual Levels` `Support Resistance` `Technical Analysis` `Market Analysis` `Trading Strategy` `Price Action` `Historical Levels`
Индикатор

Trend Trigger | EMA Trend Filter + MTF Stochastic Entry with ATROverview
This strategy combines two proven, independent mechanisms rather than inventing a new indicator: a slow-moving EMA trend filter decides which direction is permitted, and a higher-timeframe-confirmed stochastic oscillator decides when to actually enter. Trend and timing are handled by separate logic layers so each does one job well, instead of stacking multiple overlapping conditions that rarely align.
How it works
Trend permission (EMA 38/62): Trades are only allowed in the direction the EMA fast/slow relationship currently supports — longs when fast > slow, shorts when fast < slow. This keeps the strategy from fighting the prevailing trend. This filter can be disabled for a pure counter-trend/mean-reversion test.
Entry timing (MTF Stochastic): The current-timeframe %K/%D stochastic must cross through the midline (50) with rising/falling momentum, and the same stochastic recalculated on the next higher timeframe (auto-stepped: 1m→5m, 1h→4h, 1D→1W, etc.) must agree in direction. This is the same core logic as classic MTF stochastic systems — entries are timed at momentum inflection points that are confirmed on a broader structural timeframe, not just the noisy current one.
Staged, ATR-based risk management: Every position opens with an ATR-scaled hard stop. Once the trade reaches a configurable R-multiple (default 1.0R), the stop moves to breakeven — locking in "no loss" without capping upside. Past a second, larger R-multiple (default 1.5R), the stop begins trailing using ATR (not fixed ticks), so the trailing distance scales with the instrument's actual volatility instead of an arbitrary number.
Secondary exits: A stochastic-fade exit (mirroring the entry logic in reverse) and an optional trend-flip exit close the trade early if the higher-timeframe signal reverses or the EMA trend turns against the position. A time-stop closes any trade that's gone nowhere after N bars.
Distinctive features
Trend and timing are decoupled — you can test pure momentum-timing (trend filter off) versus trend-confirmed pullback entries (trend filter on) with one toggle.
No fixed-tick trailing stop — every risk parameter (initial stop, breakeven trigger, trailing distance) is ATR-scaled, so the same settings behave sensibly across instruments with very different volatility (e.g., a $30 stock vs. a $60,000 crypto asset) without manual re-tuning.
Risk-based position sizing ties trade size directly to the ATR stop distance and a fixed % of equity risked per trade, rather than a flat share/contract count.
A compact confirmation meter (colored bar table) shows trend + stochastic alignment strength at a glance — no cluttered multi-line oscillator overlays on the chart.
Tips for use
Test with the trend filter both on and off separately — they represent genuinely different strategies (trend-following pullback entries vs. pure momentum reversal) and will perform differently depending on the instrument's regime.
Start testing on liquid instruments and a base timeframe of 1H or higher — the automatic higher-timeframe step needs enough bars underneath it to be meaningful; very low timeframes (1–5 min) compress the "higher timeframe" confirmation into something almost as noisy as the entry timeframe itself.
Check Average Win vs. Average Loss in the Strategy Tester, not just win rate — this strategy is built to keep those two numbers close together (via the breakeven/trailing stages), and that ratio is a better health check than win rate alone.
The breakEvenR and trailStartR inputs interact — a very tight breakeven trigger combined with a very close trail can choke off winners before they develop; a very loose one leaves more of the position exposed to giveback. Both are worth walking through several combinations on your specific instrument and timeframe rather than assuming one setting is universally correct.
This is a rules-based tool, not a guarantee — past backtest results don't ensure future performance, and all trading involves risk of loss.
Стратегия

Jamallo Channels🔹Intro
For decades, technical traders have relied on conventional channel models, each burdened by fundamental mathematical limitations:
- Bollinger Bands rely on simple moving averages (SMA) and raw price standard deviation. When strong directional trends emerge, raw variance conflates trend slope with volatility, causing the bands to artificially flare open ("volatility bulge") and produce severe lag and frequent false mean-reversion signals.
- Keltner Channels utilize exponential moving averages (EMA) wrapped with Average True Range (ATR). While smoother, the EMA introduces continuous phase delay, and the bands drift constantly with price, failing to provide stable, horizontal support and resistance benchmarks during consolidation.
- Donchian Channels plot rolling highest highs and lowest lows over an N-bar window. However, they are exceptionally vulnerable to single-bar outlier wicks and sudden step jumps that distort the true statistical distribution without accounting for underlying volatility dynamics.
Jamallo Channels resolves these structural flaws through a novel mathematical synthesis:
1. It replaces lagging moving averages with a multi-resolution Maximal Overlap Discrete Wavelet Transform (MODWT) Haar filter bank coupled with an energy-calibrated deadband step-hold state machine. The baseline remains strictly stationary during consolidation and snaps instantaneously to new price levels upon statistically significant drift.
2. It decouples trend from volatility by computing standard deviation strictly on the detrended high-frequency wavelet residual, filtered through a rolling linear-interpolation median to eliminate spike distortion.
3. It locks the volatility corridor at the exact moment a new regime step triggers—producing pristine, step-synchronized horizontal channels and mathematically robust exhaustion zones.
🔹Break down
1. Multi-Resolution Haar Wavelet MODWT Engine:
- Undecimated Dyadic Decomposition: Deconstructs raw price action across up to 5 dyadic scale levels (Level 1 = 2-bar, Level 2 = 4-bar, Level 3 = 8-bar, Level 4 = 16-bar, Level 5 = 32-bar) into orthogonal approximation (trend) and detail (high-frequency noise) coefficients without phase distortion or downsampling loss.
- Scale-Adaptive Smoothing: Isolates the true low-frequency structural trend from intraday churn and microstructure noise at the selected dyadic decomposition level.
- Dynamic Detail Energy Tracking: Measures the real-time volatility intensity of the high-frequency detail spectrum by computing a rolling Simple Moving Average of absolute detail coefficients over a calibrated lookback window.
2. Energy-Calibrated Deadband Step-Hold Mechanism:
- Statistical Innovation Filtering: Establishes an adaptive deadband threshold scaled directly by the product of the detail energy and a deadband multiplier.
- Zero-Drift Piecewise Step-Holding: The smooth wavelet baseline is held strictly horizontal until price innovation definitively breaches the dynamic detail deadband threshold. Once breached, the baseline snaps instantaneously to the new equilibrium price level, eliminating baseline drifting during consolidation phases.
- Clean Regime Direction State: Evaluates the direction of every confirmed step, immediately classifying the market into Bullish (Teal) or Bearish (Maroon) regime states.
3. Detrended Residual Volatility & Frozen Sigma Bands:
- Trend-Decoupled Dispersion Measurement: Unlike standard deviation calculated around lagging moving averages—which artificially inflates during strong trends—Jamallo Channels isolates the high-frequency wavelet residual (Price minus Wavelet Mid) before computing variance, capturing genuine localized volatility.
- Median Filter Outlier Rejection: Applies a rolling linear-interpolation median filter (50th percentile over a 100-bar window) to the raw residual standard deviation, immunizing the channel against one-off spike anomalies and erratic expansion.
- Step-Locked Volatility Corridors: Volatility is sampled and frozen precisely at the moment a new Haar baseline step triggers. The frozen sigma remains constant throughout the entire regime life cycle, producing stable, non-wiggling horizontal channels.
4. Multi-Tier Volatility Corridors & Exhaustion Envelopes:
- Inner Expansion Zone (1.0σ): Defines the immediate high-probability operational boundary around the stepped trend baseline.
- Mid Dispersion Boundary (2.0σ): Represents standard 2-sigma statistical bounds where normal trending impulse legs oscillate.
- Outer Exhaustion & Mean-Reversion Zone (3.0σ): The extreme channel boundary (2.0σ to 3.0σ highlighted by shaded backgrounds) marks statistical overextension where price is prime for momentum exhaustion and mean-reverting retests back to the Haar stepped baseline.
🔹How to use: Trend Following & Risk Management
Jamallo Channels provides clear, objective mathematical parameters for both momentum trend riders and mean-reversion scalpers across all timeframes.
Regime Trend Trading:
- Setup & Execution: Enter in the direction of a newly confirmed Haar baseline step (when the baseline shifts color to Teal for Longs or Maroon for Shorts) or upon a sustained price breakout above/below the baseline following volatility compression.
- Stop Loss Placement: Anchor stop loss orders directly behind the most recent stepped Haar baseline level or just outside the opposite inner/mid channel boundary.
- Trailing & Letting Winners Run: Trail stop loss orders systematically step-by-step as new horizontal baseline rungs are confirmed, protecting capital while letting winners ride the macro expansion.
Mean-Reversion & Exhaustion Scalping:
- Exhaustion Rejection: When price enters the extreme 2.0σ–3.0σ outer band corridor (upper red fill or lower teal fill) and forms rejection wicks or structural exhaustion patterns, execute counter-trend mean-reversion setups.
- Take-Profit Targets: Target the inner channel (1.0σ) for partial profits and the primary Haar stepped baseline (0σ mean) for final profit harvesting.
- Invalidation / Stop Loss: Place tight stop losses just beyond the outer 3.0σ boundary line.
🔹Settings Parameters
Haar Wavelet Basis:
- Basis Level (1 - 5): Selects the dyadic wavelet decomposition scale (1 = 2-bar, 2 = 4-bar, 3 = 8-bar, 4 = 16-bar, 5 = 32-bar). Higher levels smooth out larger macro trends, while lower levels capture high-frequency swings.
- Deadband Multiplier (0.1 - 10.0): Scaling coefficient applied to the detail energy. Higher values widen the deadband, requiring larger directional thrusts to trigger a new step and producing wider, noise-immune steps.
- Detail Energy Lookback (5 - 200): The rolling lookback window used to calculate the average magnitude of wavelet detail coefficients.
Stdev Bands:
- Stdev Length (min 2): Lookback period for measuring the standard deviation of the detrended wavelet residual.
- Inner Multiplier (0.1 - 10.0): Standard deviation multiplier for the inner channel envelope (default: 1.0σ).
- Mid Multiplier (0.1 - 10.0): Standard deviation multiplier for the middle channel envelope (default: 2.0σ).
- Outer Multiplier (0.1 - 10.0): Standard deviation multiplier for the extreme exhaustion envelope (default: 3.0σ).
Display Settings:
- Basis Up Color: Custom color for the stepped baseline during bullish regime states (default: Teal).
- Basis Down Color: Custom color for the stepped baseline during bearish regime states (default: Maroon).
- Upper Color: Accent color for the upper channel bands and exhaustion fills (default: Red).
- Lower Color: Accent color for the lower channel bands and exhaustion fills (default: Teal).
- Show Fill: Toggles background shading for the inner and outer volatility corridors.
Индикатор

FCP | Market Sessions | High Low Box & Range StatsMarks the Sydney, Tokyo, London and New York sessions, tracks each
one's high and low, and carries those levels forward to the next
session open.
WHAT IT DRAWS
• A shaded box spanning each session's time window and price range.
• High and low lines that extend to the next session's open.
• Range extension lines projected from the session high and low at
configurable multiples of the session range (0.5x, 1x, 2x by
default), with optional multiplier labels.
• A stats table showing each active session's current range as a
percentage of its own average range over the last N sessions.
Rows for disabled sessions are hidden.
HOW IT WORKS
Session boundaries and session extremes are not read from the chart's
candles. They are computed from 5-minute data through a lower-timeframe
request, so the levels are identical whether you are on a 15-minute
chart or a 4-hour chart. The chart is only the canvas.
The session in progress updates on every tick rather than on bar close,
so the box and its high and low lines follow price in real time.
SETTINGS
Session timezone — sessions are defined in this timezone, so the
windows stay fixed regardless of the symbol's exchange timezone.
Accepts a UTC offset (GMT+0, GMT+3) or an IANA name (Europe/London).
Look-back — how many past sessions to keep drawn.
Each session has its own on/off switch, time window, colour and line
width, so you can define custom windows instead of the defaults.
Range extensions — three independent multipliers; set any of them to
0 to hide one. Line style, width and transparency are adjustable.
Range stats — the averaging window, panel corner and text size.
NOTES
Works on timeframes up to and including 1 day. On higher timeframes
nothing is drawn.
Session times are fixed to the selected timezone and do not shift with
daylight saving time. If your sessions are defined in a DST-observing
timezone, adjust the windows twice a year or enter an IANA timezone
name. Индикатор

OBV Acceleration / DecelerationDescription:
Introduction
Classic On-Balance Volume (OBV) is a powerful tool for tracking smart money and volume flow. However, standard OBV relies on raw closing prices to determine whether volume was "bullish" or "bearish" for the day. This makes it highly susceptible to market noise, wicks, and fake-outs.
This open-source script, OBV Acceleration / Deceleration, rebuilds the OBV formula from the ground up. It filters price noise using a Fibonacci-weighted Master Average and introduces a Volume Kinetics engine to detect exactly when volume is accelerating (spiking) or decelerating (drying up)
How It Works: Core Logic & Features
This indicator is built on three core mechanical features. Here is the exact logic behind how they work:
1. The Fibonacci Master Average (Noise Filtering)
Instead of looking at the raw close price to decide if volume should be added or subtracted, this script calculates six separate Simple Moving Averages (SMAs) based on the first six numbers of the Fibonacci sequence (1, 1, 2, 3, 5, 8).
*The Logic: The script averages these six SMAs together to create a "Master Average."
*The Result: If the Master Average is pointing up, the volume is added to the OBV. If it points down, it is subtracted. This ensures that a single erratic price wick does not falsely flip the volume flow.
2. Volume Kinetics (Acceleration & Deceleration)
Standard OBV only tells you direction, not intensity. This script measures the "velocity" of the volume by tracking the absolute change in the OBV step bar-by-bar, and compares it to a 40-period historical average.
*Acceleration (Volume Spikes): If the current volume is greater than our customizable Expansion Factor (default 2.0x the average), it flags an Acceleration state. This indicates high momentum, institutional participation, or a heavy breakout.
*Deceleration (Volume Dry-Up): If the current volume drops below our Compression Factor (default 0.5x the average), it flags a Deceleration state. This mathematically highlights market exhaustion, tight consolidation, or a lack of interest.
3. OBV Moving Average & Cloud Fill
To help determine the broader momentum context, a 20-period SMA is applied directly to the custom OBV line.
*The Logic: A dynamic cloud fills the space between the OBV line and its SMA.
*The Result: When OBV is above its SMA, the cloud is Teal (Bullish momentum). When OBV is below its SMA, the cloud is Maroon (Bearish momentum).
Visual Guide (Reading the Dots)
The indicator plots color-coded dots directly on the OBV line to give you instant visual feedback on volume kinetics:
🟢 Bright Green Dot: Bullish Acceleration (High-volume buying spike).
🔴 Bright Red Dot: Bearish Acceleration (High-volume selling spike).
🟡 Yellow Dot: Deceleration / Exhaustion (Volume has severely dried up).
🔵 Teal Dot: Standard bullish volume flow.
🟤 Maroon Dot: Standard bearish volume flow.
Practical Trading Applications
Confirming Breakouts: If price breaks through a key resistance level and the indicator prints a Bright Green Dot, it confirms the breakout is supported by anomalous volume and is more likely to succeed.
Spotting Reversals (Exhaustion): When price approaches a major support or resistance level and prints a cluster of Yellow Dots, it means the volume pushing the trend has dried up. This often precedes a reversal or a deep pullback.
Trend Riding: Stay in trades as long as the OBV line remains on the correct side of its SMA (represented by the Teal or Maroon cloud fill), ignoring minor price pullbacks.
Индикатор

Regime Gated Confluence Score [Pineify]Regime Gated Confluence Score
Overview
This pane indicator combines trend, momentum, and volume after a four-state gate selects meaning and weight. The main score and dashboard reconcile signed contributions.
Problem Definition
Fixed-weight confluence hides a regime error. Positive RSI may confirm a trend but mark extension in a range. EMA separation can persist after efficient travel ends. Relative volume shows participation, not acceptance. A permanent sum can stay strong when path efficiency is low, factors disagree, or ATR leaves its baseline, so users cannot tell whether magnitude reflects agreement or one dominant input.
Design Rationale
ATR-normalized EMA separation and slope measure trend across price scales. Centered RSI supplies momentum; RANGE reverses it to express a fade. Volume pressure combines capped relative volume with close location without claiming aggressor flow. EMA spread and path efficiency classify structure; ATR versus baseline identifies displacement. Lower hold thresholds add hysteresis. A trained model would add hidden data assumptions, while fixed weights preserve the failure. Explicit rules accept sensitivity and lag for auditability.
Key Features
Four regimes with hysteresis.
Standardized trend, RSI, and participation factors.
Regime weights, range inversion, missing-volume renormalization, conflict attenuation, exact contribution totals, and confirmed alerts.
How It Works
EMA spread and fast-EMA change are normalized by ATR, blended 65/35, and clipped to -1 through +1. RSI is centered at 50, divided by 25, and clipped. Volume multiplies close location inside the bar by relative volume capped at 2.5 times baseline, then smooths it. If fewer than 80% of volume-window bars are usable, volume is omitted.
Trend strength is absolute normalized EMA spread. Path efficiency divides net movement by total one-bar movement. ATR relative to baseline measures displacement. VOLATILE has priority until its lower hold level clears. Otherwise, strong separation and efficiency enter TREND, weak evidence enters RANGE, and unresolved evidence is TRANSITION.
Trend/momentum/volume weights are 55/30/15 in TREND, 15/60/25 in RANGE, 40/35/25 in VOLATILE, and 35/40/25 in TRANSITION. RANGE reverses only RSI. Missing volume removes its weight and renormalizes the others. Agreement divides absolute net contribution by total absolute contribution and sets a 0.55-to-1 gate; VOLATILE adds an ATR penalty. Gated components sum to the score. Warm-up or invalid threshold and EMA ordering blocks output with a diagnostic.
How Multiple Indicators Work Together
Trend estimates structure, momentum locates bounded pressure, and volume tests participation plus bar acceptance. The regime interprets them before combination. Without range inversion, extension becomes a continuation vote; without trend, brief momentum can dominate; without volume, weights must be renormalized. Agreement converts remaining conflict into lower magnitude rather than hiding it.
Trading Ideas and Insights
Use the score as context, not an order. A confirmed threshold cross during TREND identifies aligned conditions. In RANGE, check whether trend or volume opposes inverted momentum before considering a fade. In VOLATILE, a compressed gate shows ATR displacement discounting the raw sum. A strong component beside a modest total indicates conflict.
Unique Aspects
The contribution is the sequence of classification, interpretation change, weighting, and attenuation. RANGE reverses momentum while other factors can veto it; hysteresis separates trend entry from persistence; missing volume is removed; and agreement scales every component so the ledger equals the score. The halo shows magnitude, the background shows regime, and the table exposes construction.
How to Use
Start with defaults and compare the regime label with visible path behavior. Wait for warm-up. Keep the ledger visible to see whether structure, oscillator pressure, or participation drives direction. Use confirmed alerts when closing-state transitions matter. Contribution lines are diagnostic; the halo and background form the primary view. Omitted volume means a disclosed two-factor score.
Customization
EMA lengths and slope lookback control structural response; RSI length controls momentum sensitivity. Volume baseline and smoothing trade speed for stability. Regime length changes path efficiency and the ATR baseline. Entry thresholds must exceed hold thresholds. Raising the score threshold reduces alert frequency but does not establish better forecasting. Visual switches change display only.
Assumptions and Limitations
The script uses chart OHLC and reported volume. Exchange, tick, and absent volume differ; close-location volume is only a proxy. EMA, ATR, RSI, and rolling baselines lag. RANGE can fade a breakout, hysteresis can delay exits, and attenuation can suppress an early shock.
Realtime factors, regime, colors, and score can change before close; alerts require confirmation. No request calls, future data, pivots, or negative offsets are used. The script does not model liquidity, news, sizing, entries, stops, or exits. Thresholds do not establish expected return. Sparse bars and unreliable volume can distort evidence.
Conclusion
This replaces a fixed sum with an inspectable state process. The score and ledger show weights, conflict attenuation, and missing-data effects. Keep separate risk and execution rules.
.
Индикатор

5-Day Rolling SMA 1m + Trend Alignment Band5-Day Rolling SMA 1m + Trend Alignment Band
This indicator displays a rolling multi-day Simple Moving Average calculated from 1-minute closing prices, together with a three-state Trend Alignment Band.
It is designed to provide a continuous view of short-term market direction across intraday chart timeframes.
Concept
A conventional 5-day SMA calculated on a daily chart averages only five daily closing prices.
This indicator uses a different approach. It calculates the average from all 1-minute closing prices contained in approximately five regular trading sessions.
For a U.S. stock or ETF with a 390-minute regular trading session:
390 minutes x 5 trading days = 1,950 one-minute bars
The default 5-day calculation is therefore approximately equivalent to:
SMA = Sum of the last 1,950 one-minute closes / 1,950
However, the script does not assume that every market has exactly 390 one-minute bars per trading day.
Instead, it measures the actual number of 1-minute bars in recent completed trading sessions. It then uses the median session length to estimate the typical number of bars per day.
The rolling window is calculated as:
Rolling Window = Typical 1-minute bars per session x Rolling Days
Using the median helps reduce the influence of shortened or unusual trading sessions.
Why use 1-minute data?
Using 1-minute data allows the multi-day average to move continuously instead of behaving like a daily moving average projected onto an intraday chart.
On a 1-minute chart, the rolling SMA can update every minute as:
one new 1-minute close enters the calculation;
the oldest observation leaves the rolling window.
On higher chart timeframes, the same internally calculated 1-minute rolling SMA is sampled onto the selected chart timeframe.
The purpose is not to reproduce a conventional 5-period daily SMA. It is to represent the average location of intraday prices over approximately the most recent five trading sessions.
Trend Alignment Band
The area between price and the rolling SMA is colored according to the relationship between price and the direction of the SMA.
Green - Bullish Alignment
Green appears when:
Price is above the rolling SMA.
The rolling SMA is rising.
Condition:
Price > SMA AND SMA(t) > SMA(t-1)
This indicates that price location and short-term trend direction are aligned upward.
Red - Bearish Alignment
Red appears when:
Price is below the rolling SMA.
The rolling SMA is falling.
Condition:
Price < SMA AND SMA(t) < SMA(t-1)
This indicates that price location and short-term trend direction are aligned downward.
Yellow - Transition / Conflict
Yellow appears when the two conditions are not aligned.
Examples include:
Price moves above the SMA while the SMA is still falling.
Price moves below the SMA while the SMA is still rising.
The SMA is flat.
Yellow should therefore not automatically be interpreted as a ranging market. It represents disagreement between current price location and the direction of the rolling average, which can occur during transitions, pullbacks, reversals, or consolidation.
Intended Use
The indicator is intended primarily as a short-term market-regime and directional context tool rather than as a standalone entry signal.
Possible uses include:
Identifying short-term directional bias.
Distinguishing aligned trends from transition phases.
Providing context for pullbacks and rallies.
Comparing current price with the average intraday price location of recent trading sessions.
Maintaining a consistent short-term reference when moving between intraday chart timeframes.
The three band states can be interpreted as:
Green = bullish alignment
Red = bearish alignment
Yellow = transition or directional conflict
These states are descriptive, not predictive, and should not be treated as automatic buy or sell signals.
Original Features
The script differs from a standard daily SMA or a fixed-length intraday SMA in several ways:
The moving average is calculated internally from 1-minute closing prices.
The script automatically measures the typical number of 1-minute bars in recent completed sessions.
The median session length is used to reduce sensitivity to shortened or irregular trading days.
The rolling period is automatically constructed from the detected session length and selected number of trading days.
The Trend Alignment Band combines both price position and SMA direction instead of using a simple price/SMA crossover alone.
This allows the indicator to adapt its multi-day rolling window to different symbols and trading-session structures without relying on a permanently fixed 1,950-bar setting.
Settings
Show 5-Day Rolling SMA
Shows or hides the rolling SMA line.
Show Trend Alignment Band
Shows or hides the colored area between price and the rolling SMA. Enabled by default.
SMA Line Width
Adjusts the thickness of the SMA.
SMA Color
Default: orange.
Band Transparency
Controls the transparency of the colored trend band.
Bullish Band / Bearish Band / Transition Band
Allows customization of the green, red, and yellow states.
Rolling Days
Default: 5 trading days.
Session Detection Days
Controls how many completed sessions are used when estimating the typical number of 1-minute bars per trading day.
Session
Regular: Uses the symbol's regular trading session.
All: Uses the available session data for the symbol.
For U.S. stocks and ETFs, Regular is the intended default.
Limitations
This is not the same calculation as a conventional 5-period SMA on a daily chart.
The indicator averages 1-minute closing-price observations, so it is better interpreted as a rolling intraday time-sampled price average over approximately the selected number of trading days.
Results can vary depending on:
the symbol's trading-session structure;
Regular versus All session selection;
holidays and shortened trading sessions;
the amount of 1-minute historical data available from the data provider;
the chart timeframe on which the internally calculated series is sampled.
A sufficient amount of historical intraday data is required before the script can determine the normal session length and calculate the full rolling window.
This indicator does not predict future prices and does not generate guaranteed trading signals. It should be used together with price structure, support/resistance, volume analysis, risk management, or other independent forms of analysis.
日本語説明
このインジケーターは、**直近の複数営業日相当の1分足終値から計算するローリングSMA(単純移動平均線)**と、価格とSMAの状態を3色で表すTrend Alignment Bandを表示します。
一般的な日足5SMAとは計算方法が異なります。
通常の日足5SMAは、
直近5本の日足終値の平均
ですが、本インジケーターは直近約5営業日に含まれる1分足終値を連続的に平均します。
米国株・ETFの通常取引時間が1日390分の場合、
390分 × 5営業日 = 1,950本
となるため、デフォルト設定では概ね1分足1950期間SMAに相当します。
1日のバー数を自動判定
このインジケーターでは、1日のバー数を390本と固定していません。
過去の完了した取引日について実際の1分足本数を計測し、その中央値から通常の1営業日あたりのバー数を推定します。
計算期間は、
ローリング本数 = 1営業日の代表的な1分足本数 × ローリング日数
として自動的に決定されます。
中央値を使用することで、短縮取引日などの特殊なセッションの影響を受けにくくしています。
1分足を使用する理由
日足5SMAをそのままイントラデイチャートへ表示すると、日ごとに値が切り替わるため階段状になります。
本インジケーターでは内部計算を1分足で行うため、1分足チャートでは新しい1分足が形成されるごとにローリング平均が更新されます。
したがって、通常の日足5SMAよりも連続的に、直近数営業日における価格の平均的な位置を表現できます。
上位時間足では、この1分足で計算されたRolling SMAを各チャート時間足へサンプリングして表示します。
Trend Alignment Band
価格とRolling SMAとの間を、価格の位置とSMAの方向に応じて3色に分類します。
緑 - Bullish Alignment
以下の2条件が同時に成立した状態です。
価格がSMAより上
SMAが上向き
Price > SMA かつ SMA(t) > SMA(t-1)
価格と短期トレンドの方向が上方向に一致している状態を示します。
赤 - Bearish Alignment
以下の2条件が同時に成立した状態です。
価格がSMAより下
SMAが下向き
Price < SMA かつ SMA(t) < SMA(t-1)
価格と短期トレンドの方向が下方向に一致している状態を示します。
黄 - Transition / Conflict
価格とSMAの方向が一致していない状態です。
代表例:
価格はSMAを上回ったが、SMAはまだ下降している
価格はSMAを下回ったが、SMAはまだ上昇している
SMAが横ばい
したがって黄色は単純な「レンジ」を意味するものではありません。
価格の位置と短期平均の方向に不一致が生じている状態であり、転換、押し・戻し、反転、持ち合いなどで発生します。
基本的な使い方
本インジケーターは直接的な売買シグナルではなく、短期的な相場環境と方向性を把握するためのツールとして設計しています。
基本的には、
緑 = 上昇方向への整合
赤 = 下降方向への整合
黄 = 移行状態または方向の不一致
として使用します。
価格が単にSMAの上か下かだけではなく、SMA自体の方向も同時に判定することが特徴です。
本インジケーター独自の特徴
一般的な日足SMAや固定期間のイントラデイSMAと比較して、以下の特徴があります。
1分足終値を内部計算に使用
1営業日の実際の1分足本数を自動計測
過去セッションの中央値によって通常のセッション長を推定
セッション長 × 日数からローリング期間を自動設定
価格のSMAに対する位置とSMAの方向を組み合わせて3色の状態を表示
これにより、1950本などの固定値をすべての銘柄に適用するのではなく、銘柄ごとの取引セッションに応じた複数日Rolling SMAを構成します。
設定
Show 5-Day Rolling SMA
Rolling SMAの表示・非表示。
Show Trend Alignment Band
Trend Bandの表示・非表示。デフォルトはON。
SMA Line Width
SMAの太さ。
SMA Color
デフォルトはオレンジ。
Band Transparency
帯の透明度。
Bullish / Bearish / Transition Band
緑・赤・黄色を個別に変更できます。
Rolling Days
デフォルト5営業日。
Session Detection Days
通常の1営業日の1分足本数を判定するために使用する過去セッション数。
Session
Regular:通常取引時間のみ
All:取得可能なセッションデータを使用
米国株・ETFではRegularを基本設定として想定しています。
通常の日足5SMAとの違い
通常の日足5SMAは、5本の日足終値を平均します。
本インジケーターは、直近約5営業日に含まれる大量の1分足終値を平均します。
したがって、両者は「5日」という時間範囲を扱っていても同じ指標ではありません。
本インジケーターは、直近数営業日において価格が平均的にどの水準に滞在していたかを連続的に表現することを目的としています。
制約・注意事項
計算結果は以下の要因によって変化する場合があります。
銘柄ごとの取引時間
Regular / All の選択
祝日や短縮取引
TradingView側で利用可能な1分足履歴
表示しているチャート時間足
十分な1分足履歴が存在しない場合、通常のセッション長および完全なローリング期間を計算できるまでSMAが表示されない場合があります。
また、本インジケーターは将来の価格を予測するものではなく、売買結果を保証するものでもありません。価格構造、支持抵抗、出来高、リスク管理など、他の分析と組み合わせて使用してください。 Индикатор

SHM - Dual-WMA Momentum OscillatorSHM - Dual-WMA Momentum Oscillator
Overview-
The SHM Dual-WMA Momentum Oscillator (DWO) is an institutional-grade momentum indicator engineered to isolate structural trend direction, momentum acceleration, and high-probability market cycles across custom timeframes.
By calculating the percentage distance between a Fast WMA and a Slow WMA, the DWO filters out transient market noise and locks calculation logic to a customizable higher timeframe wave—allowing you to project and track macro momentum seamlessly across every chart resolution.
Key Features & Architecture-
* Flexible Multi-Timeframe (MTF) Engine: Complete control over your anchor timeframe (Anchor Momentum Timeframe). Choose your preferred momentum wave (e.g., 4H, Daily/24H, 3D, Weekly) and lock it to display consistently across all timeframes without repainting or distortion.
* Universal Timeframe Visibility: Lock your preferred anchor to the 4-Hour wave, and that 4H momentum wave stays strictly visible whether you zoom down to a 15-minute execution chart or step up to inspect the Daily or Weekly macro chart.
* Structural Trend Isolation: Eliminates short-term volatility, revealing where higher-timeframe capital flow is actually moving.
* Triple Equilibrium Baselines: Features customizable numeric anchor points (+33, 0, -33) paired with dynamic 4-color momentum acceleration histograms to easily spot expansion, exhaustion, and mean-reversion zones.
* Signal Tracking Line: Integrates an EMA-smoothed signal tracking line to highlight momentum crossovers and zero-line baseline retests cleanly.
How to Use for Analysis-
1. Selecting Your Anchor Timeframe:
* Set the Anchor Momentum Timeframe in the settings input to your preferred cycle (e.g., 240 for 4H execution, 1440 for Daily macro, or 1W for high-timeframe positioning).
2. Determining Trend Bias:
* DWO Line Above Zero Baseline: The selected anchor wave is structurally bullish. Intraday pullbacks act as buying liquidity within the broader trend.
* DWO Line Below Zero Baseline: The selected anchor wave is structurally bearish. Intraday bounces act as counter-trend rallies.
3. Equilibrium Acceleration Histograms:
* Green / Teal Histograms: Positive momentum acceleration relative to your selected anchor timeframe.
* Red / Dark Red Histograms: Negative momentum acceleration relative to your selected anchor timeframe.
Inputs & Settings-
* Anchor Momentum Timeframe (Default: 24H / 1440): Selects the timeframe wave to project across all charts (supports 1m up to 1W).
* Fast WMA Lookback (Default: 65): Controls the sensitivity of the primary signal curve.
* Slow WMA Lookback (Default: 480): Establishes the baseline filter for long-term trend isolation.
* Signal Smoothing Line (Default: 63): Adjusts the sensitivity of the EMA signal tracking curve.
* Triple Baseline Configuration: Sets the Y-axis levels for upper (+33), zero (0), and lower (-33) histograms.
Disclaimer
This script is designed for educational, informational, and analytical charting purposes only. It does not constitute financial or trading advice. Always perform independent analysis and practice strict risk management.
Индикатор

Dual Shock SPMA | NAL1. Overview
Dual Shock SPMA | NAL is a dual-memory trend indicator designed to separately track how significant bullish and bearish price shocks are developing through time.
Unlike the standard Shock Percentile Moving Average, the Dual Shock SPMA maintains two independent adaptive baselines. Positive shocks update the Bull Shock SPMA, while negative shocks update the Bear Shock SPMA.
This creates two separate memories of where statistically stronger directional moves have occurred, allowing the indicator to evaluate the relationship between bullish and bearish shock structure rather than treating all large movements as one stream.
2. Calculation
The indicator begins by calculating the percentage return of the selected source and ranking the absolute magnitude of that return against recent history.
Ret = not na(source ) ? (source - source ) / math.max(math.abs(source ), syminfo.mintick) : 0.0
ShockRank = ta.percentrank(math.abs(Ret), percentrank_lookback)
Because the percentile calculation uses the absolute return, bullish and bearish shocks are ranked against the same magnitude distribution.
The direction of the return then determines which baseline is allowed to update.
BullGate = Ret > 0.0 and not na(ShockRank) and ShockRank > percentile_gate
BearGate = Ret < 0.0 and not na(ShockRank) and ShockRank > percentile_gate
A qualifying positive shock updates only the Bull Shock SPMA. A qualifying negative shock updates only the Bear Shock SPMA. Otherwise, each baseline retains its previous value.
BullMA := na(BullMA ) ? emaValue : BullGate ? emaValue : BullMA
BearMA := na(BearMA ) ? emaValue : BearGate ? emaValue : BearMA
Each shock stream then maintains its own directional memory.
A rising Bull SPMA means significant positive shocks are occurring at progressively higher price levels. A rising Bear SPMA means significant negative shocks are also occurring at progressively higher levels. The inverse applies when either baseline is declining.
BullTrend := BullSPMA > BullSPMA ? 1 : BullSPMA < BullSPMA ? -1 : nz(BullTrend , 0)
BearTrend := BearSPMA > BearSPMA ? 1 : BearSPMA < BearSPMA ? -1 : nz(BearTrend , 0)
The final state requires agreement between both shock memories.
For a bullish regime, both baselines must be trending upward and the Bull SPMA must remain above the Bear SPMA. For a bearish regime, both must be trending downward and their ordering must reverse.
An optional midpoint gate can additionally require price to remain aligned with the center of the dual-shock structure.
ShockMid = math.avg(BullSPMA, BearSPMA)
Long = BullTrend == 1 and BearTrend == 1 and (not UseMidGate or close > ShockMid) and BullSPMA > BearSPMA
Short = BearTrend == -1 and BullTrend == -1 and (not UseMidGate or close < ShockMid) and BullSPMA < BearSPMA
3. Key Features
Separate bullish and bearish shock-memory baselines.
Absolute-return percentile ranking for directly comparable shock magnitude.
Event-driven updates restricted to statistically stronger price movements.
Independent directional memory for positive and negative shocks.
Dual-baseline agreement and relative-position logic.
Optional price midpoint confirmation.
Optional neutral state during unresolved shock structure.
Shock-memory spread visualization and state-based candle coloring.
4. Use
Dual Shock SPMA is designed to analyze how significant positive and negative price events are evolving relative to one another.
Rather than treating volatility as a single undifferentiated stream, the indicator preserves separate memories for each side of the market. This makes the relationship between bullish and bearish shock structure itself part of the signal.
The spread between the two baselines visually represents this evolving relationship, while the midpoint provides a central reference for the combined shock structure.
Dual Shock SPMA is designed as a specialized structural component within a complete strategy framework. Its role is to identify when independently maintained bullish and bearish shock memories begin establishing directional agreement, providing a distinct layer of information about the underlying development of larger price movements.
Индикатор

Индикатор

Structure Participation Matrix [MQLSoftware]OVERVIEW
Structure Participation Matrix turns confirmed structure breaks into auditable records. It shows price-travel and chart-feed participation context, then compares endpoints across frozen score buckets. Each record has four readings, a score, and one delayed observation. It is research, not entries, stops, targets, sizing, execution, or forecasts.
Its distinct contribution is the complete frozen event ledger: strict delayed pivots, four disclosed measurements fixed at the break close, explicit UNSCORED handling, and one outcome check aggregated by frozen bucket. It links structure, participation, and later observation rather than merely combining standard indicators.
CONCEPTS
Strict symmetric pivots require a unique extreme on both sides; ties are rejected. A pivot becomes eligible only after its full right-side delay. A break requires a confirmed close beyond the armed level plus the ATR buffer; a wick alone is not an event.
Four 0-100 components freeze at that close. PATH measures displacement against the leg's total path. CLOSE averages directional close location over its final bars. REL VOL compares average leg volume with a rolling median. BALANCE weights volume by close location. The fixed score is 30% EFF/PATH, 25% CLOSE, 25% RVOL/REL VOL, and 20% BAL/BALANCE, normalized once for displays, buckets, and alerts.
RVOL uses reported or tick volume; BAL is an OHLCV proxy. They are not bid/ask delta, order flow, or a footprint; neither proves participant identity or predicts future behavior. Missing leg volume or bounded history makes an event UNSCORED and excludes it from bucket statistics.
After exactly N confirmed bars, the close is checked once. HELD N means the endpoint is beyond the broken level; FAILED N means it is not. HELD does not mean price stayed beyond the level throughout. The result is fixed.
FEATURES
Confirmed BREAK UP and BREAK DOWN events
Latest-event PATH, CLOSE, VOL, BAL rail
LOW, MODERATE, HIGH, and VERY HIGH score bands
HELD N or FAILED N endpoint checks
Sample-aware count and held-at-N rate by bucket
Break, direction, score-60+, and outcome alerts
HOW TO USE
Start with defaults. Higher Strict Swing Strength gives fewer pivots and a longer delay. Break Buffer sets the required closing distance in ATR units. Maximum Measured Leg Bars bounds history; an older leg remains a visible UNSCORED break.
Read the latest label first. In the rail, PATH describes travel efficiency; CLOSE, final-bar commitment; VOL, relative chart activity versus baseline; and BAL, a directional OHLCV proxy. The score summarizes a frozen event, not an instruction or probability.
The newest event keeps its expanded label and rail. Older events become compact labels; Historical Detailed Rails restores detail. Visual switches and retention affect drawings only, not calculations, counts, or alerts.
The matrix uses events recalculated from the history currently loaded on the chart. Counts and rates change with symbol, timeframe, inputs, or the history boundary. Small buckets remain collecting. HELD N rates are historical endpoint observations, not future estimates.
CONCLUSION
The result is an inspectable break record with transparent measurements, compact history, one timed outcome, and visible data limits. Индикатор

CTT - Position Size Calculator V1.0CTT - Position Size Calculator V1.0 | Risk-Based Position Sizing
Confluence Trading Tools LLC
A chart overlay that calculates exactly how many shares to buy or sell based on your account size, risk tolerance, and stop loss — then draws entry, stop, and R-multiple profit targets directly on the chart. No more mental math, no more spreadsheets, no more guessing.
---
WHAT IT DOES
Enter your account balance and risk percentage. Set a stop loss (manually or let ATR do it). The calculator tells you exactly how many shares to trade so that if you get stopped out, you lose only the amount you chose to risk — nothing more.
---
CORE FEATURES
ATR-BASED STOP LOSS
Toggle between a manual stop price and an automatic ATR-calculated stop. In ATR mode, the stop is placed at entry ± (ATR × multiplier). Configurable ATR length (default 14) and multiplier (default 1.5×). No more eyeballing stop placement.
R-MULTIPLE PROFIT TARGETS
Three configurable profit targets based on your risk distance:
- 1R Target: risk/reward 1:1
- 2R Target: twice your risk distance
- 3R Target: three times your risk distance
Each target shows both the price level and the dollar profit at that level based on your calculated position size.
MAX POSITION CAP
Prevents overconcentration by capping the maximum position size to a percentage of your account (default 25%). When the calculated position exceeds the cap, shares are reduced and the table flags it in orange with the effective risk after capping.
CHART LINES
Entry (solid blue), stop loss (dashed red), and R-multiple targets (dotted green) are drawn directly on the chart with price labels. See exactly where your levels sit relative to price action. Line length is configurable.
LONG / SHORT SUPPORT
Toggle between long and short trades. Stops and targets automatically adjust direction — stop below entry for longs, above for shorts.
INFO TABLE
Compact table showing:
- Risk amount and percentage
- Stop price (with ATR info when in ATR mode)
- Stop distance in dollars and percentage
- Share count (flagged if capped)
- Capital required and percentage of account
- Max cap status
- All three R-multiple target prices with dollar profit
---
HOW TO USE
1. Set your account balance and risk percentage
2. Choose Long or Short
3. Set your stop — either type a manual price or switch to ATR mode
4. Read the table: shares to buy, capital required, and all three profit targets
5. Use the chart lines to visualize your trade setup against price action
---
USAGE NOTES
- Works on any asset class: equities, futures, forex, crypto
- Entry price defaults to the current close — you can also link it to another indicator's output via the source input
- ATR stop mode is recommended for volatile instruments where a fixed stop price doesn't adapt to conditions
- The position cap protects against concentration risk but does NOT override your broker's margin limits
- All calculations update in real time as price moves
---
Confluence Trading Tools LLC
Индикатор

Индикатор

Multi-Timeframe Structure Overlay [ITA]🟠 OVERVIEW
Multi-Timeframe Structure Overlay draws the structure of two higher timeframes
onto the chart you are actually trading.
Most multi-timeframe tools put the answer in a corner table: one hour bullish,
four hour bearish. That tells you the state but not where it sits, and price
does not trade against a table. Here the swing highs and lows those timeframes
are working with become lines on your chart, so you can see how far price is
from the level that would flip them.
Breaks are marked at the price where they happened, not in a corner.
🟠 CONCEPTS
* Higher Timeframe Structure - The swing highs and lows a larger timeframe has
confirmed. They are the levels that decide its direction, and they usually sit
somewhere your own timeframe never draws.
* Break of Structure - A close beyond the last confirmed swing in the direction
the timeframe was already going. Continuation.
* Change of Character - A break in the opposite direction to the previous one.
The first sign that the higher timeframe has turned, and marked separately
because it means something different.
* Bias - Which way each timeframe is currently pointing, based on its last
confirmed break. Shown as a small tag at the right edge rather than a panel.
* Alignment - Both higher timeframes pointing the same way. It has its own
alert, because that is usually the condition people are waiting for.
🟠 FEATURES
🔹 Two higher timeframes at once, each with its own colour, drawn as levels on
your chart rather than listed in a table
🔹 BOS and CHoCH labelled at the price where the break occurred, tagged with
which timeframe produced it
🔹 Bias tags at the right edge, offset from each other so they never overlap
🔹 A warning on the chart if a selected timeframe is lower than the one you are
viewing, instead of quietly drawing values that look plausible and mean nothing
🔹 Alignment alert for when both higher timeframes agree
🔹 Levels are requested with lookahead off and read from confirmed bars only,
so nothing shifts after the fact
🔹 Independent swing sensitivity, applied on each higher timeframe rather than
on your chart
🟠 HOW TO USE
Pick two timeframes above the one you are on. Working a 15 minute chart, one
hour and four hour is the usual pair. On a daily chart, use weekly and monthly.
Read the lines first. A higher timeframe level sitting just above price is the
level that flips its bias, and it is often nowhere near anything your own
timeframe would have drawn.
A CHoCH tag matters more than a BOS tag. Continuation is expected, a change of
character is the first evidence the larger move is turning.
When both bias tags point the same way, the higher timeframes agree. That is
the alignment alert, and it is usually a better filter than either timeframe on
its own.
Swing Lookback controls sensitivity on the higher timeframes. Raise it for
fewer and more significant levels.
🟠 CONCLUSION
Knowing the higher timeframe is bullish is not the same as knowing what price
has to do for that to change. This puts the second thing on the chart, where it
can actually be used. Индикатор

MovTrend Pullback SystemWhat it is: A trend-following 5 minute indicator built around a linear regression trend line ("MovTrend") with ATR-based volatility bands. It generates four distinct signal types, each answering a different question about price action relative to the trend.
Core components
MovTrend Line (MT) — A linear regression line (ta.linreg) plotted over price, colored by direction: green when sloping up, red when sloping down, gray when flat. This is the trend backbone everything else references.
Slope — The MT line's rate of change over a lookback window, plotted as a histogram in the lower pane. Crossing above/below configurable thresholds marks a "confirmed" up or down trend (green/red bars); values between thresholds are a gray "no-trade zone" where the trend isn't strong enough to trust.
ATR Bands — Upper/lower bands plotted around the MT line at a multiple of ATR, representing a "normal" volatility envelope. Price moving outside these bands is considered stretched/overextended relative to the trend.
The four signals
🟢 Buy Dot / 🔴 Sell Dot (Pullback Touch)
Fires when price dips down and touches the MT line during a confirmed uptrend (buy), or pokes up and touches it during a downtrend (sell), then closes back in the trend's favor. This is the core "buy the dip / sell the rip" signal — a shallow pullback to the trend line that holds.
🟡 Stretch Dot (Mean-Reversion Warning)
Fires when price closes outside the ATR bands — i.e., stretched further from the trend line than normal volatility would suggest. Dot size scales with how extreme the stretch is (tiny = mild, small = moderate, orange/normal = extreme), giving you an at-a-glance read on how overextended price is. This isn't a reversal signal on its own — it's a caution flag that price may be due to snap back toward the MT line. It's filtered by:
Volatility regime — suppressed during low-volatility chop, since a "stretch" in dead conditions is less meaningful
FVG confluence — checks if price is near a fair value gap, adding context to the stretch
Volume — requires above-average volume to confirm real participation, not just a thin drift
Slope deceleration — confirms the trend itself is actually losing momentum, not just that price poked outside the band
🔷 Trend Continuation Diamond (cyan up / magenta down)
Fires on a high-volume push with the trend, away from the MT line — meant to catch strong continuation moves the pullback-touch signal misses (since it only fires on touches, not on strength). It's built specifically to avoid firing at exhaustion tops/bottoms by requiring:
Volume that is not the largest in the recent lookback window (avoids climactic blow-off bars)
Slope that's still accelerating, not flattening
A cooldown between diamonds so one strong leg doesn't spam multiple signals
Filters that apply across signals
Session filter — dims the chart and can gate signals outside your configured trading hours, since overnight/thin-liquidity behavior isn't comparable to regular session action
MTF confirmation — optionally requires a higher timeframe's slope to agree before a buy/sell touch fires, filtering out signals that look right locally but fight the bigger picture
Signal conflict resolution — a Trend Continuation diamond won't fire on the same bar as a Buy/Sell touch, avoiding mixed signals
Performance tracking table
How to read it together
The intended workflow: use the MT line + slope histogram to establish trend context, take Buy/Sell touches as primary pullback entries in the direction of that trend, treat Stretch dots as a caution/take-profit signal rather than a new entry, and use Continuation diamonds as confirmation that a trend still has legs when you're already in a position or considering adding. Индикатор

Unicorn Model Unicorn Model
Finds the ICT Unicorn and frames its context. A Unicorn forms where a displacement leaves a Breaker behind and the Fair Value Gap that displacement traded through inverts onto it — the same-direction Inversion FVG overlapping the Breaker is what confirms it. Two arrays reinforcing each other at one price, which ICT teaches as a tight, high-probability zone. This tool detects that overlap, marks the Breaker that qualifies, always shows the inversion FVG that makes it one, tracks the liquidity that engineered it, and keeps the HTF bias and the draw on a clean dashboard. It maps structure. It does not fire trades.
The sequence it looks for
The Unicorn is a confluence, not a standalone trigger. Bullish below; bearish mirrors.
Liquidity is taken — price sweeps a sellside low, engineering the reversal.
A swing is broken — displacement closes through the last swing high. The candles immediately before that leg are left behind as an order block, and it becomes a Breaker only once price later closes back through it, the block failing and flipping exactly as an FVG inverts into an IFVG.
The FVG inverts onto the Breaker — a candle body closes through the gap, so it fails and flips polarity into an Inversion FVG. A Breaker that a same-direction IFVG overlaps IS the Unicorn; with no overlapping IFVG it stays a plain Breaker.
Bias frames it — the model needs a clear higher-timeframe read, so a bullish Unicorn shows in a bullish or discount context and a bearish one in premium.
The draw — engineered liquidity in the direction of bias is the target the setup delivers toward.
Because the Unicorn is only as good as its narrative, bias is first-class: qualification is gated to the HTF read by default, and the dashboard keeps the read, the raid and the draw in front of you.
These are established Inner Circle Trader concepts — the Fair Value Gap, the Breaker, market structure shift, liquidity, the Midnight Open and premium/discount. This script is an original implementation of them, and what makes it its own thing is that it resolves the Breaker and the Inversion FVG that confirms it into a single zone rather than plotting each array in isolation.
What it draws
The Unicorn. When a live same-direction IFVG overlaps a Breaker, that box is relabelled Unicorn + or Unicorn -, drawn in purple or magenta with a distinct dashed border so the setup reads at a glance against the solid-bordered arrays around it. It is confirmed once and holds — it does not flicker bar to bar — and the confirming IFVG is kept alive with it. The two live and die together, so a Unicorn always shows the inversion that makes it one.
The ingredients. Drawn faintly beneath: FVGs in blue for bullish and red for bearish, Breakers in a neutral black, each tagged with the chart timeframe. A gap that sits inside the Unicorn or its inversion hides its own box, so the zone is never buried under the ingredient it is built from. Everything invalidates by candle body only — a wick through a zone never counts. A plain FVG inverts the moment one body closes through it; the Breaker and the inversion take a configurable number of body closes to retire, two by default.
The inversion. When a body closes through an FVG it does not vanish, it inverts — flipping polarity to deliver from the other side. The same-direction inversion overlapping a Breaker is what confirms the Unicorn. It is shaded orange, carries no label because orange reads as IFVG on its own, and sits behind the Unicorn so the zone stays in front.
Liquidity. Swing highs are buyside, swing lows are sellside, plus prior-day and prior-week levels as external-range reference, each anchored to the candle that formed it. The outermost live swing each side is tagged Buyside or Sellside Liquidity; inner swings carry Minor tags; prior-period levels keep a dated one. A level that is also an Asia, London or New York session extreme carries that tag too. Every level is removed the instant it is taken — no dotted stub, no lingering line — and an un-taken level that price trends a full range past without returning also clears. Tags that share a price merge into one rather than stacking.
Midnight Open. The 00:00 New York open, a core daily reference and a bias input. Below it leans bullish, above it leans bearish.
The draw. The target the setup delivers toward. It stays hidden until a Unicorn has set up AND its setup-side liquidity has been swept; only then is the opposing draw tagged on that level. That ordering is deliberate — the marker can never read as a standalone entry signal.
Dashboard
HTF bias, bullish or bearish or mixed, auto or manual. Whether a Unicorn is live and which way, falling back to the last one's direction rather than a bare dash. Which side of liquidity was most recently raided. The current draw with its price. Prior-day high and low, tracked even when the lines are hidden. Price against the Midnight Open. And where price sits in the dealing range, discount or premium against the equilibrium.
Reading it in practice
Trade with the dashboard bias. A Unicorn marks the Breaker whose overlapping inversion FVG makes it one; the orange IFVG shows the imbalance it sits within. ICT guidance waits for price to tap the FVG side, places the stop beyond the combined Breaker and FVG extreme — whichever is furthest — and targets the engineered liquidity the draw tag names. A gap left open below a bullish Unicorn range is intended: it shows intent and speed, and is not meant to be filled.
Method and repainting
All detection evaluates on closed bars. Swings, the structure break, the Breaker flip, the FVGs, the inversion and the Unicorn overlap are confirmed on candle close, never intrabar. Once a Unicorn is confirmed it is locked — it does not re-evaluate or flip state bar to bar — and invalidation counts only confirmed body closes, so an in-progress candle, wick included, never removes it. The Midnight Open fixes on its forming bar, and every level anchors to the candle that formed it.
Live zones and levels extend to the right edge for readability. That projection is cosmetic and changes no confirmed level, tap or raid.
Settings
Session timezone, right-side offset and label sizes. Bias mode and whether Unicorns are gated to it. Pivot strength. Liquidity display, per-side level caps, prior day and week levels with their lookbacks, and the raid-relevance window. Session tagging and the three session windows. FVG minimum height and displacement size, both in ATR, the declutter, the cap on live gaps, the framing IFVG, and how many body closes retire a zone. Unicorn colours. Dashboard position, including middle right, and text size.
Analytics only
This is a decision-support tool for discretionary ICT study. It maps zones, structure and context. It contains no alerts and no buy or sell signals, and it does not tell you when to enter or exit. The draw marker is a text label that appears only after a Unicorn has set up and liquidity has been swept, pointing at a liquidity target — not a trade instruction.
Disclaimer
This is a decision-support tool for discretionary ICT trading. It is not financial advice, and no market's past behaviour is indicative of future results. Индикатор

Edo Premium DiscountEdo Premium Discount — Splits the Dealing Range into Premium, Equilibrium and Discount Zones with a Live Position Reading
Inside the range price moves in, where you enter is not neutral. Buying near the low of the range — in discount — offers a far better risk/reward than buying near the high — in premium. Institutional money accumulates cheap and distributes expensive, and trading with that logic rather than against it is one of the simplest structural edges to add. Edo Premium Discount turns that principle into a direct visual tool: it takes the current dealing range and answers, at all times, one question — is price trading expensive or cheap relative to the range it sits in?
The indicator builds the dealing range from the latest confirmed swing high and swing low, splits it into three zones, and reads where price sits within it. Premium is the expensive upper half (the sell side), discount is the cheap lower half (the buy side), and equilibrium is the fair-value band around the 50% midpoint. Everything is built on confirmed swings, so the indicator does not repaint. It is the relative-value frame of the Edolab structure family, the canvas on which to place liquidity, order blocks and the rest of the read.
THE DEALING RANGE
The range is the foundation: without a reference high and low, there is no premium or discount to measure. The indicator defines it with the most recent confirmed pivots — the last swing high as the range high and the last swing low as the range low. When price breaks out and forms new swings, the range updates to the new leg. The Swing Profile sets the sensitivity of those pivots: Scalper (5 bars each side) for short, reactive ranges on low timeframes, Swing (10 bars, the default) for the balanced 4H and daily read, and Long Term (21 bars) for the major ranges on weekly and higher horizons. The zones extend a configurable number of bars to the right so they project over the forming candles.
THE THREE ZONES
Splitting the range at its midpoint, the indicator draws three zones. Premium: the upper portion, above the equilibrium band, shaded red — price is trading expensive, the zone where sells are sought. Discount: the lower portion, below the equilibrium band, shaded teal — price is trading cheap, the zone where buys are sought. Equilibrium: the central band around the exact 50% midpoint, shaded neutral grey, with a dashed line marking the 50% level — fair value, neutral territory where neither side has a clear location edge. The Equilibrium Band input sets the half-width of that central band as a percentage of the range (5% by default, giving a 45%–55% band); widen it to enlarge the neutral zone, narrow it to expand the two operative zones.
POSITION AND ZONE STATE
On every bar the indicator classifies the close into one of the three zones — Premium above the equilibrium band, Discount below it, Equilibrium inside it — and reads its Position: how high the close sits in the range as a percentage, where 0% is the range low, 100% the range high and 50% the midpoint. The percentage refines the zone read: premium at 55% (just across the midpoint) is a very different proposition from premium at 95% (at the edge of the range high). The state shows in the panel's Zone cell in its colour and fires the matching alert when price enters each zone.
INFORMATION PANEL
The panel condenses the value read into a compact table: the current Zone (PREMIUM / EQUILIBRIUM / DISCOUNT) in its colour, the Position in percent, and the Range High and Range Low levels. It 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
The range is built on confirmed pivots: the range high and low only change when a new swing is confirmed, not during the forming candle, so the zones do not shift intrabar. There are no higher-timeframe functions — all logic runs on the current chart timeframe.
CONFIGURATION
The inputs are grouped by block. Range sets the swing profile, the equilibrium band as a percentage of the range and how many bars the zones extend to the right. Style exposes the premium, discount and equilibrium colours, the zone opacity 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, to size the range to their horizon, and the Equilibrium Band, to set the width of the neutral zone.
ALERTS
Three predefined alerts cover the zone changes: Price entered Premium fires when the close enters the premium zone, Price entered Discount when it enters the discount zone, and Price entered Equilibrium when it returns to the fair-value band. The discount alert flags when price reaches the cheap half of the range — where buys are sought — and the premium alert when it reaches the expensive half. All alerts fire on bar close, consistent with the indicator's anti-repaint validation.
HOW TO READ IT
The most direct use is location: seek buys when price is in discount and sells when it is in premium, not the other way around — not a signal in itself, but a filter that grades trades by their risk/reward, since a buy in deep discount starts from a far more favourable zone than a buy in premium. Watch the extremes: a Position near 0% or 100% means price is at an edge of the range, and inside a range price tends to revert toward equilibrium, so an extreme reading warns that pushing further from fair value starts from a high-risk zone. Use equilibrium as a hinge: price reclaiming equilibrium from discount, or losing it from premium, marks a change of value half worth watching. And trade in confluence: a liquidity sweep or a quality order block in discount is a far stronger buy reference than the same signal in premium — Edo Premium Discount provides the value frame on which to place the rest of the structure.
OPEN SOURCE
Edo Premium Discount 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, all 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.
Индикатор

Pattern Atlas: Candlestick Indicator [AxeAlgo]Pattern Atlas: Candlestick Indicator
Companion indicator to Pattern Atlas : Candlestick (Library #1 of the AxeAlgo Pattern Atlas)
WHAT THIS INDICATOR IS
This is a complete candlestick pattern scanner built on top of the Pattern Atlas : Candlestick library — 23 classical candlestick patterns, detected on every bar and turned into on-chart highlighting, a live scanner table, and alerts. It doesn't implement any pattern math itself; every detection is delegated to the library's detect*() functions, so what you see here is exactly what that library finds, with nothing added or reinterpreted.
Candlestick reading is one of the oldest tools in technical analysis, tracing back to Steve Nison's work bringing Japanese candlestick charting to Western traders. The 23 patterns here follow that standard catalog (cross-checked against TA-Lib's CDL* function list), so anyone who already knows what a Morning Star or a Bullish Engulfing bar looks like will recognize exactly what's being flagged.
THE 23 PATTERNS IT SCANS
Single-bar patterns (9): Doji, Long-Legged Doji, Dragonfly Doji, Gravestone Doji, Hammer / Hanging Man, Inverted Hammer / Shooting Star, Marubozu, Spinning Top, Belt Hold.
Two-bar patterns (6): Engulfing, Harami, Harami Cross, Piercing Line / Dark Cloud Cover, Tweezer Top / Bottom, Kicker.
Three-bar-and-longer patterns (8): Morning / Evening Star, Morning / Evening Doji Star, Three Soldiers / Crows, Three Inside Up / Down, Three Outside Up / Down, Abandoned Baby, Rising / Falling Three Methods (the one pattern spanning 5 bars), Stick Sandwich.
READING THE CHART
Each matched pattern gets a box drawn around the exact bars it spans, colored gold for bullish, pale gold-white for bearish, and bright gold for neutral (indecision) patterns — colors are user-configurable. On top of that, a "pin" marker appears at the bar: bullish pins hang below the bar, bearish pins sit above it, and neutral patterns get a plain floating gem with no stem, since indecision doesn't have a direction to anchor to. Hovering any pin or gem shows the full description of everything that matched on that bar, including a measured strength percentage for each one — not just the pattern name repeated back at you.
Strength is a generic, direction-based read on how decisively the bar closed within its own high-low range (near the high for a bullish match, near the low for a bearish one, or a small body relative to the range for a neutral one) — a rough, pattern-agnostic proxy, not a bespoke ratio breakdown per pattern, since that level of internal detail isn't something the library exposes.
THE SCANNER TABLE
A table lists all 23 patterns grouped by category, with a live status column showing each one's current match percentage (or a dash when nothing's matching on the current bar). Position, text size, and whether it's shown at all are all configurable. This table is intentionally live — it reflects the forming bar in real time rather than waiting for the bar to close, since it's meant as a "what's happening right now" readout rather than a persisted signal.
FILTERS AND SETTINGS
Every pattern has its own on/off checkbox, and each of the three categories (Single-Bar, Two-Bar, Three-Bar+) has a master switch above its checkboxes to turn the whole group off in one click.
Three additional filters are available, all off by default so the scanner stays an unbiased detector unless you opt in:
- Volume confirmation — requires a match to occur on at least a chosen multiple of its own trailing average volume before it counts.
- Trend context — requires bullish matches to occur against a downtrend and bearish matches against an uptrend (the classical reading that a reversal candle means more against the trend it's reversing than in the middle of a random chop). Neutral patterns are never filtered by this, since they don't imply a direction.
- Minimum strength — hides matches below a chosen strength percentage.
These filters affect what's drawn on the chart and what feeds the pin/gem tooltips. They do not affect the scanner table, which always shows the library's raw, unfiltered read of the current bar, and they do not affect the per-pattern alerts described below, which fire independently of the visual display settings.
ALERTS
Every pattern has its own alert condition available in TradingView's Create Alert dialog, plus three combined conditions (any bullish pattern, any bearish pattern, any neutral pattern), plus one dynamic alert with a full message listing every pattern that matched, grouped by direction, with each one's measured description and strength.
A NOTE ON REPAINTING
Every box, pin, gem, and alert is gated on the bar actually having closed — nothing here fires or gets drawn off a still-forming bar, regardless of your alert-frequency setting in TradingView's dialog. The one exception is the scanner table, which is deliberately live so it can answer "what's happening on this bar right now" — that's a readout, not a persisted signal, and it's expected to change as the current bar develops.
PART OF A LARGER SERIES
This indicator is the companion to Library #1 of the AxeAlgo Pattern Atlas — a planned set of Pine libraries splitting pattern detection by the method actually used to find each kind of pattern: candlestick shape (this one), classical chart/geometric patterns (Library #2), harmonic Fibonacci-ratio patterns (Library #3), and market-structure concepts (order blocks, liquidity, Wyckoff-style events). Each library has, or will have, its own companion scanner indicator built the same way this one is.
DISCLAIMER
This indicator is a technical analysis tool for identifying classical candlestick shapes in historical and live price data. It does not predict future price movement, and a detected pattern — including its measured strength — is a description of past price action, not a signal guaranteed to repeat. Nothing in this script constitutes financial advice. Always combine pattern recognition with your own risk management and broader analysis before making any trading decision.
Индикатор

STOC - Moving Average Trend & SignalsSTOC – Moving Average Trend & Signals is a trend-following indicator designed to simplify moving-average analysis using four widely followed averages:
• 10 EMA – Short-term momentum
• 20 EMA – Short/intermediate trend
• 50 SMA – Intermediate trend
• 200 SMA – Long-term market structure
The indicator combines price position, moving-average direction and MA alignment to identify potential entries, exits and broader trend conditions.
SIGNAL MODES
1. MA Stack
A Buy signal occurs when the averages newly align in bullish order:
10 EMA > 20 EMA > 50 SMA > 200 SMA
The standard exit occurs when this bullish alignment breaks.
2. Price vs MA
A Buy signal occurs when price crosses above the selected signal MA. The standard exit occurs when price crosses below it.
The selectable signal averages are:
• 10 EMA
• 20 EMA
• 50 SMA
• 200 SMA
3. Fast/Slow Crossover
A Buy signal occurs when the 10 EMA crosses above the 20 EMA. The standard exit occurs when the 10 EMA crosses below the 20 EMA.
EXIT METHODS
1. MA Signal Exit
Uses the corresponding exit condition of the selected signal mode.
2. ATR Trailing Exit
Replaces the standard MA exit with a volatility-adjusted trailing stop. The ATR stop follows the highest price reached after entry and never moves downward during an active trade.
The ATR exit is confirmed only when a candle closes below the trailing stop. Intrabar touches do not trigger an exit.
OPTIONAL FILTERS
• Moving-average slope confirmation
• Volume confirmation
• Minimum separation between the 10 EMA and 200 SMA
• Bar-close signal confirmation
• Flat or choppy market filter
DASHBOARD
The high-contrast dashboard is designed to remain visible on both light and dark chart themes. It displays:
• Current market trend
• Moving-average alignment
• Selected signal MA
• Price position
• MA direction
• Active exit method
• Current ATR stop
• Volume-filter status
• Current trade status
VISUAL FEATURES
• Individually configurable moving-average plots
• Buy and Exit labels
• Bullish and bearish trend backgrounds
• Optional ATR trailing-stop line
• Adjustable dashboard position and size
ALERTS
Alert conditions are included for:
• Buy signals
• All exit signals
• MA-based exits
• ATR trailing exits
• Beginning of a strong uptrend
• Beginning of a strong downtrend
For more reliable live alerts, keep “Confirm Signals on Bar Close” enabled and select “Once Per Bar Close” when creating the TradingView alert.
SUGGESTED USE
The indicator can be used across stocks, indices, futures, forex and cryptocurrencies. Higher timeframes such as 4-hour, daily and weekly charts generally provide cleaner trend signals, while lower timeframes may generate more frequent signals and market noise.
This indicator is a trend-following decision-support tool. It does not predict future prices or guarantee profitable trades. Signals should be combined with appropriate position sizing, risk management, support and resistance analysis, and independent market evaluation. Индикатор

Pivot Channel Breakouts█ OVERVIEW
Pivot Channel Breakouts is an adaptive market-structure indicator. It automatically builds a sloped channel from confirmed High and Low pivots, checks the geometry of the formation, and marks a breakout only when the close moves beyond the channel by a minimum ATR margin.
After a breakout the channel is moved into history, and an optional TP/SL module draws Entry, Stop Loss and up to three Risk:Reward targets. The indicator can be used both to read structure and to plan a potential trade after the breakout.
█ CONCEPTS
The indicator automatically detects pivots and builds the widest possible price channel that still contains all remaining points and candle closes. The goal is to recognize channel formations quickly without drawing the lines by hand.
Pivot-Based Channel Structure
The channel has two independent boundaries:
- Resistance — the upper line from High pivots.
- Support — the lower line from Low pivots.
The channel is drawn only when both sides of the buffer hold the required number of pivots. With the default setting that means at least two High pivots and two Low pivots. Until one side is incomplete, no formation is created.
Each boundary needs at least two pivots. With more points the indicator does not require collinearity. It searches pairs and keeps the pair with the greatest span, provided the remaining pivots and the candle closes stay on the correct side of the line. The first two pivots of the formation must be opposite — one High and one Low — so the channel starts from an alternating structure rather than two extremes of the same side. Envelope fit describes the price structure, not a perfect straight line through every point.
Pivot Detection
Pivot Left is the number of bars before the extreme, Pivot Right is the number of bars after it required for confirmation. Smaller values detect more local turns, larger values produce fewer and usually more significant pivots. A pivot is confirmed only after Pivot Right bars, so detection has a built-in delay.
Pivot Count
This parameter sets how many of the most recent High and Low pivots are kept in the buffer. A value of 2 builds a segment through two points on each side. Higher values increase selectivity: a line is created only when a pair meeting the structural rules can be found. The channel does not appear until both sides have collected the same required number of pivots.
Pivot Age and Channel Width
Max Pivot Age removes old points so a fresh pivot is not paired with a stale extreme. Minimum Channel Width rejects formations that are too short and accidental.
Dynamic Channel Adjustment
Until a confirmed breakout, a wick can bend the active boundary toward the new extreme. A temporary wick pierce does not end the channel. A breakout still requires a close beyond the line with an ATR margin.
ATR-Based Breakout and Close-Based Confirmation
A breakout is valid on the close only:
- above resistance + ATR × multiplier — long,
- below support − ATR × multiplier — short.
A wick alone does not generate a signal. The threshold scales with volatility: a higher multiplier cuts false breakouts, a lower one produces more signals.
Channel History and Pivot Reset
After a breakout the active channel is cut at the breakout bar and moved into history. Max Channels Shown limits how many old formations remain on the chart.
Reset Pivots on Breakout off: the next channel can form immediately from a mix of old and new pivots. On: both buffers are cleared and a completely new set of points must be collected.
TP/SL Framework
Each new breakout can draw:
- Entry — the close of the breakout candle,
- SL — ATR × multiplier or a fixed percent from entry,
- TP1 / TP2 / TP3 — targets as multiples of the Entry–SL distance (RR).
The layout moves with the chart and is closed when price hits SL or the farthest enabled TP.
█ FEATURES
General
- Max channels shown (history) — how many completed channels stay on the chart. Older ones are removed after the limit is exceeded.
Pivots
- Pivot Left / Pivot Right — sensitivity and confirmation delay of pivot detection.
- Pivots required to define a line — number of points in the buffer (2–6) on each side. The channel appears only after that many High pivots and that many Low pivots have been collected.
- Max pivot age (bars) — maximum age of a point.
- Minimum channel width (bars) — minimum length of the formation.
- Line extension to the right (bars) — visual extension of the lines to the right only; it does not affect detection.
Breakout
- ATR Period — ATR length used for the minimum breakout size.
- Minimum breakout size (x ATR), close only — required distance beyond the line on the close.
- Reset pivots on breakout — clears the buffers after a signal.
Appearance
- Resistance / Support Color — boundary colors.
- Trend line transparency — transparency of the channel lines.
- Channel fill color + Fill transparency — fill between the boundaries.
- Show breakout signals — triangles below/above the bar.
- Show dots on pivots — markers on every newly confirmed pivot.
- Dot color — resistance / support pivots.
TP/SL
- Show TP/SL Levels — enables the full layout.
- SL = ATR — SL from ATR or from a percentage.
- ATR Period (TP/SL) — separate ATR for the targets.
- ATR Multiplier for SL / SL % from Entry.
- RR for TP1 / TP2 / TP3.
TP/SL Display
- Show SL / TP1 / TP2 / TP3 Level — independent display of each level and its label.
█ APPLICATIONS
Channel Structure Analysis
Automatic drawing of sloped boundaries instead of connecting pivots by hand. Useful in trends, pullbacks and periods when price respects two parallel or near-parallel edges.
Breakout Confirmation
A triangle marks a close outside the channel with an ATR filter, not a mere line pierce. It is a starting point for further analysis of direction, momentum and context — not a standalone entry signal.
Risk/Reward Planning
After a breakout, Entry, SL and three targets are visible at once. SL can be based on volatility (ATR) or on a fixed percentage.
█ NOTES
- Larger Pivot Left/Right values mean slower, more selective detection.
- The signal is close-only; a wick can only bend the line.
- The breakout threshold scales with ATR.
- After a breakout the channel is archived; the pivot reset setting decides whether the next formation starts from scratch.
- TP/SL is visual R:R planning, not an assessment of trade quality. Индикатор
