P-MSB-OB PRO AUTO MTF (2026)Original indicator created by Emre KB (@EmreKb).
This version has been enhanced and further developed by with additional box management, mitigation, alert, and automatic multi-timeframe features.
The original source code is licensed under the Mozilla Public License 2.0 (MPL-2.0).
Original author credit is preserved: © EmreKb / Emre KB.
Description
Market Structure Break & Order Block PRO Auto MTF is a market structure and order block indicator designed to identify potential institutional supply and demand areas.
The indicator detects market structure shifts and creates:
Bullish Order Blocks — Bu-OB
Bearish Order Blocks — Be-OB
Bullish Breaker Blocks — Bu-BB
Bearish Breaker Blocks — Be-BB
Bullish Mitigation Blocks — Bu-MB
Bearish Mitigation Blocks — Be-MB
Market Structure Breaks — MSB
Automatic Multi-Timeframe Order Blocks — MTF OB
This enhanced version adds a cleaner and more practical workflow for traders who use top-down analysis.
Main Features
1. Market Structure Break Detection
The indicator detects bullish and bearish market structure breaks.
Bullish MSB: Indicates a possible bullish shift in market structure.
Bearish MSB: Indicates a possible bearish shift in market structure.
MSB levels can be displayed or hidden from the settings.
2. Bullish and Bearish Order Blocks
The script automatically marks potential order block zones:
Bu-OB: Bullish Order Block
Be-OB: Bearish Order Block
These zones may act as possible support or resistance areas when price returns to them.
3. Breaker Blocks and Mitigation Blocks
The indicator can also display additional structure-based zones:
Bu-BB: Bullish Breaker Block
Be-BB: Bearish Breaker Block
Bu-MB: Bullish Mitigation Block
Be-MB: Bearish Mitigation Block
Each group can be independently enabled or disabled to keep the chart clean.
4. 50% Midline Inside Every Box
Every displayed box can include a dashed 50% midpoint line.
This midpoint can be used as:
A potential refined entry area
A reaction level inside the zone
A partial entry reference
A premium/discount reference within the order block
The midpoint line can be hidden from the settings if a cleaner chart is preferred.
5. Close or Wick Mitigation Method
The user can select how an order block is considered invalidated.
Close Mitigation
The box is mitigated only when the candle closes beyond the box boundary.
Wick Mitigation
The box is mitigated when the candle wick crosses beyond the box boundary.
This allows the indicator to be adapted to different trading styles.
6. Maximum Active Box Limit
To prevent chart clutter and PulseWire object-limit issues, the indicator includes:
Maximum active box limit per category
Maximum active MTF box limit
Automatic removal of the oldest boxes when the limit is exceeded
Safe deletion of the box and its related midpoint line together
This makes the script more stable when used on long historical charts.
Automatic Multi-Timeframe Order Blocks
The indicator includes an Auto MTF system.
When Auto MTF is enabled, the script automatically selects a higher timeframe according to the current chart timeframe.
Current Chart Timeframe Automatic MTF Timeframe
1–5 minutes 1 Hour
15–30 minutes 4 Hours
45 minutes–4 Hours Daily
Daily Weekly
Weekly Monthly
Monthly 3 Months
3 Months and above 12 Months
Daily chart → Weekly MTF Order Blocks
Weekly chart → Monthly MTF Order Blocks
4H chart → Daily MTF Order Blocks
15m chart → 4H MTF Order Blocks
If Auto MTF is disabled, the user can select a custom timeframe manually.
How to Use
Clean Daily Chart Setup
For a clean and practical daily-chart layout:
Example Long Scenario
A possible long setup may follow this sequence:
Price enters a Weekly MTF Bullish Order Block.
Price also reacts from a Daily Bullish Order Block.
A bullish Market Structure Break appears.
Move to a lower timeframe, such as 4H or 1H.
Wait for a bullish MSB and a fresh Bullish Order Block.
Consider an entry on a retest of the lower-timeframe Bullish Order Block.
Place the stop-loss below the relevant order block low.
Target previous highs, liquidity levels, or a Bearish Order Block.
Example structure:
Weekly Bu-OB
→ Daily Bu-OB
→ 4H Bullish MSB
→ 4H Bu-OB retest
→ Potential long setup
Example Short Scenario
A possible short setup may follow this sequence:
Price enters a Weekly MTF Bearish Order Block.
Price reacts from a Daily Bearish Order Block.
A bearish Market Structure Break appears.
Move to a lower timeframe, such as 4H or 1H.
Wait for a bearish MSB and a fresh Bearish Order Block.
Consider an entry on a retest of the lower-timeframe Bearish Order Block.
Place the stop-loss above the relevant order block high.
Target previous lows, liquidity levels, or a Bullish Order Block.
Example structure:
Weekly Be-OB
→ Daily Be-OB
→ 4H Bearish MSB
→ 4H Be-OB retest
→ Potential short setup
Alerts
The indicator provides alert conditions for:
Bullish Market Structure Break
Bearish Market Structure Break
New Bullish Order Block
New Bearish Order Block
New Breaker Block
New Mitigation Block
Price entering Bullish / Bearish OB zones
Price entering MTF Bullish / Bearish OB zones
Order Block mitigation or invalidation
New Multi-Timeframe Bullish / Bearish Order Block
Important Notes
Order Blocks and market structure zones are analytical tools, not guaranteed trading signals.
Multi-timeframe pivot-based zones require confirmation before they appear.
Use risk management, stop-loss protection, and position sizing.
It is recommended to combine this tool with trend analysis, market context, volume, liquidity, and higher-timeframe levels.
This script is intended for educational and analytical purposes only and is not financial advice.
Türkçe
Market Structure Break & Order Block PRO Auto MTF; potansiyel kurumsal arz-talep bölgelerini belirlemek için tasarlanmış bir piyasa yapısı ve order block indikatörüdür.
İndikatör, piyasa yapısındaki değişimleri takip eder ve aşağıdaki bölgeleri oluşturur:
Bullish Order Block — Bu-OB
Bearish Order Block — Be-OB
Bullish Breaker Block — Bu-BB
Bearish Breaker Block — Be-BB
Bullish Mitigation Block — Bu-MB
Bearish Mitigation Block — Be-MB
Market Structure Break — MSB
Otomatik Çoklu Zaman Dilimi Order Block — MTF OB
Bu geliştirilmiş sürüm, üst zaman dilimi analizi yapan yatırımcılar için daha temiz, kontrollü ve pratik bir kullanım sunar.
Ana Özellikler
1. Market Structure Break — MSB Algılama
İndikatör bullish ve bearish piyasa yapısı kırılımlarını tespit eder.
Bullish MSB: Olası yükseliş yönlü piyasa yapısı değişimini gösterir.
Bearish MSB: Olası düşüş yönlü piyasa yapısı değişimini gösterir.
MSB seviyeleri ayarlardan açılıp kapatılabilir.
2. Bullish ve Bearish Order Block Bölgeleri
İndikatör otomatik olarak olası order block bölgelerini işaretler:
Bu-OB: Bullish Order Block
Be-OB: Bearish Order Block
Bu bölgeler, fiyat tekrar ziyaret ettiğinde olası destek veya direnç alanları olarak kullanılabilir.
3. Breaker Block ve Mitigation Block Bölgeleri
İndikatör, ek piyasa yapısı bölgelerini de gösterebilir:
Bu-BB: Bullish Breaker Block
Be-BB: Bearish Breaker Block
Bu-MB: Bullish Mitigation Block
Be-MB: Bearish Mitigation Block
Her kutu grubu ayarlardan ayrı ayrı açılıp kapatılabilir. Böylece grafik daha sade tutulabilir.
4. Kutular İçinde %50 Orta Çizgi
Gösterilen her kutuya isteğe bağlı olarak kesikli bir %50 orta çizgi eklenebilir.
Bu orta çizgi aşağıdaki amaçlarla kullanılabilir:
Daha hassas giriş bölgesi belirlemek
Kutu içerisindeki reaksiyon seviyesini izlemek
Kademeli giriş seviyesi olarak kullanmak
Order block içinde premium / discount alanını değerlendirmek
Grafiği sade tutmak isterseniz orta çizgiler ayarlardan kapatılabilir.
5. Close veya Wick Mitigation Seçeneği
Kullanıcı, bir order block bölgesinin hangi koşulda geçersiz kabul edileceğini seçebilir.
Close Mitigation
Mum kapanışı kutunun sınırının dışına çıktığında bölge mitigate/geçersiz kabul edilir.
Wick Mitigation
Mum fitili kutunun sınırının dışına geçtiğinde bölge mitigate/geçersiz kabul edilir.
Bu özellik, indikatörün farklı işlem stillerine uyarlanmasını sağlar.
6. Maksimum Aktif Kutu Limiti
Grafik karmaşasını ve PulseWire nesne limitleri sorununu azaltmak için indikatörde aşağıdaki özellikler bulunur:
Her kutu türü için maksimum aktif kutu limiti
MTF kutuları için ayrı maksimum aktif kutu limiti
Limit aşıldığında en eski kutuların otomatik silinmesi
Kutu silindiğinde ona bağlı orta çizginin de güvenli biçimde silinmesi
Bu yapı, indikatörün uzun geçmiş verilerinde daha stabil çalışmasına yardımcı olur.
Otomatik Multi-Timeframe Order Block — Auto MTF
İndikatör, Auto MTF özelliğine sahiptir.
Auto MTF etkinleştirildiğinde indikatör, bulunduğunuz grafik zaman dilimine göre otomatik olarak daha yüksek bir zaman dilimi seçer.
Mevcut Grafik Zaman Dilimi Otomatik MTF Zaman Dilimi
1–5 dakika 1 Saat
15–30 dakika 4 Saat
45 dakika–4 saat Günlük
Günlük Haftalık
Haftalık Aylık
Aylık 3 Aylık
3 Aylık ve üzeri 12 Aylık
Örnekler:
text
Günlük grafik → Haftalık MTF Order Block
Haftalık grafik → Aylık MTF Order Block
4 saatlik grafik → Günlük MTF Order Block
15 dakikalık grafik → 4 saatlik MTF Order Block
Auto MTF kapatılırsa kullanıcı istediği zaman dilimini manuel olarak seçebilir.
Nasıl Kullanılır?
Sade Günlük Grafik Ayarı
Günlük grafik için temiz ve işlevsel önerilen başlangıç ayarı:
text
Show Bu-OB: Açık
Show Be-OB: Açık
Show Bu-BB: Kapalı
Show Be-BB: Kapalı
Show Bu-MB: Kapalı
Show Be-MB: Kapalı
Show ZigZag: Kapalı
Show 50% Midline: İsteğe bağlı
Enable MTF OB: Açık
Auto MTF Timeframe: Açık
Maximum Active Boxes Per Type: 3–5
Maximum Active MTF Boxes: 2–3
Günlük grafikte Auto MTF açık olduğunda indikatör otomatik olarak haftalık MTF order block bölgelerini gösterir.
Örnek Long Senaryosu
Olası bir long işlem planı aşağıdaki sırayla kurulabilir:
Fiyat, haftalık MTF Bullish Order Block alanına ulaşır.
Fiyat aynı zamanda günlük Bullish Order Block bölgesine tepki verir.
Günlük veya düşük zaman diliminde bullish MSB oluşur.
4 saatlik veya 1 saatlik grafiğe geçilir.
Düşük zaman diliminde bullish MSB ve yeni Bu-OB oluşması beklenir.
Yeni düşük zaman dilimi Bu-OB bölgesine geri çekilmede giriş değerlendirilir.
Stop-loss ilgili order block kutusunun altına yerleştirilir.
Hedef olarak önceki tepeler, likidite seviyeleri veya Bearish Order Block bölgeleri izlenir.
Örnek yapı:
text
Haftalık Bu-OB
→ Günlük Bu-OB
→ 4 Saatlik Bullish MSB
→ 4 Saatlik Bu-OB Retesti
→ Olası Long İşlem Senaryosu
Örnek Short Senaryosu
Olası bir short işlem planı aşağıdaki sırayla kurulabilir:
Fiyat, haftalık MTF Bearish Order Block bölgesine ulaşır.
Fiyat günlük Bearish Order Block alanına tepki verir.
Günlük veya düşük zaman diliminde bearish MSB oluşur.
4 saatlik veya 1 saatlik grafiğe geçilir.
Düşük zaman diliminde bearish MSB ve yeni Be-OB oluşması beklenir.
Yeni düşük zaman dilimi Be-OB bölgesine retestte giriş değerlendirilir.
Stop-loss ilgili order block kutusunun üzerine yerleştirilir.
Hedef olarak önceki dipler, likidite seviyeleri veya Bullish Order Block bölgeleri izlenir.
Örnek yapı:
text
Haftalık Be-OB
→ Günlük Be-OB
→ 4 Saatlik Bearish MSB
→ 4 Saatlik Be-OB Retesti
→ Olası Short İşlem Senaryosu
Alarm Özellikleri
İndikatörde aşağıdaki durumlar için alarm koşulları bulunmaktadır:
Bullish Market Structure Break
Bearish Market Structure Break
Yeni Bullish Order Block oluşumu
Yeni Bearish Order Block oluşumu
Yeni Breaker Block oluşumu
Yeni Mitigation Block oluşumu
Fiyatın Bullish / Bearish OB bölgesine girmesi
Fiyatın MTF Bullish / Bearish OB bölgesine girmesi
Order Block bölgesinin mitigate veya geçersiz olması
Yeni Multi-Timeframe Bullish / Bearish Order Block oluşumu
Önemli Notlar
Order block ve piyasa yapısı bölgeleri, kesin alım-satım sinyali değildir.
Multi-timeframe pivot tabanlı bölgelerin oluşması için pivot teyidi gerekir.
İşlem yapılırken risk yönetimi, stop-loss ve doğru pozisyon boyutlandırması kullanılmalıdır.
İndikatörü; trend analizi, likidite, hacim, destek-direnç ve üst zaman dilimi bağlamıyla birlikte değerlendirmek daha sağlıklıdır.
Bu indikatör eğitim ve analiz amaçlıdır; yatırım tavsiyesi değildir.
Katkı ve Referanslar
Orijinal İndikatör Yazarı: Emre KB / @EmreKb
Orijinal Kaynak Kod Lisansı: Mozilla Public License 2.0 — MPL-2.0
Indicator

