PROTECTED SOURCE SCRIPT
BD Markup V5

BD Markup V5 — Multi-Time-Frame Extremes & Session Shading
Pine Script v6 • overlay = true
What the indicator does
BD Markup V5 automatically plots horizontal extreme levels (highs & lows) taken from completed candles on seven standard time-frames:
For every candle that closes the script:
To keep the chart tidy you can set a Candle Count per time-frame so only the most-recent n highs & lows remain.
A Base Time-Frame filter hides all lower-TF lines (e.g. choosing “H4” hides H1 & M15).
The indicator also includes three custom intraday sessions whose backgrounds can be shaded with user-defined colours & transparency.
Key inputs
How overlapping levels are handled
When a new line would be created at exactly the same price as an existing one:
This hierarchy keeps the chart clean and emphasises the most significant structure.
Practical uses
Limitations & notes
Disclaimer
This script is published for informational and educational purposes only.
It does not constitute financial advice and is not a solicitation to buy or sell any asset.
Trading and investing involve substantial risk; always perform your own research and consult a licensed professional before acting on any idea.
Past performance or historical levels do not guarantee future results.
By using this indicator you agree that the author is not liable for any loss or damage arising from its use.
Pine Script v6 • overlay = true
What the indicator does
BD Markup V5 automatically plots horizontal extreme levels (highs & lows) taken from completed candles on seven standard time-frames:
- 1 Year (Y) – Purple – “Show Yearly”
- 1 Month (M) – Red – “Show Monthly”
- 1 Week (W) – Orange – “Show Weekly”
- 1 Day (D) – Green – “Show Daily”
- 4 Hour (4H) – Black – “Show 4H”
- 1 Hour (H1) – Yellow – “Show H1”
- 15 Minutes (M15) – Maroon – “Show M15”
For every candle that closes the script:
- Stores that candle’s high & low.
- When a new candle of the same aggregation begins, draws two horizontal lines at those stored prices.
- Extends each line to the right until price touches it; at first touch the extension stops.
To keep the chart tidy you can set a Candle Count per time-frame so only the most-recent n highs & lows remain.
A Base Time-Frame filter hides all lower-TF lines (e.g. choosing “H4” hides H1 & M15).
The indicator also includes three custom intraday sessions whose backgrounds can be shaded with user-defined colours & transparency.
Key inputs
- Base Time-Frame – show only levels whose aggregation order is equal or larger.
- Show TF? check-boxes – enable/disable individual layers.
- Colour pickers & Candle Count – customise appearance & history depth for each layer.
- Chart Timezone – accepts any IANA name or UTC/GMT offset.
- Session 1-3 – toggle, set session string (HHMM-HHMM), colour, and opacity.
How overlapping levels are handled
When a new line would be created at exactly the same price as an existing one:
- If the new level comes from a higher time-frame, lower-TF duplicates are removed.
- If it comes from a lower time-frame, the script skips drawing to preserve the higher-TF level.
This hierarchy keeps the chart clean and emphasises the most significant structure.
Practical uses
- Highlight macro structure (yearly / monthly / weekly extremes).
- Mark intraday reference points (previous session highs & lows).
- Combine with your own strategies for bias, targets, or liquidity zones.
- Visually compare price behaviour inside custom trading sessions.
Limitations & notes
- Levels are based on completed candles only; they never repaint but always lag one full period.
- Once price touches a level its extension stops, but the line remains until pruned by your Candle Count setting.
- The script caps total line objects at 500 to stay within Pine runtime limits.
Disclaimer
This script is published for informational and educational purposes only.
It does not constitute financial advice and is not a solicitation to buy or sell any asset.
Trading and investing involve substantial risk; always perform your own research and consult a licensed professional before acting on any idea.
Past performance or historical levels do not guarantee future results.
By using this indicator you agree that the author is not liable for any loss or damage arising from its use.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.