Indicator

Indicator

Indicator

XauLabs Swing PointsENGLISH
What it does
It marks confirmed swing highs and swing lows, labels each one relative to the previous one of the same type — HH, HL, LH, LL — and connects them with a zigzag. That labelled sequence is the raw material of every structure-based method: HH + HL is the skeleton of an uptrend, LH + LL the skeleton of a downtrend, anything mixed is no man's land.
How it works (full method)
Confirmation. A swing high is confirmed only when the highs of the N bars before AND the N bars after are all lower (mirrored for swing lows). N is user-defined, default 7, range 5–21.
Labelling. On confirmation, the new swing high is compared to the previous confirmed swing high: higher gives HH, lower gives LH. The first one, with no predecessor, is labelled H. Swing lows are compared to previous swing lows: HL or LL, first one labelled L. Highs are never compared to lows.
Zigzag. Each confirmed pivot is joined to the previous confirmed pivot by a straight line, regardless of type. The result is the chart's skeleton with the intermediate noise removed.
Two levels of structure. Major structure uses the main sensitivity and is the default view. An optional minor structure, with its own smaller sensitivity (default 3), plots the internal waves inside each major leg. It is off by default: the skeleton first, the ripples afterwards. Reading a minor swing as if it were a major one is the most common way to end up flipping bias several times a day.
No repainting
Labels appear N bars after the extreme they mark, are drawn at the true historical position of that extreme, and never move or disappear afterwards. What history shows is what would have been visible live. The confirmation delay is the cost, and it is stated rather than hidden.
On-chart output
HH / HL / LH / LL labels on every confirmed major pivot.
Zigzag connecting major pivots.
Optional minor pivot dots.
A badge in the top-right corner showing the two most recent readings, with selectable text size.
Two alert conditions: major swing high confirmed, major swing low confirmed.
Suggested use
Start on H4. Read the badge: HH · HL means the bullish skeleton is intact. Structure has to be read on one sensitivity, applied consistently — not on whichever swing supports the trade you already want to take.
This is an educational structure-reading tool. It gives no buy or sell signals and makes no performance claim. Trading involves substantial risk of loss.
FRANÇAIS
Ce que fait l'indicateur
Il marque les sommets et creux de swing confirmés, étiquette chacun par rapport au précédent du même type — HH, HL, LH, LL — et les relie par un zigzag. Cette séquence étiquetée est la matière première de toute méthode structurelle : HH + HL forme le squelette d'une tendance haussière, LH + LL celui d'une tendance baissière, tout ce qui est mixte est une zone grise.
Comment il fonctionne (méthode complète)
Confirmation. Un sommet n'est confirmé que si les N bougies avant ET les N bougies après ont toutes un plus haut inférieur (symétrique pour les creux). N est réglable, 7 par défaut, plage 5–21.
Étiquetage. À la confirmation, le nouveau sommet est comparé au sommet confirmé précédent : plus haut donne HH, plus bas donne LH. Le premier, sans prédécesseur, est étiqueté H. Les creux sont comparés aux creux : HL ou LL, le premier étiqueté L. Un sommet n'est jamais comparé à un creux.
Zigzag. Chaque pivot confirmé est relié au pivot confirmé précédent par une droite, quel que soit son type. On obtient le squelette du graphique, débarrassé du bruit intermédiaire.
Deux niveaux de structure. La structure majeure utilise la sensibilité principale : c'est la vue par défaut. Une structure mineure optionnelle, avec sa propre sensibilité plus courte (3 par défaut), trace les vagues internes de chaque jambe majeure. Elle est désactivée par défaut : le squelette d'abord, les vagues ensuite. Lire un swing mineur comme s'il était majeur est la façon la plus courante de changer de biais cinq fois par jour.
Aucun repaint
Les étiquettes apparaissent N bougies après l'extrême qu'elles marquent, sont tracées à la vraie place historique de cet extrême, et ne bougent ni ne disparaissent ensuite. Ce que montre l'historique est ce qui aurait été visible en direct. Le délai de confirmation est le prix à payer, et il est affiché plutôt que masqué.
Affichage
Étiquettes HH / HL / LH / LL sur chaque pivot majeur confirmé.
Zigzag reliant les pivots majeurs.
Points de pivots mineurs, optionnels.
Un badge dans le coin supérieur droit affichant les deux dernières lectures, avec taille de texte réglable.
Deux conditions d'alerte : sommet majeur confirmé, creux majeur confirmé.
Utilisation suggérée
Commencer en H4. Lire le badge : HH · HL signifie que le squelette haussier est intact. La structure se lit sur une seule sensibilité, appliquée avec constance — pas sur le swing qui arrange le trade qu'on a déjà envie de prendre.
Outil éducatif de lecture de structure. Il ne donne aucun signal d'achat ou de vente et ne formule aucune promesse de performance. Le trading comporte un risque de perte important. Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

World Sessions & Countdown [AFD]
Which session is actually running right now, and how many bars are left in it?
Every session tool on the shelf draws the same coloured stripes. Almost all of them are built on a fixed UTC offset, which means twice a year they are quietly an hour wrong and nothing on the chart says so. The highest-profile clock script in the niche states plainly in its own description that it requires manual UTC offset adjustment at each changeover.
World Sessions is anchored to IANA time zone names instead - Europe/London, America/New_York, Asia/Tokyo, Australia/Sydney. Each window follows its own city's daylight-saving policy, on its own, with nothing for you to adjust. The script draws a rectangle around each session's own bars rather than a full-height stripe, a separate rectangle wherever sessions overlap, and a dashboard that tells you what time it is in all four cities and how much of the
current session is left.
Why the time zone thing matters
14 January - London GMT, New York EST - overlap 15:00-17:00 UTC, two hours.
25 March - London BST, New York EDT - overlap 14:00-17:00 UTC, three hours.
15 July - London BST, New York EDT - overlap 14:00-16:00 UTC, two hours.
28 October - London GMT, New York EDT - overlap 14:00-17:00 UTC, three hours.
A fixed-offset script prints one identical row for all four. The late-October row is the one that bites: Europe has left summer time and the United States has not, so the two cities are five hours apart instead of the usual four, and every band built on a captured offset is an hour wrong for that week.
This is a statement about how the script resolves time. It says nothing about volatility, liquidity, or what you should do with any of it.
At a glance
Session boxes - one rectangle per session RUN, spanning that run's own high and low, not a full-height stripe.
Overlap box - a separate rectangle over the bars two or more sessions share, carrying its own composite name.
IANA time zones - each session follows its own city's daylight-saving policy, with no UTC offset to maintain.
Bars left in session - not minutes, BARS, on your current timeframe.
Dashboard - each session's hours, its city's live clock, an open/closed dot, a progress bar, and the countdown to its next boundary.
Five sessions - Sydney, Tokyo, London, New York, and one Custom slot of your own.
New York hours - regular, extended-equities, or CME Globex, chosen automatically from the symbol or forced by hand.
Eight alerts - four session opens, all sessions closed, overlap start, N seconds to bar close, and last bar of session.
Appearance - fill, four gradient depths in two directions, border transparency, width and style, or outline-only.
One box per run, not one box per chart
A session's rectangle is bounded by that session's run, identified by the instant that run closes, and not by a stretch of bars on which the session happened to be live. The distinction is not academic. On a regular-hours US chart every bar is inside New York's 09:30-16:00 window, so a liveness-based tool never sees New York stop being live: it opens one rectangle on the first
bar of history and never closes it, washing the entire chart in one color. This product drew exactly that defect once, and the lifecycle is now keyed on the run instead. You get one box per day, with clean gaps between them.
A box is a session's EXTENT, not a level. It has a top and a bottom and that is where the resemblance to a zone tool stops - no line is drawn at either edge, no edge is labelled or alerted with a price, and nothing downstream reads one.
The overlap box
Two or more enabled sessions running at once get their own rectangle over the shared bars, spanning the high and low of those bars only, and it carries the name of the sessions that actually made it - TOKYO + LONDON, LONDON + NEW YORK.
One color at any depth, deliberately: Sydney, Tokyo and London genuinely stack three deep, and a per-pair colour scheme has no honest answer for a three-way overlap.
Overlap only is the shipped default, so out of the box the chart draws the overlap rectangle and nothing else. On a chart with no overlap running that means no rectangles at all - the intended state, not a fault. Set Overlap to Highlight overlap to see every session box alongside it, or Off for session boxes with no overlap rectangle.
Every session is named exactly once. Where the overlap box is drawn it carries the joint name, so a session's own name centres on the bars it held ALONE. A session that is never alone shows no separate name, because it has already been named.
The dashboard
Per session - a colour chip, the name, an open/closed dot, that session's own hours, the current wall clock in its city (marked +1 or -1 when the city is on another date), a progress bar, and OPENS IN or CLOSES IN to its next boundary. The open session's row is tinted in its own color and its name set bold.
Two kinds of time, on purpose - LOCAL, the dot, PROGRESS and NEXT are real-world clock readings and stay current on a weekend, on a scrolled-back chart, and in Bar Replay. BAR CLOSE is a property of the bar in front of you and shows an em dash on anything but a genuinely live bar, because a countdown to the close of a bar that has already closed cannot mean what it says.
BARS LEFT keeps counting where BAR CLOSE cannot, because one is a bar-structure count and the other is a clock reading. It names the session it is following. Both step green, then amber, then red as they run out.
The progress column always says something - the bar while a session runs, Not in session while it is closed, and No bars here when that session's window has no bars at all on the symbol you are looking at. Tokyo on a US regular-hours chart is the common case.
Position, background, grid lines, the outer frame and its width, one text size for the whole panel, and progress-bar width are all settings. The frame's Countdown mode makes it the same green-amber-red traffic light BARS LEFT carries.
Weekdays are digits, and the rule has a trap in it
Weekdays live in a field of their own, because input.session() renders two clock fields and no weekday picker. 1 is Sunday through 7 is Saturday, so the shipped '23456' is Monday to Friday.
They are not optional. A session string without them applies to EVERY day of the week - invisible on a stock chart, but on a 24/7 symbol it draws a London box straight through Saturday.
For a session that runs past midnight, the digits name the day it ENDS. PulseWire's own documented example is 1700-1700:23456, in which the Monday session starts Sunday at 17:00 and ends Monday at 17:00. So the CME Globex window here is 1800-1700 with the ordinary 23456 - Sunday evening through Friday afternoon, five sessions, the real Globex week. The intuitive-looking 12345 invents a Saturday-evening session that never trades and loses Thursday evening entirely.
Alerts
Sydney session open
Tokyo session open
London session open
New York session open
All sessions closed
Session overlap start
N seconds to bar close - the threshold is a user input, and 0 turns it off
Last bar of session - off by default
Create these from PulseWire's alert dialog. How often an alert re-fires while
its condition holds is set in that dialog, not in the script.
How to use it
Add it to an INTRADAY time-based chart. Boxes and session names need an intraday timeframe; the dashboard works on any timeframe, because its countdowns read the wall clock.
Leave Overlap on Overlap only for the overlap rectangle alone, or switch to Highlight overlap to see every session.
Turn off the sessions you do not follow. Set hours and weekday digits to match what you actually trade.
On a futures contract, check the New York hours group is on extended hours if the Globex window is the one you want boxed. Auto by symbol handles this for you on a real futures contract.
Everything else - fill, gradient depth and direction, border style, boxes kept, panel appearance - is a setting to configure once to taste.
What it deliberately does not do
It draws no zone and publishes no session high or low as a level. It offers no fixed UTC offset option, because a dropdown reading UTC-5 would let you silently break the one thing the product is for. It gives no arrows, no signals, and nothing about what price will do during any session. Educational chart context, not financial advice.
Data, timeframes and repainting
The script uses current chart data only. There are no request.security() calls, no higher-timeframe imports, and no lookahead of any kind.
A running session's box updates as new highs and lows print on the forming bar, and its right edge advances with the chart; it is final once that session's run has ended. Confirm the behaviour with the bar-replay tool on your own chart and timeframe before relying on it.
The dashboard's clock columns advance per tick. Pine provides no timer, so on a closed market - where no tick arrives - they hold at the last moment the script executed rather than ticking on by themselves. Scrolling, zooming, or changing any setting re-executes the script and brings them current. This is platform behaviour, not a setting.
Boxes and session names are intraday-only. On a daily or higher chart a session window is shorter than one bar, so they are not drawn.
Drawing history is bounded by Pine's limits. The source declares budgets of 500 boxes and 500 labels, and Session boxes kept is trimmed automatically to stay inside the box ceiling - a faded session costs one box per gradient step plus its outline.
Standard time-based candles. The session arithmetic reads chart time.
A running alert keeps the inputs, symbol and timeframe it was created with - recreate an alert after changing any of them.
Originality and credit
Other session tools draw stripes on a fixed offset. This one bounds each session run by its own high and low, names the overlap for the sessions that actually made it, resolves every window through an IANA time zone so it holds across daylight saving, and reports the one number the shelf does not carry - how many bars are left in the session you are in, on the timeframe you are on. Open source under the Mozilla Public License 2.0. (c) Auction Foundry.
Disclosure: this indicator describes session structure and elapsed time on the current chart. It is not a forecast, a signal, or financial advice. Indicator

Indicator

Indicator

TT Backtest Compare## TT Backtest Compare — Two Lorentzian Engines, One Chart, No Excuses
Every optimized strategy makes the same claim: "better than the defaults."
TT Backtest Compare is the tool that makes that claim checkable — on your
chart, your symbol, your timeframe, with both engines running live in front
of you.
It runs two complete Machine Learning: Lorentzian Classification engines
(original k-NN core by jdehorty, used under MPL-2.0) side by side in a single
indicator pane:
- ARM A — TT-Autotune: machine-evolved parameters delivered as Regime Sync
Codes, hot-swapped bar-by-bar as the market regime changes, scanning a
sliding pool of the most RECENT bars.
- ARM B — TT-Lorentzian (control): the verbatim stock jdehorty v2 defaults,
the original oldest-bars neighbor pool, the official MLExtensions and
KernelFunctions library calls. Untouched, on purpose.
Both arms see the same bars, pay the same costs, and obey the same exit
rules. The only difference is the thing being tested: where the parameters
came from.
### Why it's an indicator that runs its own backtests
A jdehorty-style "Backtest Adapter" can't do this job: adapters read another
script's plot through a Source input, and PulseWire only exposes INDICATOR
plots that way — both of our production arms are strategy() scripts. So this
indicator embeds both engines and simulates the trades itself, with one shared
trade simulator so neither arm can cheat.
### Accounting you can audit
The trade loop is not a loose approximation of a backtest — it is a
transcription of the exact accounting used by TensorTrader's Python
genetic optimizer:
- Single position per arm, flip on the opposite signal.
- ATR stop-loss / take-profit bracket evaluated against the CURRENT bar's
ATR before signals (matching how the live strategy re-issues its exit
orders every bar).
- Per-trade ROI net of a round-trip cost you control (default 5 bps taker
fee + 2 bps slippage per side, 14 bps round trip).
- Trade-gated Sortino on per-trade ROI (MAR = 0, bounded, requires 2+
trades) — the same fitness statistic the optimizer breeds against.
On the server, a line-by-line Python transcription of this Pine trade loop is
continuously tested against the optimizer's canonical simulator — trades,
total ROI, compound ROI, drawdown, Sortino, and per-regime attribution must
all match or the build fails. When this chart says the evolved parameters
earned +X%, that number means the same thing as the optimizer's report.
### What you see
- Two equity curves (% return), with a green/red fill showing which arm is
ahead at every bar, plus an optional "edge" plot of the running difference.
- A stats table: compound return, total ROI, trade count, win rate, average
trade, Sortino, max drawdown, profit factor, and time in market — for each
arm, with the A−B delta in its own column.
- A per-regime table: the embedded six-state regime classifier (the same
ADX + regression-slope + ATR% classifier with hysteresis that runs in
TensorTrader's Python engine and inside TT-Autotune) buckets every trade
by the regime at its ENTRY bar, so you can see exactly where the evolved
parameters earn their edge — and where they don't. Regimes with no
deployed champion are marked honestly instead of hidden.
- A header card with the active sync source, backtest window, and the cost /
exit configuration, so screenshots are self-documenting.
Controls include a backtest start date, fee and slippage inputs, an
indicator-exits toggle (mirroring the optimizer's setting), full ATR bracket
settings, and an arms selector — each arm is a full k-NN scan per bar, so you
can drop to a single arm if a very long chart hits Pine's time limit.
### What this does NOT show
Honesty section: the comparison runs one position per arm because that is
what the optimizer's fitness function measures. The live TT-Autotune strategy
can pyramid up to 5 DCA legs, so its realized P&L scales differently — this
chart compares the SIGNAL edge, not the position ladder. All figures are
backtests net of modeled costs, not live results; past performance never
guarantees future returns.
### The TensorTrader side
Without a sync code, Arm A runs the same defaults as Arm B and the race is a
tie by construction — the indicator is fully functional but you're comparing
a thing to itself.
The evolved parameters come from TensorTrader's deterministic genetic
optimizer: populations of candidate genomes evolved over walk-forward,
out-of-sample folds, scored on net Sortino after fees and slippage, with
minimum-trade eligibility rules so no 6-trade miracle ever ships. A separate
champion is bred for each of the six market regimes and packed into one
Regime Sync Code per symbol × timeframe cell.
1. Create a free account at tensortrader.agent-swarm.net.
2. Pick an optimized symbol × timeframe cell from the catalog.
3. The TensorTrader browser extension pastes the packed Regime Sync Code into
the indicator's input for you — the same code that arms the TT-Autotune
strategy — and keeps it current when a newer champion is bred for your
cell.
Use this indicator BEFORE you trust any cell: load your market, arm A with
its code, and watch whether the edge is real on the window you care about.
That is what it was built for.
### Credits and license
Original Lorentzian Classification logic © jdehorty, used under the Mozilla
Public License 2.0 — Arm B imports his MLExtensions and KernelFunctions
libraries directly and runs his published defaults unmodified. The dual-arm
simulator, cost model, regime classifier, sync-code system, and comparison
tables by TensorTrader.
---
## Categories and tags (publication notes, not part of the description)
PulseWire's publish dialog allows up to two categories plus free-form tags.
- Primary category: **Statistics** — the script's product is comparative
performance analytics (equity curves, Sortino, drawdown, profit factor),
not a trade signal.
- Secondary category: **Trend Analysis** — the underlying engines are
trend-classification (Lorentzian k-NN + kernel regression), and it's where
the jdehorty original and TT-Autotune audiences browse.
- Alternative secondary if you prefer positioning it as a research tool:
**Educational**.
Suggested tags: `machinelearning`, `lorentzian`, `knn`, `backtesting`,
`equitycurve`, `sortino`, `regime`, `abtest`, `tensortrader`.
Other notes:
- House Rules: as a derivative of an open-source script it must credit the
original and describe meaningful changes — the description does both, and
the MPL-2.0 header is already in the source.
- Publish as an INDICATOR (it is `indicator()`, not `strategy()` — the
Strategy Tester will not appear, which is expected and explained in the
description).
- The parity claim ("same numbers as the optimizer") is backed by
`test_pine_backtest_compare_accounting.py`; keep that test green before
republishing after any accounting change.
Indicator

TRADLEWARE-HODL
Buy and Hold Benchmark
This is a passive reference strategy, not a signal-based trading system. It exists to give an honest baseline: buy once, hold through everything, and see what an active strategy actually needs to beat.
How it works
Buy-and-hold ("HODL") is the simplest possible approach to markets: put the money in once and do nothing else, regardless of what price does afterward. There is no attempt to time entries or exits, no reaction to drawdowns, and no risk management of any kind. Any active strategy that cannot beat this, risk-adjusted, over the same period has not demonstrated an edge.
Entry
The entire starting capital is deployed in a single buy, on the first bar at or after the start date.
Exit
The position is held until the end date, or the end of the chart's available history, whichever comes first — at which point it is closed once so the backtest can report a final equity figure. This is bookkeeping, not a trading decision; the whole point of the strategy is that it does not exit early.
Parameters
Start Date / End Date: the single buy fires on the first bar at or after the start date; the position is held until the end date
Position sizing is set to 99.95% of equity rather than a full 100%. That small gap avoids a PulseWire position-sizing rounding artifact that can otherwise show up as an extra "Margin call" row even on a strategy with only one real trade; the effect on the actual result is negligible.
Costs modelled
0.1% commission per side, 3 ticks slippage.
Intended assets and timeframe
Works on any asset or timeframe — there is no technical logic to adapt, just a buy date and a hold period.
Known limitations
Full exposure to every drawdown the asset experiences, for the entire holding period, by design. This is not a flaw to fix — it is the deliberate point of comparison for any strategy that claims to manage risk better than doing nothing.
Strategy

TRADLEWARE-DCA
Dollar-Cost Averaging Benchmark
This is a passive reference strategy, not a signal-based trading system. It exists to give an honest, apples-to-apples comparison for active strategies: instead of trying to time entries, it buys a fixed amount of the asset on a regular schedule until a set capital budget is fully deployed.
How it works
Dollar-cost averaging (DCA) means investing a fixed amount of money at regular intervals, regardless of price. Some buys land at high prices, some at low prices, and over time the average purchase price smooths out. There is no attempt to predict direction — the schedule is the whole strategy.
This script buys on either a fixed day of the week (e.g. every Monday) or every fixed number of bars (e.g. every 30 daily bars, roughly monthly), and keeps buying until the total amount invested reaches the strategy's starting capital. After that, no more buys are placed — the same total capital pool as whatever active strategy this is being compared against, with no extra money added along the way.
Entry
A buy is placed each time the schedule fires, as long as the running total invested plus the next buy amount does not exceed the starting capital. If a scheduled buy would push the total over budget, it is skipped, but the schedule keeps advancing rather than getting stuck retrying.
Exit
There is no exit signal in the usual sense — the strategy only ever adds to its position. The full position is closed out once, on the final bar of the chart's history, purely so the backtest can report a final equity figure. This is bookkeeping, not a trading decision.
Parameters
Start Date / End Date: window during which buys are allowed
Use Day of Week Mode: switch between "buy on a specific weekday" and "buy every N bars"
Day of Week: which weekday to buy on, when day-of-week mode is on
Every X Bars: how many bars between buys, when day-of-week mode is off (30 on a daily chart is roughly monthly)
Amount per buy: fixed amount invested at each scheduled buy
The strategy allows up to 500 stacked buy layers to accumulate into a single overall position — that number just needs to be large enough to never run out before the capital budget is spent; it is not a trading parameter to tune.
Costs modelled
0.1% commission per side, 3 ticks slippage, fills at the same bar's close (this benchmark intentionally fills immediately rather than waiting for the next bar's open, since there is no signal timing to protect).
Intended assets and timeframe
Works on any asset or timeframe — the frequency inputs just need to be set to match (e.g. 30 bars on a daily chart for roughly monthly buys, 7 for weekly). For higher-priced assets, check that the per-buy amount converts to at least a fraction PulseWire will actually simulate.
Known limitations
The starting capital, buy amount, and buy frequency together decide how long full deployment actually takes — and depending on the chart's date range, that can run out in either direction. With the default settings (10,000 starting capital, 100 per buy, roughly monthly), full deployment takes 100 buys — about 8 years of monthly investing. Starting from 2018-01-01, that budget is exhausted by roughly mid-2026, so on a chart that runs through mid-2026 or later, this script will have already placed its last scheduled buy weeks or months before the present: it simply holds the fully-invested position afterward and stops buying, exactly as designed by the "never invest more than the starting capital" rule, not because of an error. On a shorter chart window relative to the amount and frequency chosen, the opposite can happen instead — the window ends before the full budget is spent, leaving some capital undeployed. Either way, check the strategy's equity and invested-capital tracking rather than assuming full deployment by the end of the chart. This script also has no risk management of any kind by design: it never sells until the very end, so it carries full exposure to any drawdown the asset experiences. That is the intended comparison point for an active strategy, not a flaw to fix.
Strategy

Strategy

Custom ORB, Premarket & EMAs// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
//@version=6
indicator("Custom ORB, Premarket & EMAs", overlay = true, max_lines_count = 100, max_labels_count = 100, max_bars_back = 5000)
// --- Groups ---
var string G_PRE = "Premarket Settings"
var string G_PD = "Previous Day Levels"
var string G_2OR = "2m Opening Range Settings"
var string G_5OR = "5m Opening Range Settings"
var string G_15OR = "15m Opening Range Settings"
var string G_EMA = "EMA Settings"
var string G_VWAP = "VWAP Settings"
var string G_SIG = "Signal Visuals"
// --- Inputs ---
pmColor = input.color(color.gray, "Premarket Color", group = G_PRE, tooltip = "Color used for the premarket high and low levels.")
pmStyle = input.string("Dashed", "Premarket Style", options = , group = G_PRE, tooltip = "Line style used for the premarket levels.")
pmWidth = input.int(1, "Premarket Line Width", minval = 1, maxval = 10, group = G_PRE, tooltip = "Width of the premarket high and low lines.")
pmSession = input.session("0400-0930", "Premarket Session", group = G_PRE, tooltip = "Exchange-time session used to calculate the premarket range.")
showPd = input.bool(true, "Show PDH/PDL", group = G_PD, tooltip = "Display the confirmed previous trading day's high and low.")
pdhColor = input.color(#5b9cf6, "PDH Color", group = G_PD, tooltip = "Color used for the previous day high level.")
pdlColor = input.color(#f23645, "PDL Color", group = G_PD, tooltip = "Color used for the previous day low level.")
pdStyle = input.string("Dotted", "PDH/PDL Style", options = , group = G_PD, tooltip = "Line style used for the previous day high and low levels.")
pdWidth = input.int(1, "PDH/PDL Line Width", minval = 1, maxval = 10, group = G_PD, tooltip = "Width of the previous day high and low lines.")
showOr2 = input.bool(true, "Show 2m ORB", group = G_2OR, tooltip = "Display the 2-minute opening range high and low.")
or2Color = input.color(#5b9cf6, "2m OR Color", group = G_2OR, tooltip = "Color used for the 2-minute opening range.")
or2Style = input.string("Solid", "2m OR Style", options = , group = G_2OR, tooltip = "Line style used for the 2-minute opening range.")
or2Width = input.int(1, "2m OR Line Width", minval = 1, maxval = 10, group = G_2OR, tooltip = "Width of the 2-minute opening range lines.")
or2Time = input.string("0930-0932", "2m OR Time", group = G_2OR, tooltip = "Exchange-time session used to calculate the 2-minute opening range.")
showOr5 = input.bool(true, "Show 5m ORB", group = G_5OR, tooltip = "Display the 5-minute opening range high and low.")
or5Color = input.color(#089981, "5m OR Color", group = G_5OR, tooltip = "Color used for the 5-minute opening range.")
or5Style = input.string("Solid", "5m OR Style", options = , group = G_5OR, tooltip = "Line style used for the 5-minute opening range.")
or5Width = input.int(1, "5m OR Line Width", minval = 1, maxval = 10, group = G_5OR, tooltip = "Width of the 5-minute opening range lines.")
or5Time = input.string("0930-0935", "5m OR Time", group = G_5OR, tooltip = "Exchange-time session used to calculate the 5-minute opening range.")
showOr15 = input.bool(true, "Show 15m ORB", group = G_15OR, tooltip = "Display the 15-minute opening range high and low.")
or15Color = input.color(#f23645, "15m OR Color", group = G_15OR, tooltip = "Color used for the 15-minute opening range.")
or15Style = input.string("Solid", "15m OR Style", options = , group = G_15OR, tooltip = "Line style used for the 15-minute opening range.")
or15Width = input.int(1, "15m OR Line Width", minval = 1, maxval = 10, group = G_15OR, tooltip = "Width of the 15-minute opening range lines.")
or15Time = input.string("0930-0945", "15m OR Time", group = G_15OR, tooltip = "Exchange-time session used to calculate the 15-minute opening range.")
emaFastLength = input.int(9, "Fast EMA Length", minval = 1, group = G_EMA, tooltip = "Period used to calculate the fast EMA.")
emaSlowLength = input.int(20, "Slow EMA Length", minval = 1, group = G_EMA, tooltip = "Period used to calculate the slow EMA.")
ema9Color = input.color(#5b9cf6, "Fast EMA Color", group = G_EMA, tooltip = "Color used for the fast EMA.")
ema20Color = input.color(#f23645, "Slow EMA Color", group = G_EMA, tooltip = "Color used for the slow EMA.")
showVwap = input.bool(true, "Show VWAP", group = G_VWAP, tooltip = "Display the volume-weighted average price.")
vwapColor = input.color(color.orange, "VWAP Color", group = G_VWAP, tooltip = "Color used for VWAP.")
showShapes = input.bool(true, "Show Buy/Sell Triangles", group = G_SIG, tooltip = "Display triangles when tracked levels break during regular session.")
// --- Helper: Get Line Style ---
getLineStyle(styleStr) =>
switch styleStr
"Solid" => line.style_solid
"Dotted" => line.style_dotted
"Dashed" => line.style_dashed
=> line.style_solid
// --- Logic ---
inSession(sess) => not na(time(timeframe.period, sess))
isNewDay = ta.change(time("D")) != 0
// EMAs, VWAP & Previous Day Levels
ema9 = ta.ema(close, emaFastLength)
ema20 = ta.ema(close, emaSlowLength)
vwapVal = ta.vwap(hlc3)
pdhVal = request.security(syminfo.tickerid, "D", high , lookahead = barmerge.lookahead_on)
pdlVal = request.security(syminfo.tickerid, "D", low , lookahead = barmerge.lookahead_on)
plot(ema9, "Fast EMA", color = ema9Color, linewidth = 1)
plot(ema20, "Slow EMA", color = ema20Color, linewidth = 1)
plot(showVwap ? vwapVal : na, "VWAP", color = vwapColor, linewidth = 2)
// --- Trackers ---
var float pmH = na
var float pmL = na
var int pmStartIdx = na
var float or2H = na
var float or2L = na
var int or2StartIdx = na
var float or5H = na
var float or5L = na
var int or5StartIdx = na
var float or15H = na
var float or15L = na
var int or15StartIdx = na
var int dayStartIdx = na
// --- Reset & Start Index Capture ---
if na(dayStartIdx) or isNewDay
dayStartIdx := bar_index
if isNewDay
pmH := na
pmL := na
pmStartIdx := na
or2H := na
or2L := na
or2StartIdx := na
or5H := na
or5L := na
or5StartIdx := na
or15H := na
or15L := na
or15StartIdx := na
if inSession(pmSession)
if na(pmStartIdx)
pmStartIdx := bar_index
pmH := math.max(high, nz(pmH, high))
pmL := math.min(low, nz(pmL, low))
if inSession(or2Time)
if na(or2StartIdx)
or2StartIdx := bar_index
or2H := math.max(high, nz(or2H, high))
or2L := math.min(low, nz(or2L, low))
if inSession(or5Time)
if na(or5StartIdx)
or5StartIdx := bar_index
or5H := math.max(high, nz(or5H, high))
or5L := math.min(low, nz(or5L, low))
if inSession(or15Time)
if na(or15StartIdx)
or15StartIdx := bar_index
or15H := math.max(high, nz(or15H, high))
or15L := math.min(low, nz(or15L, low))
// --- Visuals: Current Session Only Redraw ---
var line lines = array.new_line()
var label labels = array.new_label()
if barstate.islast
for l in lines
line.delete(l)
for lb in labels
label.delete(lb)
array.clear(lines)
array.clear(labels)
// Stagger the label x-positions to prevent overlapping if levels share the same price.
int pdIdx = bar_index + 2
int pmIdx = bar_index + 6
int or2Idx = bar_index + 10
int or5Idx = bar_index + 14
int or15Idx = bar_index + 18
// Previous day high and low.
if showPd and not na(pdhVal) and not na(pdlVal) and not na(dayStartIdx)
array.push(lines, line.new(dayStartIdx, pdhVal, bar_index, pdhVal, color = pdhColor, style = getLineStyle(pdStyle), width = pdWidth))
array.push(lines, line.new(dayStartIdx, pdlVal, bar_index, pdlVal, color = pdlColor, style = getLineStyle(pdStyle), width = pdWidth))
array.push(labels, label.new(pdIdx, pdhVal, "PDH", color = #00000000, textcolor = pdhColor, style = label.style_label_left, size = size.small))
array.push(labels, label.new(pdIdx, pdlVal, "PDL", color = #00000000, textcolor = pdlColor, style = label.style_label_left, size = size.small))
// Premarket.
if not na(pmH) and not na(pmStartIdx)
array.push(lines, line.new(pmStartIdx, pmH, bar_index, pmH, color = pmColor, style = getLineStyle(pmStyle), width = pmWidth))
array.push(lines, line.new(pmStartIdx, pmL, bar_index, pmL, color = pmColor, style = getLineStyle(pmStyle), width = pmWidth))
array.push(labels, label.new(pmIdx, pmH, "PM High", color = #00000000, textcolor = pmColor, style = label.style_label_left, size = size.small))
array.push(labels, label.new(pmIdx, pmL, "PM Low", color = #00000000, textcolor = pmColor, style = label.style_label_left, size = size.small))
// 2m ORB.
if showOr2 and not na(or2H) and not na(or2StartIdx) and not inSession(or2Time)
array.push(lines, line.new(or2StartIdx, or2H, bar_index, or2H, color = or2Color, style = getLineStyle(or2Style), width = or2Width))
array.push(lines, line.new(or2StartIdx, or2L, bar_index, or2L, color = or2Color, style = getLineStyle(or2Style), width = or2Width))
array.push(labels, label.new(or2Idx, or2H, "2m OR High", color = #00000000, textcolor = or2Color, style = label.style_label_left, size = size.small))
array.push(labels, label.new(or2Idx, or2L, "2m OR Low", color = #00000000, textcolor = or2Color, style = label.style_label_left, size = size.small))
// 5m ORB.
if showOr5 and not na(or5H) and not na(or5StartIdx) and not inSession(or5Time)
array.push(lines, line.new(or5StartIdx, or5H, bar_index, or5H, color = or5Color, style = getLineStyle(or5Style), width = or5Width))
array.push(lines, line.new(or5StartIdx, or5L, bar_index, or5L, color = or5Color, style = getLineStyle(or5Style), width = or5Width))
array.push(labels, label.new(or5Idx, or5H, "5m OR High", color = #00000000, textcolor = or5Color, style = label.style_label_left, size = size.small))
array.push(labels, label.new(or5Idx, or5L, "5m OR Low", color = #00000000, textcolor = or5Color, style = label.style_label_left, size = size.small))
// 15m ORB.
if showOr15 and not na(or15H) and not na(or15StartIdx) and not inSession(or15Time)
array.push(lines, line.new(or15StartIdx, or15H, bar_index, or15H, color = or15Color, style = getLineStyle(or15Style), width = or15Width))
array.push(lines, line.new(or15StartIdx, or15L, bar_index, or15L, color = or15Color, style = getLineStyle(or15Style), width = or15Width))
array.push(labels, label.new(or15Idx, or15H, "15m OR High", color = #00000000, textcolor = or15Color, style = label.style_label_left, size = size.small))
array.push(labels, label.new(or15Idx, or15L, "15m OR Low", color = #00000000, textcolor = or15Color, style = label.style_label_left, size = size.small))
// --- Signal Logic & Alerts ---
isRegularSession = inSession("0930-1600")
// Track crossovers on all bars to avoid conditional evaluation warnings.
crossUpPM = ta.crossover(close, pmH)
crossDnPM = ta.crossunder(close, pmL)
crossUpOR2 = ta.crossover(close, or2H)
crossDnOR2 = ta.crossunder(close, or2L)
crossUpOR5 = ta.crossover(close, or5H)
crossDnOR5 = ta.crossunder(close, or5L)
crossUpOR15 = ta.crossover(close, or15H)
crossDnOR15 = ta.crossunder(close, or15L)
// Individual breakout booleans.
pmBreakUp = isRegularSession and not inSession(pmSession) and crossUpPM
pmBreakDn = isRegularSession and not inSession(pmSession) and crossDnPM
or2BreakUp = showOr2 and isRegularSession and not inSession(or2Time) and crossUpOR2
or2BreakDn = showOr2 and isRegularSession and not inSession(or2Time) and crossDnOR2
or5BreakUp = showOr5 and isRegularSession and not inSession(or5Time) and crossUpOR5
or5BreakDn = showOr5 and isRegularSession and not inSession(or5Time) and crossDnOR5
or15BreakUp = showOr15 and isRegularSession and not inSession(or15Time) and crossUpOR15
or15BreakDn = showOr15 and isRegularSession and not inSession(or15Time) and crossDnOR15
// Master buy/sell signal.
buySignal = pmBreakUp or or2BreakUp or or5BreakUp or or15BreakUp
sellSignal = pmBreakDn or or2BreakDn or or5BreakDn or or15BreakDn
// Visual signals.
plotshape(showShapes and buySignal, "Buy Breakout", shape.triangleup, location.belowbar, #089981, size = size.small)
plotshape(showShapes and sellSignal, "Sell Breakdown", shape.triangledown, location.abovebar, #f23645, size = size.small)
// Alert triggers.
if buySignal
alert("Level Breakout: Buy Signal", alert.freq_once_per_bar)
if sellSignal
alert("Level Breakdown: Sell Signal", alert.freq_once_per_bar)
Indicator

Indicator

FD Volume Intelligence v1.8FD Volume Intelligence is a compact volume-confirmation tool designed to help traders judge whether a price move is supported by meaningful market participation.
Instead of duplicating PulseWire’s native volume histogram, this indicator works as an intelligence layer alongside PulseWire’s built-in Volume indicator. It focuses on Relative Volume (RVOL), participation strength, candle-body quality, directional context, and confirmed alerts while keeping the price chart clean.
Core Features
Relative Volume (RVOL)
Compares current volume with its moving-average baseline:
RVOL = Current Volume ÷ Volume MA
Volume MA Length
Default: 20
Participation Classification
Dry: below 0.70×
Average: 0.70× – 1.19×
Confirm: 1.20× – 1.49×
Strong: 1.50× – 1.99×
Extreme: 2.00×+
Candle Body Quality
Measures the candle body as a percentage of its total high-low range. This helps distinguish strong directional participation from high-volume indecision.
Default minimum body quality: 55%
Directional Volume Context
Displays whether current participation is associated with bullish or bearish price action.
Compact 2-Column Dashboard
Shows:
Volume status
RVOL
Strength
Direction
Body Quality
Current Volume vs MA20
Threshold settings status
Color-Coded Interpretation
Green = confirmed / positive participation
Orange = caution / weak candle quality
Red = bearish context
= informational metrics
White = neutral/static information
Threshold Protection
The script automatically maintains the correct logical hierarchy:
Dry < Confirmation < Strong < Extreme
If a user enters conflicting threshold values, they are automatically normalized internally.
No-Volume Handling
Symbols without usable volume data are clearly identified instead of generating misleading RVOL readings.
Confirmed Alerts
Alerts default to confirmation on candle close to reduce intrabar signal changes. The dashboard itself remains realtime.
How to Use
FD Volume Intelligence is intended as a confirmation tool, not a standalone buy/sell system.
For example:
RVOL < 0.70× → weak participation
RVOL ≥ 1.20× → meaningful participation begins
RVOL ≥ 1.50× → strong participation
RVOL ≥ 2.00× → unusually high activity; evaluate for expansion, breakout, absorption, or climax
A high RVOL reading becomes more useful when it is accompanied by good candle-body quality and relevant price structure.
For example:
RVOL 1.60× + Strong Body + Bull Direction
provides stronger confirmation than:
RVOL 1.60× + Weak Body
because the second condition may indicate absorption, rejection, or indecision despite elevated volume.
Recommended Setup
Use this indicator together with PulseWire’s built-in Volume indicator.
Recommended built-in Volume settings:
MA Length: 20
Color based on previous close: ON
FD Volume Intelligence intentionally does not draw its own synthetic volume histogram. This keeps the indicator lightweight and avoids creating an additional pane or interfering with the price scale.
Alerts
Available alert conditions include:
Bullish Volume Confirmation
Bearish Volume Confirmation
Strong Bullish Participation
Strong Bearish Participation
Extreme Bullish Volume
Extreme Bearish Volume
By default, alert signals are confirmed at candle close.
Important
RVOL in this indicator uses a rolling Volume MA baseline. It is not a session-normalized or time-of-day Relative Volume calculation.
Volume should always be interpreted together with price action, market structure, liquidity, support/resistance, and the broader market context.
FD Volume Intelligence is a confirmation and analytical tool. It does not predict future price movement and should not be used as a standalone trading system. Indicator

Indicator

Indicator

Indicator
