Indicator

PDH/PDL + Absorption ("Iceberg" Proxy)Plots prior-day high/low and flags potential absorption (iceberg-style) activity at those levels: bars with abnormally high volume but abnormally tight range, occurring near a key level. High volume with little price movement suggests large resting orders are absorbing aggression without letting the level break — a classic footprint ahead of either a rejection or an eventual breakout once the absorbed side gives up.
What it plots
- Prior Day High (red line) / Prior Day Low (green line)
- Optional Premarket High/Low (orange/blue circles, 4:00–9:30 ET, off by default)
- Fuchsia triangle + "ABS" label with volume printed, on any bar flagged as absorption
Signal logic
A bar is flagged when all conditions are met:
1. Volume > user-defined multiple of its N-bar average (default 1.8x over 20 bars)
2. Range (high−low) < user-defined multiple of its N-bar average (default 0.6x over 20 bars)
3. (Optional, on by default) Close is within a user-defined tolerance of PDH or PDL
Inputs
- Show Prior Day High/Low — toggle
- Show Premarket High/Low — toggle
- Level Proximity Tolerance (points) — how close price must be to PDH/PDL to qualify; scale this to your instrument's typical range (tighter for MES/M2K, wider for ES/RTY)
- Volume Lookback / Range Lookback (bars) — averaging windows
- Volume Threshold (x average) — higher = rarer, stronger signals
- Range Threshold (x average) — lower = requires tighter compression
- Only Flag Near PDH/PDL — restrict signal to key levels vs. anywhere on chart
How to use it
This is a confirmation tool, not an entry trigger. An ABS flag at PDH/PDL means volume is being absorbed at that level without a clean break — treat it as "this level is being defended right now." Wait for the next bar(s) to resolve:
- Close pushes through the level on continued volume → likely real break, absorption failed
- Price rejects back away from the level → absorption held, fade back into range
An alert condition ("Absorption/Iceberg Detected") is included — right-click the indicator on the chart → Add Alert to get notified instead of watching manually.
Notes
- PDH/PDL are computed via request.security on the daily timeframe with lookahead_off, so they won't repaint.
- Defaults are a reasonable starting point, not calibrated to any specific instrument — backtest/observe before trusting the thresholds on a new symbol.
- Not a "true" iceberg indicator because it infers absorption from OHLCV (high volume + tight range) rather than reading the actual order book, so it can't confirm a hidden order exists — but it's a useful free proxy for spotting "high effort, low result" zones worth watching, especially layered with PDH/PDL, VWAP, or GEX levels. Indicator

PDH / PDL / ONH / ONL (CST)PDH / PDL / ONH / ONL — Chicago Session Levels
Marks the four key reference levels traders watch each session, calculated in Chicago (CST/CDT) time:
PDH / PDL — the high and low of the previous Regular Trading Hours session (default 08:30–16:00 CT)
ONH / ONL — the high and low of the overnight range, from the prior RTH close to the pre-market cutoff (default 16:00–08:25 CT)
Each level is finalized when its session closes and extends to the right until the next session produces a new one.
Features
Fully customizable session windows and time zone — set it to any market you trade
Independent color, line style (solid/dashed/dotted), and width for each of the four levels
Optional lines anchored at the wick that created the extreme, so you can see exactly which candle produced the level
Vertical session dividers at day start and day end, with their own colors, styles, and history limit
Price labels that follow the right edge of the chart
Option to keep prior days' levels on screen as fixed segments
Built-in alerts for crosses above PDH/ONH and below PDL/ONL
How to use
Apply on an intraday timeframe — 5-minute or lower gives the most accurate overnight extremes. Enable "Extended Trading Hours" in your chart settings so overnight data is available. These levels commonly act as support/resistance, liquidity targets, and breakout reference points at the open.
This indicator is a visualization tool, not a trading signal. Test on your own instruments and timeframes before relying on it. Indicator

Market Regime - Trend or RangeWHAT IT DOES
Market Regime — Trend or Range answers one question at a glance: is the current market TRENDING or RANGING? It combines three established, independent regime measures and requires a 2-of-3 majority vote before declaring a verdict, so a single noisy reading cannot flip the classification.
WHY THESE THREE COMPONENTS WORK TOGETHER
Each component measures a different aspect of market character, so their agreement is meaningful rather than redundant:
1) ADX (Wilder) measures directional strength. Vote: Trend above the ADX Trend Threshold (default 25), Range below the ADX Range Threshold (default 20), otherwise neutral.
2) Kaufman Efficiency Ratio measures how efficiently price travels: net change over the lookback divided by the sum of absolute bar-to-bar changes (default length 20). A high ratio means price moved directionally; a low ratio means it churned. Vote: Trend above 0.50, Range below 0.30.
3) Choppiness Index measures sideways versus directional behavior using the log ratio of summed true range to the total high-low range of the lookback (default length 14). Vote: Trend below 38.2, Range above 61.8.
The votes are summed into a score from -3 to +3. TREND requires +2 or more, RANGE requires -2 or less, anything else is MIXED. This 2-of-3 design is the purpose of the combination: ADX alone lags turns, the Efficiency Ratio alone is jumpy, and Choppiness alone ignores direction. Requiring agreement between at least two independent measures filters each one's weakness instead of merely displaying three indicators side by side. The script also derives a 0-100 strength meter by averaging normalized ADX, normalized Efficiency Ratio and inverted Choppiness.
WHAT APPEARS ON THE CHART
- Optional background tint: teal while TREND, orange while RANGE, none while MIXED.
- A dashboard table (corner selectable) showing the verdict, each component's current value with its own vote mark (up arrow = trend vote, down arrow = range vote, dot = neutral), the strength meter, the raw vote score, and a Playbook line that reads Trend tools, Fade tools, or Stand aside.
INPUTS AND DEFAULTS
ADX Length (14), ADX Trend Threshold (25), ADX Range Threshold (20), Efficiency Ratio Length (20), ER Trend Threshold (0.50), ER Range Threshold (0.30), Choppiness Length (14), plus visual toggles for the background tint and the dashboard position. Defaults are the classic reference values for each measure, not optimized settings.
HOW TO USE IT
Read it on your trading timeframe for the live regime, and optionally on a higher timeframe for the session's broader character. On TREND verdicts, continuation methods are generally more appropriate; on RANGE verdicts, mean-reversion and fade methods; on MIXED, caution or smaller size. It works on any symbol and timeframe and makes no claim of special performance on any market.
ALERTS
Two alert conditions are included and fire when the composite verdict changes: "Switched to TREND" and "Switched to RANGE".
BEHAVIOR AND LIMITATIONS
- All calculations run on the chart timeframe with no higher-timeframe requests, so nothing repaints from other timeframes. Values on the live bar update until that bar closes, then are fixed.
- A regime classifier describes current conditions. It does not predict future price and it is not a signal generator.
- Thresholds are configurable; changing them changes how strict each vote is.
This is an informational analysis tool for chart study, not financial advice. Past market behavior does not guarantee future results. Always apply your own risk management. Indicator

Manual Zone & Level PlotterDraws price zones and horizontal levels from a short text input, so you can keep a manually-defined map of the market on your chart without re-drawing it by hand every day.
WHY
Many traders keep a small set of levels and zones they care about (a directional target area, one or two areas where they wait for entries, and the nearest support/resistance). Re-drawing them by hand on every timeframe and every device is tedious and error-prone. This script keeps that map in two short text fields, so it survives timeframe changes, chart reloads and switching devices.
HOW IT WORKS
You type (or paste) two strings in the settings.
Zones field (settings: "Zones") - groups separated by ";", items separated by ","
G = primary zone, O = secondary zone, X = marker levels.
A range like 4371.83-4400 is drawn as a box; a single number is drawn as a line.
Example: G4371.83-4400;O4325-4350;X4350
Levels field (settings: "Levels") - R = levels above, S = levels below
Example: R4350,4400;S4325,4311.89
Everything is drawn with extend on both sides, so the zones stay visible wherever you scroll. Optional price tags can be turned off. Box transparency and line width are adjustable. Malformed numbers are skipped instead of breaking the whole drawing.
NOTES
- The script contains no signals, no alerts, no buy/sell logic and no automatic level detection. It only draws what you type. All numbers come from you.
- Nothing is repainted: the drawing is rebuilt on the last bar from your input only.
- Works on any symbol and timeframe.
This is a drawing utility for personal chart notes. It is not investment advice and it does not tell you when to buy or sell. Trading involves risk; make your own decisions. Indicator

Indicator

Indicator

Indicator

MNQ MTF Dashboard [RSI/ADX/Stoch/ATR]A compact multi-timeframe table that reads four core indicators across five timeframes at once, so you can gauge trend, momentum, direction, and volatility without flipping charts.
For the chart's current symbol, it displays 5m, 15m, 1H, 4H, and 1D in a single color-coded panel:
ADX (14) — trend strength. Green above 25 (trending), orange 20–25 (borderline), gray below 20 (no trend/chop). ADX measures strength only, not direction.
RSI (14) — directional bias. Green above 50 (bullish lean), red below (bearish lean).
Stochastic (14,3,3) — momentum. Colored by %K vs %D and level; shows whether short-term momentum is rising or fading, and when it's stretched.
ATR (14) — volatility, in points. Read each timeframe relative to its own norm; useful for stop-sizing and spotting volatility expansion.
Bias — a quick synthesis cell combining RSI and Stochastic into Bull / Bear / Mixed. Indicator

Indicator

Indicator

Indicator

Indicator

2.0- Killzones EUR/GBP - Manuel De Jesus Leiva// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © tradeforopp
//@version=6
indicator("Killzones EUR/GBP - Manuel De Jesus Leiva", "Killzones EUR/GBP - Manuel De Jesus Leiva", true, max_labels_count = 500, max_lines_count = 500, max_boxes_count = 500)
// ---------------------------------------- Constant Functions --------------------------------------------------
get_line_type(_style) =>
switch _style
"Solid" => line.style_solid
"Dotted" => line.style_dotted
"Dashed" => line.style_dashed
get_size(x) =>
switch x
"Auto" => size.auto
"Tiny" => size.tiny
"Small" => size.small
"Normal" => size.normal
"Large" => size.large
"Huge" => size.huge
get_table_pos(pos) =>
switch pos
"Bottom Center" => position.bottom_center
"Bottom Left" => position.bottom_left
"Bottom Right" => position.bottom_right
"Middle Center" => position.middle_center
"Middle Left" => position.middle_left
"Middle Right" => position.middle_right
"Top Center" => position.top_center
"Top Left" => position.top_left
"Top Right" => position.top_right
// ---------------------------------------- Constant Functions --------------------------------------------------
// ---------------------------------------- Inputs --------------------------------------------------
var g_SETTINGS = "Settings"
max_days = input.int(1000, "Session Drawing Limit", 1, tooltip = "Only this many drawings will be kept on the chart, for each selected drawing type (killzone boxes, pivot lines, open lines, etc.). Set to 200 for ~6 months of sessions.", group = g_SETTINGS)
tf_limit = input.timeframe("60", "Timeframe Limit", tooltip = "Drawings will not appear on timeframes greater than or equal to this", group = g_SETTINGS)
gmt_tz = input.string('America/New_York', "Timezone", options = , tooltip = "Note GMT is not adjusted to reflect Daylight Saving Time changes", group = g_SETTINGS)
lbl_size = get_size(input.string('Normal', "Label Size", options = , tooltip = "The size of all labels", group = g_SETTINGS))
txt_color = input.color(color.black, "Text Color", tooltip = "The color of all label and table text", group = g_SETTINGS)
use_cutoff = input.bool(false, "Drawing Cutoff Time", inline = "CO", tooltip = "When enabled, all pivots and open price lines will stop extending at this time", group = g_SETTINGS)
cutoff = input.session("1800-1801", "", inline = "CO", group = g_SETTINGS)
var tf_limit_is_equal_or_more_chart_tf = timeframe.in_seconds('') <= timeframe.in_seconds(tf_limit)
var g_KZ = "Killzones"
// General Killzone Settings
show_kz = input.bool(true, "Show Killzone Boxes", inline = "KZ", group = g_KZ)
show_kz_text = input.bool(false, "Display Text", inline = "KZ", group = g_KZ)
box_transparency = input.int(70, "Box Transparency", 0, 100, group = g_KZ)
text_transparency = input.int(50, "Text Transparency", 0, 100, group = g_KZ)
// ==================== KILLZONE 01 ====================
use_kz01 = input.bool(true, "00:00-01:00", inline = "KZ01", group = g_KZ)
kz01_txt = input.string("00-01", "", inline = "KZ01", group = g_KZ)
kz01 = input.session("0000-0100", "", inline = "KZ01", group = g_KZ)
kz01_color = input.color(color.blue, "", inline = "KZ01", group = g_KZ)
// ==================== KILLZONE 02 ====================
use_kz02 = input.bool(true, "01:00-02:00", inline = "KZ02", group = g_KZ)
kz02_txt = input.string("01-02", "", inline = "KZ02", group = g_KZ)
kz02 = input.session("0100-0200", "", inline = "KZ02", group = g_KZ)
kz02_color = input.color(color.blue, "", inline = "KZ02", group = g_KZ)
// ==================== KILLZONE 03 ====================
use_kz03 = input.bool(true, "02:00-03:00", inline = "KZ03", group = g_KZ)
kz03_txt = input.string("02-03", "", inline = "KZ03", group = g_KZ)
kz03 = input.session("0200-0300", "", inline = "KZ03", group = g_KZ)
kz03_color = input.color(color.blue, "", inline = "KZ03", group = g_KZ)
// ==================== KILLZONE 04 ====================
use_kz04 = input.bool(true, "03:00-04:00", inline = "KZ04", group = g_KZ)
kz04_txt = input.string("03-04", "", inline = "KZ04", group = g_KZ)
kz04 = input.session("0300-0400", "", inline = "KZ04", group = g_KZ)
kz04_color = input.color(color.blue, "", inline = "KZ04", group = g_KZ)
// ==================== KILLZONE 05 ====================
use_kz05 = input.bool(true, "04:00-05:00", inline = "KZ05", group = g_KZ)
kz05_txt = input.string("04-05", "", inline = "KZ05", group = g_KZ)
kz05 = input.session("0400-0500", "", inline = "KZ05", group = g_KZ)
kz05_color = input.color(color.blue, "", inline = "KZ05", group = g_KZ)
// ==================== KILLZONE 06 ====================
use_kz06 = input.bool(true, "05:00-06:00", inline = "KZ06", group = g_KZ)
kz06_txt = input.string("05-06", "", inline = "KZ06", group = g_KZ)
kz06 = input.session("0500-0600", "", inline = "KZ06", group = g_KZ)
kz06_color = input.color(color.blue, "", inline = "KZ06", group = g_KZ)
// ==================== KILLZONE 07 ====================
use_kz07 = input.bool(true, "06:00-07:00", inline = "KZ07", group = g_KZ)
kz07_txt = input.string("06-07", "", inline = "KZ07", group = g_KZ)
kz07 = input.session("0600-0700", "", inline = "KZ07", group = g_KZ)
kz07_color = input.color(color.blue, "", inline = "KZ07", group = g_KZ)
// ==================== KILLZONE 08 ====================
use_kz08 = input.bool(true, "07:00-08:00", inline = "KZ08", group = g_KZ)
kz08_txt = input.string("07-08", "", inline = "KZ08", group = g_KZ)
kz08 = input.session("0700-0800", "", inline = "KZ08", group = g_KZ)
kz08_color = input.color(color.blue, "", inline = "KZ08", group = g_KZ)
// ==================== KILLZONE 09 ====================
use_kz09 = input.bool(true, "08:00-09:00", inline = "KZ09", group = g_KZ)
kz09_txt = input.string("08-09", "", inline = "KZ09", group = g_KZ)
kz09 = input.session("0800-0900", "", inline = "KZ09", group = g_KZ)
kz09_color = input.color(color.blue, "", inline = "KZ09", group = g_KZ)
// ==================== KILLZONE 10 ====================
use_kz10 = input.bool(true, "09:00-10:00", inline = "KZ10", group = g_KZ)
kz10_txt = input.string("09-10", "", inline = "KZ10", group = g_KZ)
kz10 = input.session("0900-1000", "", inline = "KZ10", group = g_KZ)
kz10_color = input.color(color.blue, "", inline = "KZ10", group = g_KZ)
// ==================== KILLZONE 11 ====================
use_kz11 = input.bool(true, "10:00-11:00", inline = "KZ11", group = g_KZ)
kz11_txt = input.string("10-11", "", inline = "KZ11", group = g_KZ)
kz11 = input.session("1000-1100", "", inline = "KZ11", group = g_KZ)
kz11_color = input.color(color.blue, "", inline = "KZ11", group = g_KZ)
// ==================== KILLZONE 12 ====================
use_kz12 = input.bool(true, "11:00-12:00", inline = "KZ12", group = g_KZ)
kz12_txt = input.string("11-12", "", inline = "KZ12", group = g_KZ)
kz12 = input.session("1100-1200", "", inline = "KZ12", group = g_KZ)
kz12_color = input.color(color.blue, "", inline = "KZ12", group = g_KZ)
// ==================== KILLZONE 13 ====================
use_kz13 = input.bool(true, "12:00-13:00", inline = "KZ13", group = g_KZ)
kz13_txt = input.string("12-13", "", inline = "KZ13", group = g_KZ)
kz13 = input.session("1200-1300", "", inline = "KZ13", group = g_KZ)
kz13_color = input.color(color.blue, "", inline = "KZ13", group = g_KZ)
// ==================== KILLZONE 14 ====================
use_kz14 = input.bool(true, "13:00-14:00", inline = "KZ14", group = g_KZ)
kz14_txt = input.string("13-14", "", inline = "KZ14", group = g_KZ)
kz14 = input.session("1300-1400", "", inline = "KZ14", group = g_KZ)
kz14_color = input.color(color.blue, "", inline = "KZ14", group = g_KZ)
// ==================== KILLZONE 15 ====================
use_kz15 = input.bool(true, "14:00-15:00", inline = "KZ15", group = g_KZ)
kz15_txt = input.string("14-15", "", inline = "KZ15", group = g_KZ)
kz15 = input.session("1400-1500", "", inline = "KZ15", group = g_KZ)
kz15_color = input.color(color.blue, "", inline = "KZ15", group = g_KZ)
// ==================== KILLZONE 16 ====================
use_kz16 = input.bool(true, "15:00-16:00", inline = "KZ16", group = g_KZ)
kz16_txt = input.string("15-16", "", inline = "KZ16", group = g_KZ)
kz16 = input.session("1500-1600", "", inline = "KZ16", group = g_KZ)
kz16_color = input.color(color.blue, "", inline = "KZ16", group = g_KZ)
// ==================== KILLZONE 17 ====================
use_kz17 = input.bool(true, "16:00-17:00", inline = "KZ17", group = g_KZ)
kz17_txt = input.string("16-17", "", inline = "KZ17", group = g_KZ)
kz17 = input.session("1600-1700", "", inline = "KZ17", group = g_KZ)
kz17_color = input.color(color.blue, "", inline = "KZ17", group = g_KZ)
// ==================== KILLZONE 18 ====================
use_kz18 = input.bool(true, "17:00-18:00", inline = "KZ18", group = g_KZ)
kz18_txt = input.string("17-18", "", inline = "KZ18", group = g_KZ)
kz18 = input.session("1700-1800", "", inline = "KZ18", group = g_KZ)
kz18_color = input.color(color.blue, "", inline = "KZ18", group = g_KZ)
// ==================== KILLZONE 19 ====================
use_kz19 = input.bool(true, "18:00-19:00", inline = "KZ19", group = g_KZ)
kz19_txt = input.string("18-19", "", inline = "KZ19", group = g_KZ)
kz19 = input.session("1800-1900", "", inline = "KZ19", group = g_KZ)
kz19_color = input.color(color.blue, "", inline = "KZ19", group = g_KZ)
// ==================== KILLZONE 20 ====================
use_kz20 = input.bool(true, "19:00-20:00", inline = "KZ20", group = g_KZ)
kz20_txt = input.string("19-20", "", inline = "KZ20", group = g_KZ)
kz20 = input.session("1900-2000", "", inline = "KZ20", group = g_KZ)
kz20_color = input.color(color.blue, "", inline = "KZ20", group = g_KZ)
// ==================== KILLZONE 21 ====================
use_kz21 = input.bool(true, "20:00-21:00", inline = "KZ21", group = g_KZ)
kz21_txt = input.string("20-21", "", inline = "KZ21", group = g_KZ)
kz21 = input.session("2000-2100", "", inline = "KZ21", group = g_KZ)
kz21_color = input.color(color.blue, "", inline = "KZ21", group = g_KZ)
// ==================== KILLZONE 22 ====================
use_kz22 = input.bool(true, "21:00-22:00", inline = "KZ22", group = g_KZ)
kz22_txt = input.string("21-22", "", inline = "KZ22", group = g_KZ)
kz22 = input.session("2100-2200", "", inline = "KZ22", group = g_KZ)
kz22_color = input.color(color.blue, "", inline = "KZ22", group = g_KZ)
// ==================== KILLZONE 23 ====================
use_kz23 = input.bool(true, "22:00-23:00", inline = "KZ23", group = g_KZ)
kz23_txt = input.string("22-23", "", inline = "KZ23", group = g_KZ)
kz23 = input.session("2200-2300", "", inline = "KZ23", group = g_KZ)
kz23_color = input.color(color.blue, "", inline = "KZ23", group = g_KZ)
// ==================== KILLZONE 24 ====================
use_kz24 = input.bool(true, "23:00-00:00", inline = "KZ24", group = g_KZ)
kz24_txt = input.string("23-00", "", inline = "KZ24", group = g_KZ)
kz24 = input.session("2300-0000", "", inline = "KZ24", group = g_KZ)
kz24_color = input.color(color.blue, "", inline = "KZ24", group = g_KZ)
// ==================== KILLZONE 25 ====================
use_kz25 = input.bool(true, "17:00-21:00", inline = "KZ25", group = g_KZ)
kz25_txt = input.string("H4", "", inline = "KZ25", group = g_KZ)
kz25 = input.session("1700-2100", "", inline = "KZ25", group = g_KZ)
kz25_color = input.color(color.orange, "", inline = "KZ25", group = g_KZ)
// ==================== KILLZONE 26 ====================
use_kz26 = input.bool(true, "21:00-01:00", inline = "KZ26", group = g_KZ)
kz26_txt = input.string("H4", "", inline = "KZ26", group = g_KZ)
kz26 = input.session("2100-0100", "", inline = "KZ26", group = g_KZ)
kz26_color = input.color(color.aqua, "", inline = "KZ26", group = g_KZ)
// ==================== KILLZONE 27 ====================
use_kz27 = input.bool(true, "01:00-05:00", inline = "KZ27", group = g_KZ)
kz27_txt = input.string("H4", "", inline = "KZ27", group = g_KZ)
kz27 = input.session("0100-0500", "", inline = "KZ27", group = g_KZ)
kz27_color = input.color(color.green, "", inline = "KZ27", group = g_KZ)
// ==================== KILLZONE 28 ====================
use_kz28 = input.bool(true, "05:00-09:00", inline = "KZ28", group = g_KZ)
kz28_txt = input.string("H4", "", inline = "KZ28", group = g_KZ)
kz28 = input.session("0500-0900", "", inline = "KZ28", group = g_KZ)
kz28_color = input.color(color.yellow, "", inline = "KZ28", group = g_KZ)
// ==================== KILLZONE 29 ====================
use_kz29 = input.bool(true, "09:00-13:00", inline = "KZ29", group = g_KZ)
kz29_txt = input.string("H4", "", inline = "KZ29", group = g_KZ)
kz29 = input.session("0900-1300", "", inline = "KZ29", group = g_KZ)
kz29_color = input.color(color.red, "", inline = "KZ29", group = g_KZ)
// ==================== KILLZONE 30 ====================
use_kz30 = input.bool(true, "13:00-17:00", inline = "KZ30", group = g_KZ)
kz30_txt = input.string("H4", "", inline = "KZ30", group = g_KZ)
kz30 = input.session("1300-1700", "", inline = "KZ30", group = g_KZ)
kz30_color = input.color(color.purple, "", inline = "KZ30", group = g_KZ)
// ==================== KILLZONE 31 ====================
use_kz31 = input.bool(false, "05:00-17:00", inline = "KZ31", group = g_KZ)
kz31_txt = input.string("H12", "", inline = "KZ31", group = g_KZ)
kz31 = input.session("0500-1700", "", inline = "KZ31", group = g_KZ)
kz31_color = input.color(color.purple, "", inline = "KZ31", group = g_KZ)
// ==================== KILLZONE 32 ====================
use_kz32 = input.bool(false, "17:00-05:00", inline = "KZ32", group = g_KZ)
kz32_txt = input.string("H12", "", inline = "KZ32", group = g_KZ)
kz32 = input.session("1700-0500", "", inline = "KZ32", group = g_KZ)
kz32_color = input.color(color.purple, "", inline = "KZ32", group = g_KZ)
// ==================== KILLZONE 33 ====================
use_kz33 = input.bool(false, "17:00-01:00", inline = "KZ33", group = g_KZ)
kz33_txt = input.string("H8", "", inline = "KZ33", group = g_KZ)
kz33 = input.session("1700-0100", "", inline = "KZ33", group = g_KZ)
kz33_color = input.color(color.purple, "", inline = "KZ33", group = g_KZ)
// ==================== KILLZONE 34 ====================
use_kz34 = input.bool(false, "01:00-09:00", inline = "KZ34", group = g_KZ)
kz34_txt = input.string("H8", "", inline = "KZ34", group = g_KZ)
kz34 = input.session("0100-0900", "", inline = "KZ34", group = g_KZ)
kz34_color = input.color(color.purple, "", inline = "KZ34", group = g_KZ)
// ==================== KILLZONE 35 ====================
use_kz35 = input.bool(false, "09:00-17:00", inline = "KZ35", group = g_KZ)
kz35_txt = input.string("H8", "", inline = "KZ35", group = g_KZ)
kz35 = input.session("0900-1700", "", inline = "KZ35", group = g_KZ)
kz35_color = input.color(color.purple, "", inline = "KZ35", group = g_KZ)
// ==================== KILLZONE 36 ====================
use_kz36 = input.bool(false, "17:00-23:00", inline = "KZ36", group = g_KZ)
kz36_txt = input.string("H6", "", inline = "KZ36", group = g_KZ)
kz36 = input.session("1700-2300", "", inline = "KZ36", group = g_KZ)
kz36_color = input.color(color.purple, "", inline = "KZ36", group = g_KZ)
// ==================== KILLZONE 37 ====================
use_kz37 = input.bool(false, "23:00-05:00", inline = "KZ37", group = g_KZ)
kz37_txt = input.string("H6", "", inline = "KZ37", group = g_KZ)
kz37 = input.session("2300-0500", "", inline = "KZ37", group = g_KZ)
kz37_color = input.color(color.purple, "", inline = "KZ37", group = g_KZ)
// ==================== KILLZONE 38 ====================
use_kz38 = input.bool(false, "05:00-11:00", inline = "KZ38", group = g_KZ)
kz38_txt = input.string("H6", "", inline = "KZ38", group = g_KZ)
kz38 = input.session("0500-1100", "", inline = "KZ38", group = g_KZ)
kz38_color = input.color(color.purple, "", inline = "KZ38", group = g_KZ)
// ==================== KILLZONE 39 ====================
use_kz39 = input.bool(false, "11:00-17:00", inline = "KZ39", group = g_KZ)
kz39_txt = input.string("H6", "", inline = "KZ39", group = g_KZ)
kz39 = input.session("1100-1700", "", inline = "KZ39", group = g_KZ)
kz39_color = input.color(color.purple, "", inline = "KZ39", group = g_KZ)
var g_LABELS = "Killzone Pivots"
show_pivots = input.bool(false, "Show Pivots", inline = "PV", group = g_LABELS)
use_alerts = input.bool(false, "Alert Broken Pivots", inline = "PV", tooltip = "The desired killzones must be enabled at the time that an alert is created, along with the show pivots option, in order for alerts to work", group = g_LABELS)
show_midpoints = input.bool(false, "Show Pivot Midpoints", inline = "mp", group = g_LABELS)
stop_midpoints = input.bool(false, "Stop Once Mitigated", inline = "mp", group = g_LABELS)
show_labels = input.bool(false, "Show Pivot Labels", inline = "LB", tooltip = "Show labels denoting each killzone's high and low. Optionally choose to show the price of each level. Right side will show labels on the right-hand side of the chart until they are reached", group = g_LABELS)
label_price = input.bool(false, "Display Price", inline = "LB", group = g_LABELS)
label_right = input.bool(false, "Right Side", inline = "LB", group = g_LABELS)
ext_pivots = input.string("Until Mitigated", "Extend Pivots...", options = , group = g_LABELS)
ext_which = input.string("All", "...From Which Sessions", options = , group = g_LABELS)
ash_str = input.string("AS.H", "Killzone 1 Labels", inline = "L_AS", group = g_LABELS)
asl_str = input.string("AS.L", "", inline = "L_AS", group = g_LABELS)
loh_str = input.string("LO.H", "Killzone 2 Labels", inline = "L_LO", group = g_LABELS)
lol_str = input.string("LO.L", "", inline = "L_LO", group = g_LABELS)
nah_str = input.string("NYAM.H", "Killzone 3 Labels", inline = "L_NA", group = g_LABELS)
nal_str = input.string("NYAM.L", "", inline = "L_NA", group = g_LABELS)
nlh_str = input.string("NYL.H", "Killzone 4 Labels", inline = "L_NL", group = g_LABELS)
nll_str = input.string("NYL.L", "", inline = "L_NL", group = g_LABELS)
nph_str = input.string("NYPM.H", "Killzone 5 Labels", inline = "L_NP", group = g_LABELS)
npl_str = input.string("NYPM.L", "", inline = "L_NP", group = g_LABELS)
kzp_style = get_line_type(input.string(defval = 'Solid', title = "Pivot Style", options = , inline = "KZP", group = g_LABELS))
kzp_width = input.int(1, "", inline = "KZP", group = g_LABELS)
kzm_style = get_line_type(input.string(defval = 'Dotted', title = "Midpoint Style", options = , inline = "KZM", group = g_LABELS))
kzm_width = input.int(1, "", inline = "KZM", group = g_LABELS)
var g_RNG = "Killzone Range"
show_range = input.bool(false, "Show Killzone Range", tooltip = "Show the most recent ranges of each selected killzone, from high to low", group = g_RNG)
show_range_avg = input.bool(false, "Show Average", tooltip = "Show the average range of each selected killzone", group = g_RNG)
range_avg = input.int(5, "Average Length", 0, tooltip = "This many previous sessions will be used to calculate the average. If there isn't enough data on the current chart, it will use as many sessions as possible", group = g_RNG)
range_pos = get_table_pos(input.string('Top Right', "Table Position", options = , group = g_RNG))
range_size = get_size(input.string('Normal', "Table Size", options = , group = g_RNG))
var g_DWM = "Day - Week - Month"
sep_unlimited = input.bool(false, "Unlimited", tooltip = "Unlimited will show as many of the selected lines as possible. Otherwise, the session drawing limit will be used", group = g_DWM)
alert_HL = input.bool(false, "Alert High/Low Break", tooltip = "Alert when any selected highs and lows are traded through. The desired timeframe's high/low option must be enabled at the time that an alert is created", group = g_DWM)
show_d_open = input.bool(false, "D Open", inline = "DO", group = g_DWM)
dhl = input.bool(false, "High/Low", inline = "DO", tooltip = "", group = g_DWM)
ds = input.bool(false, "Separators", inline = "DO", tooltip = "Mark where a new day begins", group = g_DWM)
d_color = input.color(color.blue, "", inline = "DO", group = g_DWM)
show_w_open = input.bool(false, "W Open", inline = "WO", group = g_DWM)
whl = input.bool(false, "High/Low", inline = "WO", tooltip = "", group = g_DWM)
ws = input.bool(false, "Separators", inline = "WO", tooltip = "Mark where a new week begins", group = g_DWM)
w_color = input.color(#089981, "", inline = "WO", group = g_DWM)
show_m_open = input.bool(false, "M Open", inline = "MO", group = g_DWM)
mhl = input.bool(false, "High/Low", inline = "MO", tooltip = "", group = g_DWM)
ms = input.bool(false, "Separators", inline = "MO", tooltip = "Mark where a new month begins", group = g_DWM)
m_color = input.color(color.red, "", inline = "MO", group = g_DWM)
htf_style = get_line_type(input.string(defval = 'Solid', title = "Style", options = , inline = "D0", group = g_DWM))
htf_width = input.int(1, "", inline = "D0", group = g_DWM)
dow_labels = input.bool(false, "Day of Week Labels", inline = "DOW", group = g_DWM)
dow_yloc = input.string('Bottom', "", options = , inline = "DOW", group = g_DWM)
dow_xloc = input.string('Midnight', "", options = , inline = "DOW", group = g_DWM)
dow_hide_wknd = input.bool(false, "Hide Weekend Labels", group = g_DWM)
var g_OPEN = "Opening Prices"
open_unlimited = input.bool(false, "Unlimited", tooltip = "Unlimited will show as many of the selected lines as possible. Otherwise, the session drawing limit will be used", group = g_OPEN)
use_h1 = input.bool(false, "", inline = "H1", group = g_OPEN)
h1_text = input.string("17:00 H12/H8/H6/H4", "", inline = "H1", group = g_OPEN)
h1 = input.session("1700-1701", "", inline = "H1", group = g_OPEN)
h1_color = input.color(color.black, "", inline = "H1", group = g_OPEN)
use_h2 = input.bool(false, "", inline = "H2", group = g_OPEN)
h2_text = input.string("05:00 H12/H6/H4", "", inline = "H2", group = g_OPEN)
h2 = input.session("0500-0501", "", inline = "H2", group = g_OPEN)
h2_color = input.color(color.black, "", inline = "H2", group = g_OPEN)
use_h3 = input.bool(false, "", inline = "H3", group = g_OPEN)
h3_text = input.string("01:00 H8/H4", "", inline = "H3", group = g_OPEN)
h3 = input.session("0100-0101", "", inline = "H3", group = g_OPEN)
h3_color = input.color(color.black, "", inline = "H3", group = g_OPEN)
use_h4 = input.bool(false, "", inline = "H4", group = g_OPEN)
h4_text = input.string("09:00 H8/H4", "", inline = "H4", group = g_OPEN)
h4 = input.session("0900-0901", "", inline = "H4", group = g_OPEN)
h4_color = input.color(color.black, "", inline = "H4", group = g_OPEN)
use_h5 = input.bool(false, "", inline = "H5", group = g_OPEN)
h5_text = input.string("23:00 H6", "", inline = "H5", group = g_OPEN)
h5 = input.session("2300-2301", "", inline = "H5", group = g_OPEN)
h5_color = input.color(color.black, "", inline = "H5", group = g_OPEN)
use_h6 = input.bool(false, "", inline = "H6", group = g_OPEN)
h6_text = input.string("11:00 H6", "", inline = "H6", group = g_OPEN)
h6 = input.session("1100-1101", "", inline = "H6", group = g_OPEN)
h6_color = input.color(color.black, "", inline = "H6", group = g_OPEN)
use_h7 = input.bool(false, "", inline = "H7", group = g_OPEN)
h7_text = input.string("21:00 H4", "", inline = "H7", group = g_OPEN)
h7 = input.session("2100-2101", "", inline = "H7", group = g_OPEN)
h7_color = input.color(color.black, "", inline = "H7", group = g_OPEN)
use_h8 = input.bool(false, "", inline = "H8", group = g_OPEN)
h8_text = input.string("13:00 H4", "", inline = "H8", group = g_OPEN)
h8 = input.session("1300-1301", "", inline = "H8", group = g_OPEN)
h8_color = input.color(color.black, "", inline = "H8", group = g_OPEN)
hz_style = get_line_type(input.string(defval = 'Dotted', title = "Style", options = , inline = "H0", group = g_OPEN))
hz_width = input.int(1, "", inline = "H0", group = g_OPEN)
var g_VERTICAL = "Timestamps"
v_unlimited = input.bool(false, "Unlimited", tooltip = "Unlimited will show as many of the selected lines as possible. Otherwise, the session drawing limit will be used", group = g_VERTICAL)
use_v1 = input.bool(false, "", inline = "V1", group = g_VERTICAL)
v1 = input.session("0000-0001", "", inline = "V1", group = g_VERTICAL)
v1_color = input.color(color.black, "", inline = "V1", group = g_VERTICAL)
use_v2 = input.bool(false, "", inline = "V2", group = g_VERTICAL)
v2 = input.session("0800-0801", "", inline = "V2", group = g_VERTICAL)
v2_color = input.color(color.black, "", inline = "V2", group = g_VERTICAL)
use_v3 = input.bool(false, "", inline = "V3", group = g_VERTICAL)
v3 = input.session("1000-1001", "", inline = "V3", group = g_VERTICAL)
v3_color = input.color(color.black, "", inline = "V3", group = g_VERTICAL)
use_v4 = input.bool(false, "", inline = "V4", group = g_VERTICAL)
v4 = input.session("1200-1201", "", inline = "V4", group = g_VERTICAL)
v4_color = input.color(color.black, "", inline = "V4", group = g_VERTICAL)
vl_style = get_line_type(input.string(defval = 'Dotted', title = "Style", options = , inline = "V0", group = g_VERTICAL))
vl_width = input.int(1, "", inline = "V0", group = g_VERTICAL)
// ---------------------------------------- Inputs --------------------------------------------------
// ---------------------------------------- Variables & Constants --------------------------------------------------
type kz
string _title
array _box
array _hi_line
array _md_line
array _lo_line
array _hi_label
array _lo_label
array _hi_valid
array _md_valid
array _lo_valid
array _range_store
float _range_current
type hz
array LN
array LB
array CO
type dwm_hl
array hi_line
array lo_line
array hi_label
array lo_label
bool hit_high = false
bool hit_low = false
type dwm_info
string tf
float o = na
float h = na
float l = na
float ph = na
float pl = na
type lines_helper
hz _hz
string h
string h_text
color h_color
initLines() =>
array res = array.new()
if use_h1
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h1, h1_text, h1_color))
if use_h2
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h2, h2_text, h2_color))
if use_h3
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h3, h3_text, h3_color))
if use_h4
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h4, h4_text, h4_color))
if use_h5
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h5, h5_text, h5_color))
if use_h6
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h6, h6_text, h6_color))
if use_h7
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h7, h7_text, h7_color))
if use_h8
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h8, h8_text, h8_color))
res
var array lines = initLines()
type kz_helper
kz _kz
string session
color c
string box_txt
string hi_txt
string lo_txt
initKZ() =>
array res = array.new()
if use_kz01
res.push(kz_helper.new(
kz.new(kz01_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz01, kz01_color, kz01_txt, "KZ01.H", "KZ01.L"
))
if use_kz02
res.push(kz_helper.new(
kz.new(kz02_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz02, kz02_color, kz02_txt, "KZ02.H", "KZ02.L"
))
if use_kz03
res.push(kz_helper.new(
kz.new(kz03_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz03, kz03_color, kz03_txt, "KZ03.H", "KZ03.L"
))
if use_kz04
res.push(kz_helper.new(
kz.new(kz04_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz04, kz04_color, kz04_txt, "KZ04.H", "KZ04.L"
))
if use_kz05
res.push(kz_helper.new(
kz.new(kz05_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz05, kz05_color, kz05_txt, "KZ05.H", "KZ05.L"
))
if use_kz06
res.push(kz_helper.new(
kz.new(kz06_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz06, kz06_color, kz06_txt, "KZ06.H", "KZ06.L"
))
if use_kz07
res.push(kz_helper.new(
kz.new(kz07_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz07, kz07_color, kz07_txt, "KZ07.H", "KZ07.L"
))
if use_kz08
res.push(kz_helper.new(
kz.new(kz08_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz08, kz08_color, kz08_txt, "KZ08.H", "KZ08.L"
))
if use_kz09
res.push(kz_helper.new(
kz.new(kz09_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz09, kz09_color, kz09_txt, "KZ09.H", "KZ09.L"
))
if use_kz10
res.push(kz_helper.new(
kz.new(kz10_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz10, kz10_color, kz10_txt, "KZ10.H", "KZ10.L"
))
if use_kz11
res.push(kz_helper.new(
kz.new(kz11_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz11, kz11_color, kz11_txt, "KZ11.H", "KZ11.L"
))
if use_kz12
res.push(kz_helper.new(
kz.new(kz12_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz12, kz12_color, kz12_txt, "KZ12.H", "KZ12.L"
))
if use_kz13
res.push(kz_helper.new(
kz.new(kz13_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz13, kz13_color, kz13_txt, "KZ13.H", "KZ13.L"
))
if use_kz14
res.push(kz_helper.new(
kz.new(kz14_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz14, kz14_color, kz14_txt, "KZ14.H", "KZ14.L"
))
if use_kz15
res.push(kz_helper.new(
kz.new(kz15_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz15, kz15_color, kz15_txt, "KZ15.H", "KZ15.L"
))
if use_kz16
res.push(kz_helper.new(
kz.new(kz16_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz16, kz16_color, kz16_txt, "KZ16.H", "KZ16.L"
))
if use_kz17
res.push(kz_helper.new(
kz.new(kz17_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz17, kz17_color, kz17_txt, "KZ17.H", "KZ17.L"
))
if use_kz18
res.push(kz_helper.new(
kz.new(kz18_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz18, kz18_color, kz18_txt, "KZ18.H", "KZ18.L"
))
if use_kz19
res.push(kz_helper.new(
kz.new(kz19_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz19, kz19_color, kz19_txt, "KZ19.H", "KZ19.L"
))
if use_kz20
res.push(kz_helper.new(
kz.new(kz20_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz20, kz20_color, kz20_txt, "KZ20.H", "KZ20.L"
))
if use_kz21
res.push(kz_helper.new(
kz.new(kz21_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz21, kz21_color, kz21_txt, "KZ21.H", "KZ21.L"
))
if use_kz22
res.push(kz_helper.new(
kz.new(kz22_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz22, kz22_color, kz22_txt, "KZ22.H", "KZ22.L"
))
if use_kz23
res.push(kz_helper.new(
kz.new(kz23_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz23, kz23_color, kz23_txt, "KZ23.H", "KZ23.L"
))
if use_kz24
res.push(kz_helper.new(
kz.new(kz24_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz24, kz24_color, kz24_txt, "KZ24.H", "KZ24.L"
))
if use_kz25
res.push(kz_helper.new(
kz.new(kz25_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz25, kz25_color, kz25_txt, "KZ25.H", "KZ25.L"
))
if use_kz26
res.push(kz_helper.new(
kz.new(kz26_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz26, kz26_color, kz26_txt, "KZ26.H", "KZ26.L"
))
if use_kz27
res.push(kz_helper.new(
kz.new(kz27_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz27, kz27_color, kz27_txt, "KZ27.H", "KZ27.L"
))
if use_kz28
res.push(kz_helper.new(
kz.new(kz28_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz28, kz28_color, kz28_txt, "KZ28.H", "KZ28.L"
))
if use_kz29
res.push(kz_helper.new(
kz.new(kz29_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz29, kz29_color, kz29_txt, "KZ29.H", "KZ29.L"
))
if use_kz30
res.push(kz_helper.new(
kz.new(kz30_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz30, kz30_color, kz30_txt, "KZ30.H", "KZ30.L"
))
if use_kz31
res.push(kz_helper.new(
kz.new(kz31_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz31, kz31_color, kz31_txt, "KZ31.H", "KZ31.L"
))
if use_kz32
res.push(kz_helper.new(
kz.new(kz32_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz32, kz32_color, kz32_txt, "KZ32.H", "KZ32.L"
))
if use_kz33
res.push(kz_helper.new(
kz.new(kz33_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz33, kz33_color, kz33_txt, "KZ33.H", "KZ33.L"
))
if use_kz34
res.push(kz_helper.new(
kz.new(kz34_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz34, kz34_color, kz34_txt, "KZ34.H", "KZ34.L"
))
if use_kz35
res.push(kz_helper.new(
kz.new(kz35_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz35, kz35_color, kz35_txt, "KZ35.H", "KZ35.L"
))
if use_kz36
res.push(kz_helper.new(
kz.new(kz36_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz36, kz36_color, kz36_txt, "KZ36.H", "KZ36.L"
))
if use_kz37
res.push(kz_helper.new(
kz.new(kz37_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz37, kz37_color, kz37_txt, "KZ37.H", "KZ37.L"
))
if use_kz38
res.push(kz_helper.new(
kz.new(kz38_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz38, kz38_color, kz38_txt, "KZ38.H", "KZ38.L"
))
if use_kz39
res.push(kz_helper.new(
kz.new(kz39_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz39, kz39_color, kz39_txt, "KZ39.H", "KZ39.L"
))
res
var array _kz = initKZ()
var d_hl = dwm_hl.new(array.new_line(), array.new_line(), array.new_label(), array.new_label())
var w_hl = dwm_hl.new(array.new_line(), array.new_line(), array.new_label(), array.new_label())
var m_hl = dwm_hl.new(array.new_line(), array.new_line(), array.new_label(), array.new_label())
var d_info = dwm_info.new("D")
var w_info = dwm_info.new("W")
var m_info = dwm_info.new("M")
t_co = not na(time("", cutoff, gmt_tz))
type ts_helper
string session
array lines
color c
initTS() =>
array res = array.new()
if use_v1
res.push(ts_helper.new(v1, array.new_line(), v1_color))
if use_v2
res.push(ts_helper.new(v2, array.new_line(), v2_color))
if use_v3
res.push(ts_helper.new(v3, array.new_line(), v3_color))
if use_v4
res.push(ts_helper.new(v4, array.new_line(), v4_color))
res
var array ts_data = initTS()
var d_sep_line = array.new_line()
var w_sep_line = array.new_line()
var m_sep_line = array.new_line()
var d_line = array.new_line()
var w_line = array.new_line()
var m_line = array.new_line()
var d_label = array.new_label()
var w_label = array.new_label()
var m_label = array.new_label()
var transparent = #ffffff00
var ext_current = ext_which == 'Most Recent'
var ext_past = ext_pivots == 'Past Mitigation'
update_dwm_info(dwm_info n) =>
if timeframe.change(n.tf)
n.ph := n.h
n.pl := n.l
n.o := open
n.h := high
n.l := low
else
n.h := math.max(high, n.h)
n.l := math.min(low, n.l)
if dhl or show_d_open
update_dwm_info(d_info)
if whl or show_w_open
update_dwm_info(w_info)
if mhl or show_m_open
update_dwm_info(m_info)
// ---------------------------------------- Variables & Constants --------------------------------------------------
// ---------------------------------------- Functions --------------------------------------------------
get_box_color(color c) =>
color.new(c, box_transparency)
get_text_color(color c) =>
color.new(c, text_transparency)
// ---------------------------------------- Functions --------------------------------------------------
// ---------------------------------------- Core Logic --------------------------------------------------
dwm_sep(string tf, bool use, array arr, color col) =>
if use
if timeframe.change(tf)
arr.unshift(line.new(bar_index, high * 1.0001, bar_index, low, style = htf_style, width = htf_width, extend = extend.both, color = col))
if not sep_unlimited and arr.size() > max_days
arr.pop().delete()
dwm_open(string tf, bool use, array lns, array lbls, dwm_info n, color col) =>
if use
if lns.size() > 0
lns.get(0).set_x2(time)
lbls.get(0).set_x(time)
if timeframe.change(tf)
lns.unshift(line.new(time, n.o, time, n.o, xloc = xloc.bar_time, style = htf_style, width = htf_width, color = col))
lbls.unshift(label.new(time, n.o, tf + " OPEN", xloc = xloc.bar_time, style = label.style_label_left, color = transparent, textcolor = txt_color, size = lbl_size))
if not sep_unlimited and lns.size() > max_days
lns.pop().delete()
lbls.pop().delete()
dwm_hl(string tf, bool use, dwm_hl hl, dwm_info n, color col) =>
if use
if hl.hi_line.size() > 0
hl.hi_line.get(0).set_x2(time)
hl.lo_line.get(0).set_x2(time)
hl.hi_label.get(0).set_x(time)
hl.lo_label.get(0).set_x(time)
if timeframe.change(tf)
hl.hi_line.unshift(line.new(time, n.ph, time, n.ph, xloc = xloc.bar_time, style = htf_style, width = htf_width, color = col))
hl.lo_line.unshift(line.new(time, n.pl, time, n.pl, xloc = xloc.bar_time, style = htf_style, width = htf_width, color = col))
hl.hi_label.unshift(label.new(time, n.ph, "P" + tf + "H", xloc = xloc.bar_time, style = label.style_label_left, color = transparent, textcolor = txt_color, size = lbl_size))
hl.lo_label.unshift(label.new(time, n.pl, "P" + tf + "L", xloc = xloc.bar_time, style = label.style_label_left, color = transparent, textcolor = txt_color, size = lbl_size))
hl.hit_high := false
hl.hit_low := false
if not sep_unlimited and hl.hi_line.size() > max_days
hl.hi_line.pop().delete()
hl.lo_line.pop().delete()
hl.hi_label.pop().delete()
hl.lo_label.pop().delete()
if hl.hi_line.size() > 0 and alert_HL
if not hl.hit_high and high > hl.hi_line.get(0).get_y1()
hl.hit_high := true
alert(str.format("Hit P{0}H", tf))
if not hl.hit_low and low < hl.lo_line.get(0).get_y1()
hl.hit_low := true
alert(str.format("Hit P{0}L", tf))
dwm() =>
if tf_limit_is_equal_or_more_chart_tf
// DWM - Separators
dwm_sep("D", ds, d_sep_line, d_color)
dwm_sep("W", ws, w_sep_line, w_color)
dwm_sep("M", ms, m_sep_line, m_color)
// DWM - Open Lines
dwm_open("D", show_d_open, d_line, d_label, d_info, d_color)
dwm_open("W", show_w_open, w_line, w_label, w_info, w_color)
dwm_open("M", show_m_open, m_line, m_label, m_info, m_color)
// DWM - Highs and Lows
dwm_hl("D", dhl, d_hl, d_info, d_color)
dwm_hl("W", whl, w_hl, w_info, w_color)
dwm_hl("M", mhl, m_hl, m_info, m_color)
method vline(ts_helper this) =>
bool t = not na(time("", this.session, gmt_tz))
bool t_prev = not na(time("", this.session, gmt_tz, bars_back = 1))
array arr = this.lines
color col = this.c
if t and not t_prev
arr.unshift(line.new(bar_index, high * 1.0001, bar_index, low, style = vl_style, width = vl_width, extend = extend.both, color = col))
if not v_unlimited
if arr.size() > max_days
arr.pop().delete()
vlines() =>
if tf_limit_is_equal_or_more_chart_tf
for in ts_data
vline(value)
method hz_line(lines_helper this) =>
bool t = not na(time("", this.h, gmt_tz))
bool t_prev = not na(time("", this.h, gmt_tz, bars_back = 1))
hz hz = this._hz
string txt = this.h_text
color col = this.h_color
if t and not t_prev
hz.LN.unshift(line.new(bar_index, open, bar_index, open, style = hz_style, width = hz_width, color = col))
hz.LB.unshift(label.new(bar_index, open, txt, style = label.style_label_left, color = transparent, textcolor = txt_color, size = lbl_size))
array.unshift(hz.CO, false)
if not open_unlimited and hz.LN.size() > max_days
hz.LN.pop().delete()
hz.LB.pop().delete()
hz.CO.pop()
if not t and hz.CO.size() > 0
if not hz.CO.get(0)
hz.LN.get(0).set_x2(bar_index)
hz.LB.get(0).set_x(bar_index)
if (use_cutoff ? t_co : false)
hz.CO.set(0, true)
hz_lines() =>
if tf_limit_is_equal_or_more_chart_tf
for in lines
hz_line(value)
del_kz(kz k) =>
if k._box.size() > max_days
k._box.pop().delete()
if k._hi_line.size() > max_days
k._hi_line.pop().delete()
k._lo_line.pop().delete()
k._hi_valid.pop()
k._lo_valid.pop()
if show_midpoints
k._md_line.pop().delete()
k._md_valid.pop()
if k._hi_label.size() > max_days
k._hi_label.pop().delete()
k._lo_label.pop().delete()
update_price_string(label L, float P) =>
S = L.get_text()
pre = str.substring(S, 0, str.pos(S, " "))
str.trim(pre)
L.set_text(str.format("{0} ({1})", pre, P))
adjust_in_kz(kz kz, bool t) =>
if t
kzBox0 = kz._box.get(0)
kzBox0.set_right(time)
newTop = math.max(kzBox0.get_top(), high)
kzBox0.set_top(newTop)
newBottom = math.min(kzBox0.get_bottom(), low)
kzBox0.set_bottom(newBottom)
kz._range_current := newTop - newBottom
if show_pivots and kz._hi_line.size() > 0
kzHiLine0 = kz._hi_line.get(0)
kzHiLine0.set_x2(time)
if high > kzHiLine0.get_y1()
kzHiLine0.set_xy1(time, high)
kzHiLine0.set_xy2(time, high)
kzLoLine0 = kz._lo_line.get(0)
kzLoLine0.set_x2(time)
if low < kzLoLine0.get_y1()
kzLoLine0.set_xy1(time, low)
kzLoLine0.set_xy2(time, low)
if show_midpoints
kzMidLine0 = kz._md_line.get(0)
kzMidLine0.set_x2(time)
kzMidLine0.set_xy1(time, math.avg(kzHiLine0.get_y2(), kzLoLine0.get_y2()))
kzMidLine0.set_xy2(time, math.avg(kzHiLine0.get_y2(), kzLoLine0.get_y2()))
if show_labels and kz._hi_label.size() > 0
if label_right
kz._hi_label.get(0).set_x(time)
kz._lo_label.get(0).set_x(time)
if high > kz._hi_label.get(0).get_y()
kz._hi_label.get(0).set_xy(time, high)
if label_price
update_price_string(kz._hi_label.get(0), high)
if low < kz._lo_label.get(0).get_y()
kz._lo_label.get(0).set_xy(time, low)
if label_price
update_price_string(kz._lo_label.get(0), low)
adjust_out_kz(kz kz, bool t, bool t_prev) =>
boxCount = kz._box.size()
if not t and boxCount > 0
if t_prev
array.unshift(kz._range_store, kz._range_current)
if kz._range_store.size() > range_avg
kz._range_store.pop()
if show_pivots and boxCount > 0
for i = 0 to boxCount - 1 by 1
if not ext_current or i == 0
kzHiValid = kz._hi_valid.get(i)
if ext_past or kzHiValid
kz._hi_line.get(i).set_x2(time)
if show_labels and label_right
kz._hi_label.get(i).set_x(time)
if kzHiValid and high > kz._hi_line.get(i).get_y1()
if use_alerts and i == 0
alert('Broke ' + kz._title + ' High', alert.freq_once_per_bar)
kz._hi_valid.set(i, false)
if show_labels and label_right
kz._hi_label.get(i).set_style(label.style_label_down)
else if use_cutoff ? t_co : false
kz._hi_valid.set(i, false)
kzLoValid = kz._lo_valid.get(i)
if ext_past or kzLoValid
kz._lo_line.get(i).set_x2(time)
if show_labels and label_right
kz._lo_label.get(i).set_x(time)
if kzLoValid and low < kz._lo_line.get(i).get_y1()
if use_alerts and i == 0
alert("Broke " + kz._title + " Low", alert.freq_once_per_bar)
kz._lo_valid.set(i, false)
if show_labels and label_right
kz._lo_label.get(i).set_style(label.style_label_up)
else if use_cutoff ? t_co : false
kz._lo_valid.set(i, false)
if show_midpoints and not t
if stop_midpoints ? kz._md_valid.get(i) : true
kz._md_line.get(i).set_x2(time)
if kz._md_valid.get(i) and low <= kz._md_line.get(i).get_y1() and high >= kz._md_line.get(i).get_y1()
kz._md_valid.set(i, false)
else
break
method manage_kz(kz_helper this) =>
kz kz = this._kz
c = this.c
string box_txt = this.box_txt
string hi_txt = this.hi_txt
string lo_txt = this.lo_txt
if tf_limit_is_equal_or_more_chart_tf
t = not na(time("", this.session, gmt_tz))
t_prev = not na(time("", this.session, gmt_tz, bars_back = 1))
if t and not t_prev
_c = get_box_color(c)
_t = get_text_color(c)
kz._box.unshift(box.new(time, high, time, low, xloc = xloc.bar_time, border_color = show_kz ? _c : na, bgcolor = show_kz ? _c : na, text = show_kz and show_kz_text ? box_txt : na, text_color = _t))
if show_pivots
kz._hi_line.unshift(line.new(time, high, time, high, xloc = xloc.bar_time, style = kzp_style, color = c, width = kzp_width))
kz._lo_line.unshift(line.new(time, low, time, low, xloc = xloc.bar_time, style = kzp_style, color = c, width = kzp_width))
if show_midpoints
kz._md_line.unshift(line.new(time, math.avg(high, low), time, math.avg(high, low), xloc = xloc.bar_time, style = kzm_style, color = c, width = kzm_width))
array.unshift(kz._md_valid, true)
array.unshift(kz._hi_valid, true)
array.unshift(kz._lo_valid, true)
if show_labels
_hi_txt = label_price ? str.format('{0} ({1})', hi_txt, high) : hi_txt
_lo_txt = label_price ? str.format('{0} ({1})', lo_txt, low) : lo_txt
if label_right
kz._hi_label.unshift(label.new(time, high, _hi_txt, xloc = xloc.bar_time, color = transparent, textcolor = txt_color, style = label.style_label_left, size = lbl_size))
kz._lo_label.unshift(label.new(time, low, _lo_txt, xloc = xloc.bar_time, color = transparent, textcolor = txt_color, style = label.style_label_left, size = lbl_size))
else
kz._hi_label.unshift(label.new(time, high, _hi_txt, xloc = xloc.bar_time, color = transparent, textcolor = txt_color, style = label.style_label_down, size = lbl_size))
kz._lo_label.unshift(label.new(time, low, _lo_txt, xloc = xloc.bar_time, color = transparent, textcolor = txt_color, style = label.style_label_up, size = lbl_size))
del_kz(kz)
adjust_in_kz(kz, t)
adjust_out_kz(kz, t, t_prev)
for in _kz
manage_kz(value)
dwm()
vlines()
hz_lines()
new_dow_time = dow_xloc == 'Midday' ? time - timeframe.in_seconds("D") / 2 * 1000 : time
new_day = dayofweek(new_dow_time, gmt_tz) != dayofweek(new_dow_time, gmt_tz)
var dow_top = dow_yloc == 'Top'
var saturday = "SATURDAY"
var sunday = "SUNDAY"
var monday = "MONDAY"
var tuesday = "TUESDAY"
var wednesday = "WEDNESDAY"
var thursday = "THURSDAY"
var friday = "FRIDAY"
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 1 and new_day and not dow_hide_wknd, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = sunday)
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 2 and new_day, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = monday)
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 3 and new_day, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = tuesday)
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 4 and new_day, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = wednesday)
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 5 and new_day, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = thursday)
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 6 and new_day, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = friday)
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 7 and new_day and not dow_hide_wknd, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = saturday)
get_min_days_stored() =>
store = array.new_int()
for in _kz
int tmpStoreSize = value._kz._range_store.size()
if tmpStoreSize > 0
store.push(tmpStoreSize)
store.min()
method set_table(table tbl, kz kz, int row, string txt, bool t, color col) =>
table.cell(tbl, 0, row, txt, text_size = range_size, bgcolor = get_box_color(col), text_color = txt_color)
table.cell(tbl, 1, row, str.tostring(kz._range_current), text_size = range_size, bgcolor = t ? get_box_color(col) : na, text_color = txt_color)
if show_range_avg
table.cell(tbl, 2, row, str.tostring(kz._range_store.avg()), text_size = range_size, text_color = txt_color)
if show_range and barstate.islast
var tbl = table.new(range_pos, 10, 10, chart.bg_color, chart.fg_color, 2, chart.fg_color, 1)
table.cell(tbl, 0, 0, "Killzone", text_size = range_size, text_color = txt_color)
table.cell(tbl, 1, 0, "Range", text_size = range_size, text_color = txt_color)
if show_range_avg
table.cell(tbl, 2, 0, "Avg (" + str.tostring(get_min_days_stored()) + ")", text_size = range_size, text_color = txt_color)
for in _kz
set_table(tbl, value._kz, index + 1, value.box_txt, not na(time("", value.session, gmt_tz)), value.c)
// ---------------------------------------- Core Logic --------------------------------------------------
Indicator

Indicator

ATK / DEF MTF Analysis Chameleon Combo SessionATK / DEF MTF Analysis Chameleon Combo Session is a multi-timeframe market observation and visualization tool designed to examine the broader market environment through several independent analytical dimensions.
Unlike traditional single-indicator analysis, this framework combines **MTF Process, MTF Radar, Test Depth Matrix, MTF Direction, and an independent Chameleon MA** into one structured dashboard.
### Core Components
**MTF Process**
Observes changes in higher-timeframe ADX and RSI conditions and classifies the current market process into different states, from accelerating conditions to sideways or declining conditions.
**MTF Radar**
Combines ADX, RSI, and relative ATR to describe the current level of market activity and volatility.
**Test Depth Matrix**
Divides the selected MTF price range into five relative zones:
* Deep Water
* Mid Water
* Shallow Water
* Shallows
* Dry Zone
This provides a visual representation of where the observed market environment is positioned within its selected range.
**MTF Direction**
Uses EMA structure together with DI+ / DI− relationships to classify the directional condition of the selected timeframe.
**Chameleon MA**
The Chameleon component is independently configured and is **not tied to the MTF timeframe setting**. Its moving-average line changes visual state according to its position within the Test Depth Matrix, creating a dynamic zone-based visual layer.
**MTF Final Result**
Combines the independent MTF Process, Radar, Test Depth, and Direction classifications into a normalized composite score for observing the overall market state.
### Multi-Level Market Observation
The framework separates the market into different analytical levels rather than relying on a single indicator reading.
It allows the user to observe:
**Direction → Process → Activity → Depth → Chameleon State → Composite Market State**
The purpose is to provide a broader contextual view of market conditions and how different analytical dimensions interact with each other.
### User Configuration
The indicator is intentionally configurable.
Users must define their own:
* MTF Timeframe
* Chameleon MA Period
* Test Depth Zone Period
* Display settings
The Chameleon parameters are independent from the MTF configuration, allowing the two analytical layers to be adjusted separately.
Different parameter settings can produce different market classifications, so there is no single configuration intended for all symbols or market conditions.
### Important
This indicator is designed **only for market observation, analysis, and visualization**.
It does not provide tadn recommendations, ent or eit instructions, fiial advice, or forts.
The displayed scores and classifications are mathtical representations based on market data and use-selected parameters.
The indicator does not determine what action should be taken.
Use are responsible for selecting and configuring the relevant parameters for their own analysis.
Indicator

ATK/DEF HTF Analysis Combo# ATK/DEF HTF Analysis Combo
ATK/DEF HTF Analysis Combo is a Higher Timeframe market environment analysis framework designed to observe the broader market structure from a use-selected timeframe.
Instead of focusing only on the active chart, this indicator uses a selected Higher Timeframe as the primary reference environment and organizes several independent market measurements into one structured dashboard.
The objective is to provide a clearer view of the **broader market direction, trend condition, momentum condition, and volatility environment** through a Higher Timeframe perspective.
The indicator is designed as an analytical observation framework rather than a conventional single-condition indicator.
## 📊 Higher Timeframe Market Environment
The core of this indicator is the use of a use-selected Higher Timeframe.
The selected timeframe becomes the reference environment for the dashboard.
For example, the user may select:
* 4 Hour
* Daily
* Weekly
* Other supported timeframes
The indicator retrieves market data from the selected timeframe and evaluates the corresponding market conditions.
This allows the active chart to be viewed in the contet of a broader market environment.
A smaller chart can contain many local price movements while the selected Higher Timeframe may still maintin a different overall structure.
The purpose of this framework is to make that broader structure visible in a compact analytical format.
# 🧭 Four-Dimensional HTF Observation
ATK/DEF HTF Analysis Combo separates the Higher Timeframe environment into four primary dimensions:
**Direction**
**Trend**
**Momentum**
**Volatility**
These dimensions are intentionally treated as independent analytical modules.
They do not represent the same characteristic of the market.
A market can have a clear directional position while momentum is neutral.
A market can have strong trend strength while volatility is relatively low.
A market can experience elevated volatility while directional structure remains mixed.
By keeping these measurements separated, the dashboard preserves more information about the current Higher Timeframe environment.
# 🎯 1. HTF Direction
The HTF Direction module evaluates the directional position of the selected Higher Timeframe.
The calculation examines the relationship between:
* HTF closing price
* EMA 8
* EMA 21
* EMA 50
* +DI
* -DI
The relationship between price and multiple EMA levels provides the primary structural classification.
The +DI and -DI relationship is then used as an additional directional component.
The module classifies the environment into several states:
* 📈 Strong Bull
* 📈 Bullish
* ↗️ Mixed Bull
* ➡️ Neutral
* ↘️ Mixed Bear
* 📉 Bearish
* 📉 Strong Bear
A Direction Score ranging from **-100 to +100** is also displayed.
The score provides a normalized representation of the directional classification used by the module.
The Direction module is not intended to represent the entire market by itself.
It describes the directional position of the selected Higher Timeframe environment.
# 📈 2. HTF Trend
The HTF Trend module examines the strength and orientation of the broader trend structure.
It uses:
* ADX
* +DI
* -DI
ADX is used to describe the strength of the prevailing directional structure, while +DI and -DI provide the directional component.
The module produces several classifications:
* 🔥 Strong Bull
* 🔥 Strong Bear
* ⚡ Bull Trend
* ⚡ Bear Trend
* 🌊 Weak Trend
* 🌀 Range
This creates a distinction between **directional position** and **trend strength**.
The Direction module asks where the market is positioned.
The Trend module asks how strongly the directional structure is expressed.
These two measurements can therefore display different conditions at the same time.
# ⚡ 3. HTF Momentum
The HTF Momentum module uses RSI to describe the current momentum condition of the selected Higher Timeframe.
The RSI range is divided into multiple states:
* 🚀 Strong Up
* ⬆️ Accelerating
* ↗️ Bullish
* ➡️ Neutral
* ↘️ Bearish
* ⬇️ Declining
* 💀 Strong Down
The purpose of this classification is to provide a more detailed view of momentum rather than reducing the entire momentum condition to a simple positive or negative value.
The module also generates a normalized Momentum Score between **-100 and +100**.
Momentum is kept independent from Direction and Trend because these characteristics can behave differently within the same market environment.
# 📊 4. HTF Volatility
The HTF Volatility module measures the relative movement environment of the selected Higher Timeframe using ATR.
The current ATR is compared with its 50-period average:
**ATR Ratio = Current ATR / Average ATR**
The result is classified into:
* 🔥 Extreme
* ⚠️ High
* 📊 Elevated
* 📊 Normal
* 😴 Low
Volatility is treated as a **non-directional measurement**.
A high volatility condition does not represent an upward or downward direction.
It describes the relative magnitude of market movement compared with its reference volatility.
This distinction allows the dashboard to separate market activity from market direction.
# 🏆 5. HTF Composite Environment
The final HTF score combines the independent Direction, Trend and Momentum scores.
The three directional components are averaged into a normalized composite value.
The Volatility condition can then modify the composite value when volatility reaches elevated levels.
The resulting score is constrained to a range between:
**-100 and +100**
The composite value is intended to provide a compact representation of the broader Higher Timeframe environment.
It does not replace the individual modules.
Instead, it provides another layer of information that can be compared with the separate Direction, Trend, Momentum and Volatility readings.
# 🔬 Independent Module Architecture
One of the main characteristics of ATK/DEF HTF Analysis Combo is its independent-module architecture.
Rather than forcing all market conditions into one calculation from the beginning, each component is evaluated separately.
### Direction
Describes the broader directional position.
### Trend
Describes the strength and orientation of the trend structure.
### Momentum
Describes the current momentum condition.
### Volatility
Describes the relative magnitude of market movement.
### Composite Environment
Provides a consolidated numerical representation of the directional modules.
This architecture allows different market characteristics to remain visible instead of hing them inside one simplified reading.
# 🌐 Broader Market Observation
The indicator is designed specifically around the idea of observing the market from a broader timeframe perspective.
The active chart represents the immediate chart environment.
The selected Higher Timeframe represents the broader reference environment.
The dashboard connects these two perspectives by displaying the selected HTF conditions directly on the active chart.
This makes it possible to examine how the current chart exists within a larger market structure.
The indicator therefore focuses on **environmental context rather than individual candle interpretation**.
# 📐 Why Higher Timeframe Data Is Used
Higher Timeframe data can provide a different structural perspective from the active chart.
For example, price movement that appears highly directional on a smaller chart may exist inside a much broader range when viewed from a larger timeframe.
Likewise, a period of relatively quiet movement on the ative chart may occur while the broader timeframe maintns a clearly defined directional structure.
The purpose of the HTF framework is to expose this broader context through a consistent set of measurements.
# 🧩 Multiple Conditions Can Coexist
The dashboard does not require every module to produce the same classification.
Different combinations are possible.
For example:
**Bullish Direction + Weak Trend + Neutral Momentum + Low Volatility**
or:
**Mixed Direction + Strong Trend + Strong Momentum + High Volatility**
or:
**Neutral Direction + Range + Neutral Momentum + Normal Volatility**
These combinations represent different market environments.
The dashboard preserves these differences instead of reducing every situation to one basic directional label.
# 📊 Scoring System
Direction, Trend and Momentum use normalized scores to represent their respective classifications.
Directional scores use a range from **-100 to +100**.
The Volatility module uses a separate non-directional scale because volatility does not inherently describe upward or downward movement.
The Composite HTF Score is normalized to remain within **-100 to +100**.
The scores are mathematical representations of the conditions defined in the script.
They should be interpreted as descriptive measurements of the selected Higher Timeframe environment.
# ⚙️ User-Defined Timeframe Configuration
The Higher Timeframe reference is **user-configurable**.
Users are expected to select and configure the timeframe that they want the dashboard to analyze.
The indicator does not assume that one particular timeframe is appropriate for every chart or every market.
Changing the HTF Resolution changes the reference environment used by the dashboard.
This is an important part of the design because the indicator is intended to allow the user to determine which broader market context should be observed.
The selected timeframe should therefore be considered part of the user's analytical configuration.
# 🖥️ Dashboard
The dashboard provides a compact display of the five main analytical sections:
### 🎯 HTF Direction
Directional classification and normalized Direction Score.
### 📈 HTF Trend
Trend classification and ADX measurement.
### ⚡ HTF Momentum
Momentum classification and RSI measurement.
### 📊 HTF Volatility
Volatility classification and ATR Ratio.
### 🏆 HTF Final Environment
Composite Higher Timeframe score and overall environmental classification.
The selected HTF resolution is also displayed in the dashboard header.
The table can be positioned on either side of the chart according to the user's preference.
# 📏 Technical Components
The indicator uses established market-data calculations including:
* EMA 8
* EMA 21
* EMA 50
* RSI 14
* ADX 14
* +DI
* -DI
* ATR 14
* 50-period average ATR
These components are processed independently before being combined into the Higher Timeframe dashboard.
The purpose of the framework is not to introduce a single new mathematical measurement, but to organize several market characteristics into a unified Higher Timeframe observation structure.
# 🧠 Analytical Concept
ATK/DEF HTF Analysis Combo approaches market observation from a broader environmental perspective.
Instead of asking only whether price is moving upward or downward, the framework separates the market into several observable characteristics:
**Where is the market positioned?**
**How strong is the directional structure?**
**What is the current momentum condition?**
**How active is the market environment?**
**How do these independent conditions relate to one another?**
This creates a multi-dimensional representation of the selected Higher Timeframe environment.
---
# ⚠️ Important Information
ATK/DEF HTF Analysis Combo is an analytical and visualization tool based on market data and mattical calculations.
The classifications and scores are generated from the relationships defined in the scrt between price, EMA, DMI, ADX, RSI and ATR.
The displayed values represent the calculated state of the selected Higher Timeframe environment at the time of observation.
They are not intended to represent certainty, probability, guarantees, or future market outcomes.
The indicator does not provide finl advice, tre instructions, or recommendations, or capital-management guidance.
The purpose of this script is to provide a structured framework for observing the broader market environment through use-selected Higher Timeframe data.
User are responsible for selecting and configuring the timeframe parameters appropriate to their own analytical requirements.
Indicator

Strategy

Smart Money Liquidation Exploits [AlgoAlpha]🟠 OVERVIEW
Smart Money Liquidation Exploits maps recent swing highs and lows as liquidity levels, then watches how price reacts when these levels are reached. It focuses on liquidity sweeps where price moves beyond a prior swing with the wick but the candle body remains on the other side of the level.
The indicator combines pivot-based liquidity mapping, wick rejection signals, and structure-based take-profit levels. This helps traders separate a liquidity sweep from a simple break through a previous high or low.
It can use the current chart timeframe or a selected higher timeframe. This lets traders view liquidity and sweep signals from broader market structure while staying on a lower-timeframe chart.
🟠 CONCEPTS
Liquidity Level — A price level formed from a confirmed pivot high or pivot low. Pivot highs represent potential buy-side liquidity, while pivot lows represent potential sell-side liquidity.
Liquidity Sweep — A move where the wick crosses a liquidity level but the candle body stays beyond neither side of that level. A sweep below a pivot low is treated as bullish, while a sweep above a pivot high is treated as bearish.
Pivot Structure — Confirmed swing highs and lows defined by the Pivot Length setting. Consecutive pivots in the same direction are updated when a more extreme high or low forms.
Take-Profit Level — A target created after a valid sweep. For bullish sweeps, the target is the midpoint between the swept low and the latest swing high. For bearish sweeps, it is the midpoint between the swept high and the latest swing low.
Level Expiry — The period during which a liquidity or take-profit level remains active. Levels stop extending after they are reached or after the selected number of bars expires.
🟠 FEATURES
Liquidity Levels — Displays active pivot-based liquidity levels above and below price.
Sweep Signals — Marks bullish sweeps with ▲ and bearish sweeps with ▼ when price wicks through a liquidity level without the candle body crossing it.
Take-Profit Levels — Displays a dotted target after a valid liquidity sweep when an opposing swing is available.
Target Confirmation — Marks completed take-profit targets with a ✅ and connects the original sweep to the target hit.
Higher-Timeframe Mode — Allows liquidity levels, sweeps, targets, and expiry periods to use structure from a selected higher timeframe.
🟠 HOW TO USE
Watch the active liquidity levels around price to identify recent swing highs and lows that price may test.
Look for a ▲ below price when sell-side liquidity is swept. This shows that price moved below a pivot low but the candle body remained above the level.
Look for a ▼ above price when buy-side liquidity is swept. This shows that price moved above a pivot high but the candle body remained below the level.
After a valid sweep, use the dotted take-profit level as the indicator's structure-based target.
Watch for a ✅ when price reaches an active target. The connecting dotted line shows which sweep produced the completed target.
Increase Pivot Length to focus on broader swings, or reduce it to detect smaller local swings.
Enable Higher Timeframe mode when you want the liquidity structure and signals to come from a broader timeframe than the current chart.
Adjust Level Expiry Bars to control how long untouched liquidity and take-profit levels remain active.
🟠 CONCLUSION
Smart Money Liquidation Exploits combines pivot-based liquidity levels, wick-defined liquidity sweeps, and structure-based take-profit targets. It gives traders a visual way to identify rejected liquidity runs and track the price objective associated with each valid sweep. Indicator

Indicator

Triple Bottom/Top Patterns [The_lurker]╔═══════════════════════════════════════════════════════╗
Triple Bottom/Top Patterns
╚═══════════════════════════════════════════════════════╝
An indicator that detects Triple Bottom and Triple Top patterns and tracks every pattern from the moment its structure completes until its final resolution — with no repainting, and with symmetry limits that adapt to market volatility instead of fixed numbers.
The core idea: a pattern is not a shape you draw and abandon. It is an event with a beginning, a path, and an end — and this indicator tracks all three.
╔═══════════════════════════════════════════════════════╗
◆ WHAT SETS THIS INDICATOR APART
╚═══════════════════════════════════════════════════════╝
▌ 1 ─ No repainting, by structure rather than by promise
✕ Common: an "in progress" mode draws an unconfirmed third leg, so the shape shifts and is redrawn every time price moves. The pattern you see in history is not what was displayed at the time.
✓ Here: all seven points are confirmed price pivots, and every state change occurs on confirmed bar close. What you see today on an old bar is literally what was displayed when it appeared.
There is no "in progress" mode in this indicator — a deliberate choice, not a missing feature.
▌ 2 ─ Symmetry limits that adapt to volatility
✕ Common: a fixed percentage for the allowed difference between the ends.
The problem is that one percentage means radically different things:
▸ 1% on the 15-minute chart ≈ 3.6 volatility units ← far too loose
▸ 1% on the daily chart ≈ 0.26 volatility units ← far too strict
The same number delivers completely different precision depending on timeframe, while the user believes a single standard has been set.
✓ Here: the difference is measured in units of Average True Range at the moment of formation.
One number means the same thing on every timeframe, every instrument, and every market condition — from Bitcoin to low-priced altcoins, from the 1-minute to the weekly.
▌ 3 ─ A complete eight-state machine
✕ Common: the pattern is drawn, the breakout is announced, and its role ends.
✓ Here: every pattern travels a defined and declared path:
⏳ Awaiting breakout
✓ Pattern complete
🎯 Target reached
✕ Pattern failed
🔄 Reverse target reached
⌛ Waiting period expired
⌛ Complete, no target reached
⌛ Failed, no reverse target reached
▌ 4 ─ The two states you will not find elsewhere
✕ Common: the target line extends indefinitely. A pattern that broke out a year ago still has its line crawling across your chart today, with no answer to the question: was it reached or not?
✓ Here: every pattern has a defined time window to reach its target. If the window closes without a hit, the state is declared "Complete, no target" and the line freezes.
This prevents dead lines from accumulating, and gives an explicit answer instead of open silence.
▌ 5 ─ No resolution within the event bar itself
✕ Common: a pattern breaks out and the target is counted as reached in that same bar if price touched it.
The problem: the order of high, low, and close inside a single bar is unknown to any indicator. Price may have reached the target before closing above the neckline — that is, before the entry signal existed at all.
✓ Here: resolution is deferred by a full bar. A target can never be reached on the completion bar itself.
A small detail that separates honest tracking from optimistic tracking.
▌ 6 ─ Every point is a pivot, including the turning point and both mids
✕ Common: the intermediate points and the trend origin are taken as the raw highest or lowest value within a window.
The problem: a single stray wick can become a point in the pattern — and if it defines the neckline, the entire decisive level rests on noise.
✓ Here: all seven points are confirmed pivots. One wick cannot define a neckline.
▌ 7 ─ Tracking continues after failure
✕ Common: the pattern breaks down and is erased from the chart.
✓ Here: it breaks down and is fully recoloured — lines, fill, and labels — and a reverse target is computed and tracked with the same precision and the same time window.
Pattern failure is tradeable information, not the end of tracking.
▌ 8 ─ One pattern per zone
✕ Common: several overlapping patterns draw on top of one another, turning the chart into a tangled mesh.
✓ Here: when patterns overlap in time, only the one with the tightest symmetry remains. And a pattern that has completed or failed is never erased retroactively — it blocks a newcomer instead of being replaced by it.
The result: a clean chart, and a history that is not rewritten.
▌ 9 ─ Prior trend gate
A reversal pattern without a prior trend is not a reversal.
✓ The indicator requires the leg from the turning point to the first end to reach a defined multiple of the pattern's own height — and this requirement is what determines which pivot is selected as the turning point, so no arbitrary peak preceding the pattern gets picked up.
╔═══════════════════════════════════════════════════════╗
📐 PATTERN STRUCTURE: SEVEN POINTS
╚═══════════════════════════════════════════════════════╝
① Turning point ─ the last opposite pivot before the first end, where the prior trend reversed
②④⑥ The three ends ─ B1 · B2 · B3 or T1 · T2 · T3
confirmed pivots, aligned within a limit measured in volatility units
③⑤ The two mids ─ the separating highs in a Triple Bottom, or the separating lows in a Triple Top
▬▬ Neckline ─ the higher of the two mids in a Triple Bottom, the lower in a Triple Top
this is the level that defines pattern completion
⑦ Crossing point ─ where the final leg intersects the neckline on completion
Path: ① → ② → ③ → ④ → ⑤ → ⑥ → ⑦
╔═══════════════════════════════════════════════════════╗
🎯 TARGETS
╚═══════════════════════════════════════════════════════╝
The target is purely geometric: the pattern height — the distance between the neckline and the furthest end — projected from the breakout point.
▸ Conservative 0.618 of pattern height
▸ Balanced full pattern height
▸ Aggressive 1.618 of pattern height
An independent mode for each case: Bottom bullish target · Bottom bearish target on failure · Top bearish target · Top bullish target on failure.
The fill criterion is selectable:
▸ Touch ─ matches a limit order resting at the target
▸ Close ─ more conservative
╔═══════════════════════════════════════════════════════╗
⚙️ SETTINGS
╚═══════════════════════════════════════════════════════╝
▌ Pattern Detection
▸ Pivots left and right ─ pivot confirmation sensitivity
▸ Min arm length ─ minimum bars between each consecutive pair of points
▸ Ends symmetry ×ATR ─ the single most influential parameter
▸ Mids symmetry ×ATR ─ same unit, applied to the two intermediate points
▸ Min depth ×ATR ─ excludes shallow sideways chop
▸ Prior leg ×Pattern height ─ required strength of the preceding trend
▸ Trend length and lookback ─ search range for the turning point
▸ Extension multiplier ─ breakout waiting period, relative to pattern width
▌ Targets
▸ Target window ×Width ─ time allowed to reach the target. Zero = no expiry
▌ Visual
▸ Max live patterns per side ─ raise it on lower timeframes
▸ Independent colours per side: pattern · fill · text · label background
Transparency is set from the colour picker itself
╔═══════════════════════════════════════════════════════╗
🔔 ALERT
╚═══════════════════════════════════════════════════════╝
A single alert: Triple Pattern Complete.
▸ Fires when the neckline is broken on confirmed bar close
▸ Covers both bottoms and tops
▸ Once per pattern
▸ The message includes ticker, timeframe, and close price automatically
To create: alarm icon → select the indicator as source → choose the condition → set frequency to "Once Per Bar Close".
⚠ PulseWire freezes the indicator settings at the moment the alert is created. If you change any setting afterwards, delete the alert and create it again.
╔═══════════════════════════════════════════════════════╗
📊 PRACTICAL USE
╚═══════════════════════════════════════════════════════╝
▸ The neckline is the decisive level. Before it is broken: a candidate structure. After: a completed event.
▸ The furthest end defines the invalidation point — a close below the lowest of the three bottoms, or above the highest of the three tops.
▸ The info table shows, for each side: target mode · target price · current state · pattern age in bars.
▸ The age field matters: a pattern fifty bars old is not the same as one five hundred bars old.
▸ Triple patterns are inherently rarer than double ones. If nothing appears on a higher timeframe, that is expected behaviour rather than a fault — raise the ends symmetry limit first, then review the prior trend gate.
╔═══════════════════════════════════════════════════════╗
⚠ DISCLOSURE AND LIMITATIONS
╚═══════════════════════════════════════════════════════╝
▸ This indicator is a visual analysis tool that organises how you read the market. It does not provide buy or sell recommendations, and it promises no results.
▸ Drawing correctness is one thing; pattern performance is another. The indicator draws patterns and tracks their events precisely, but the predictive ability of the pattern itself has not been tested statistically here and is not claimed.
▸ The search scope is limited to the last fifty pivots per side, so a very old pattern may not be detected.
▸ When the tracked-pattern budget fills, a live pattern may be replaced by a newer one. Raising "Max live patterns" reduces this.
▸ Use it within a complete trading approach that includes risk management, not as a sole source of decisions.
╔═══════════════════════════════════════════════════════╗
Triple Bottom/Top Patterns نماذج القيعان والقمم الثلاثية
╚═══════════════════════════════════════════════════════╝
مؤشر يكتشف نماذج القاع الثلاثي والقمة الثلاثية، ويتابع كل نموذج من لحظة اكتمال بنيته حتى حسمه النهائي — بلا إعادة رسم، وبحدود تماثل تتكيف مع تقلب السوق بدل أرقام ثابتة.
الفكرة المركزية: النموذج ليس شكلًا يُرسم ثم يُترك. هو حدث له بداية ومسار ونهاية، والمؤشر يتتبع الثلاثة.
╔═══════════════════════════════════════════════════════╗
◆ ما الذي يميز هذا المؤشر
╚═══════════════════════════════════════════════════════╝
▌ ١ ─ لا إعادة رسم، بضمانة بنيوية لا بوعد نصي
✕ الشائع: وضع "قيد التكوين" يرسم طرفًا ثالثًا غير مؤكد، فيتحرك الشكل ويُعاد رسمه كلما تحرك السعر. النموذج الذي تراه في التاريخ ليس ما كان معروضًا لحظتها.
✓ هنا: النقاط السبع كلها محاور سعرية مؤكدة، وكل تغييرات الحالة تقع تحت إغلاق الشمعة المؤكد. ما تراه اليوم على شمعة قديمة هو حرفيًا ما كان معروضًا وقت ظهوره.
لا يوجد وضع "قيد التكوين" في هذا المؤشر — وهذا اختيار مقصود، لا نقص.
▌ ٢ ─ حدود التماثل تتكيف مع التقلب
✕ الشائع: نسبة مئوية ثابتة للفارق المسموح بين الأطراف.
المشكلة أن النسبة الواحدة تعني أشياء مختلفة جذريًا:
▸ 1٪ على فريم 15 دقيقة ≈ 3.6 من وحدات التقلب ← متساهل جدًا
▸ 1٪ على الفريم اليومي ≈ 0.26 من وحدات التقلب ← صارم جدًا
أي أن نفس الرقم يعطي دقة مختلفة تمامًا حسب الفريم، والمستخدم يظن أنه ثبّت معيارًا واحدًا.
✓ هنا: الفارق يُقاس بوحدات المدى الحقيقي المتوسط عند لحظة التكوين.
الرقم الواحد يعني الشيء نفسه على كل فريم، وكل أصل، وكل حالة سوق — من البيتكوين إلى العملات منخفضة السعر، ومن الدقيقة إلى الأسبوعي.
▌ ٣ ─ آلة حالة كاملة من ثماني حالات
✕ الشائع: يرسم النموذج، يعلن الاختراق، وينتهي دوره.
✓ هنا: كل نموذج يمر بمسار محدد ومعلن:
⏳ انتظار الاختراق
✓ اكتمال النموذج
🎯 بلوغ الهدف
✕ فشل النموذج
🔄 بلوغ الهدف العكسي
⌛ انتهاء مدة الانتظار
⌛ اكتمال بلا بلوغ هدف
⌛ فشل بلا بلوغ هدف عكسي
▌ ٤ ─ الحالتان اللتان لا تجدهما في غيره
✕ الشائع: خط الهدف يمتد إلى ما لا نهاية. نموذج اخترق قبل سنة وما زال خطه يزحف على شارتك اليوم، بلا إجابة عن سؤال: هل وصل أم لا؟
✓ هنا: لكل نموذج نافذة زمنية محددة لبلوغ هدفه. إن انقضت بلا وصول، تُعلن الحالة "اكتمال بلا بلوغ هدف" ويتجمد الخط.
هذا يمنع تراكم خطوط ميتة، ويعطي إجابة صريحة بدل صمت مفتوح.
▌ ٥ ─ لا حسم في شمعة الحدث نفسها
✕ الشائع: النموذج يخترق ويُحسب الهدف متحققًا في نفس الشمعة إن لامسه السعر.
المشكلة: ترتيب الأعلى والأدنى والإغلاق داخل الشمعة الواحدة غير معلوم لأي مؤشر. ربما بلغ السعر الهدف قبل أن يغلق فوق العنق، أي قبل وجود إشارة الدخول أصلًا.
✓ هنا: الحسم يُؤجَّل شمعة كاملة. لا يمكن أن يتحقق هدف في شمعة الاكتمال نفسها.
تفصيل صغير يفصل بين متابعة صادقة وأخرى متفائلة.
▌ ٦ ─ كل النقاط محاور، بما فيها نقطة التحول والوسيطتان
✕ الشائع: النقاط الوسيطة ونقطة بداية الاتجاه تُؤخذ كأعلى أو أدنى قيمة خام في نافذة.
المشكلة: ذيل شمعة شارد قد يصبح نقطة في النموذج — وإن كان هو خط العنق، فالمستوى الحاسم كله مبني على ضجيج.
✓ هنا: النقاط السبع محاور مؤكدة. ذيل واحد لا يمكن أن يحدد خط عنق.
▌ ٧ ─ متابعة ما بعد الفشل
✕ الشائع: النموذج ينكسر فيُشطب من الشارت.
✓ هنا: ينكسر فيُعاد تلوينه بالكامل — الخطوط والتضليل والعلامات — ويُحسب له هدف عكسي يُتابع بنفس الدقة والنافذة الزمنية.
فشل النموذج معلومة تداولية، لا نهاية المتابعة.
▌ ٨ ─ نموذج واحد لكل منطقة
✕ الشائع: عدة نماذج متداخلة ترسم فوق بعضها فيتحول الشارت إلى شبكة متشابكة.
✓ هنا: عند تداخل زمني، يبقى الأدقّ تماثلًا فقط. والنموذج الذي اكتمل أو فشل لا يُمحى بأثر رجعي — يمنع ظهور نموذج جديد فوقه بدل أن يُستبدل به.
النتيجة: شارت نظيف، وتاريخ لا يُزوَّر.
▌ ٩ ─ بوابة الاتجاه السابق
النموذج الانعكاسي بلا اتجاه سابق ليس انعكاسًا.
✓ المؤشر يشترط أن يبلغ المسار من نقطة التحول إلى الطرف الأول مضاعفًا محددًا من ارتفاع النموذج نفسه — وهذا الشرط هو ما يحدد أي محور يُختار كنقطة تحول، فلا تُلتقط قمة عشوائية سبقت النموذج.
╔═══════════════════════════════════════════════════════╗
📐 بنية النموذج: سبع نقاط
╚═══════════════════════════════════════════════════════╝
① نقطة التحول ─ آخر محور مقابل قبل الطرف الأول، حيث انقلب الاتجاه السابق
②④⑥ الأطراف الثلاثة ─ B1 · B2 · B3 أو T1 · T2 · T3
محاور مؤكدة، متقاربة ضمن حد يُقاس بوحدات التقلب
③⑤ الوسيطتان ─ القمتان الفاصلتان في القاع الثلاثي، أو القاعان في القمة الثلاثية
▬▬ خط العنق ─ أعلى الوسيطتين في القاع الثلاثي، وأدناهما في القمة الثلاثية
هو المستوى الذي يحدد اكتمال النموذج
⑦ نقطة العبور ─ تقاطع الساق الأخيرة مع خط العنق عند الاكتمال
المسار: ① → ② → ③ → ④ → ⑤ → ⑥ → ⑦
╔═══════════════════════════════════════════════════════╗
🎯 الأهداف
╚═══════════════════════════════════════════════════════╝
الهدف هندسي بحت: ارتفاع النموذج — المسافة بين خط العنق وأبعد الأطراف — يُسقط من نقطة الاختراق.
▸ محافظ 0.618 من ارتفاع النموذج
▸ متوازن ارتفاع النموذج كاملًا
▸ عدواني 1.618 من ارتفاع النموذج
نمط مستقل لكل حالة: هدف القاع الصاعد · هدف القاع الهابط عند الفشل · هدف القمة الهابط · هدف القمة الصاعد عند الفشل.
معيار التحقق قابل للاختيار:
▸ لمسة السعر ─ يطابق تنفيذ أمر معلق عند الهدف
▸ إغلاق الشمعة ─ أكثر تحفظًا
╔═══════════════════════════════════════════════════════╗
⚙️ الإعدادات
╚═══════════════════════════════════════════════════════╝
▌ كشف النموذج
▸ شموع اليسار واليمين ─ حساسية تأكيد المحاور
▸ الحد الأدنى للذراع ─ أقل عدد شموع بين كل نقطتين متتاليتين
▸ تماثل الأطراف الثلاثة ×ATR ─ المعامل الأهم في المؤشر
▸ تماثل الوسيطين ×ATR ─ نفس الوحدة، للنقطتين الوسيطتين
▸ أدنى عمق للنموذج ×ATR ─ يستبعد التذبذبات الجانبية الضحلة
▸ ارتفاع الاتجاه ×ارتفاع النموذج ─ قوة المسار السابق المطلوبة
▸ طول المسار ومدى البحث ─ نطاق البحث عن نقطة التحول
▸ معامل التمدد ─ مدة انتظار الاختراق بدلالة عرض النموذج
▌ الأهداف
▸ نافذة الهدف ×العرض ─ المدة المسموحة لبلوغ الهدف. صفر = بلا انتهاء
▌ العرض
▸ أقصى نماذج متتبعة لكل جانب ─ ارفعه على الفريمات المنخفضة
▸ ألوان مستقلة لكل جانب: النموذج · التضليل · النص · خلفية العلامة
الشفافية تُضبط من منتقي اللون نفسه
╔═══════════════════════════════════════════════════════╗
🔔 التنبيه
╚═══════════════════════════════════════════════════════╝
تنبيه واحد فقط: اكتمال النموذج الثلاثي.
▸ يُطلق عند كسر خط العنق بإغلاق شمعة مؤكد
▸ للقاع والقمة معًا
▸ مرة واحدة لكل نموذج
▸ الرسالة تتضمن الرمز والفريم وسعر الإغلاق تلقائيًا
الإنشاء: أيقونة المنبه → المؤشر كمصدر → الشرط → التكرار "مرة عند إغلاق الشمعة".
⚠ PulseWire يحفظ إعدادات المؤشر لحظة إنشاء التنبيه. إن غيّرت أي إعداد بعدها، احذف التنبيه وأنشئه من جديد.
╔═══════════════════════════════════════════════════════╗
📊 الاستخدام العملي
╚═══════════════════════════════════════════════════════╝
▸ خط العنق هو المستوى الحاسم. قبل اختراقه: بنية محتملة. بعده: حدث مكتمل.
▸ الطرف الأبعد يحدد نقطة إبطال النموذج — إغلاق تحت أدنى القيعان الثلاثة، أو فوق أعلى القمم الثلاث.
▸ جدول المعلومات يعرض لكل جانب: نمط الهدف · سعر الهدف · الحالة الراهنة · عمر النموذج بالشموع.
▸ حقل العمر مهم: نموذج عمره خمسون شمعة ليس كنموذج عمره خمسمئة.
▸ النماذج الثلاثية أندر بطبيعتها من الثنائية. إن لم يظهر شيء على فريم مرتفع فهذا سلوك متوقع لا خلل — ارفع حد تماثل الأطراف أولًا، ثم راجع بوابة ارتفاع الاتجاه.
╔═══════════════════════════════════════════════════════╗
⚠ الإفصاح والقيود
╚═══════════════════════════════════════════════════════╝
▸ هذا المؤشر أداة تحليل بصري وتنظيم لرؤية السوق. لا يقدم توصيات شراء أو بيع، ولا يَعِد بنتائج.
▸ صحة الرسم شيء وأداء النموذج شيء آخر. المؤشر يرسم النماذج ويتتبع أحداثها بدقة، لكن قدرة النموذج نفسه على التنبؤ لم تُختبر إحصائيًا هنا ولا يُدعى بها.
▸ نطاق البحث محدود بآخر خمسين محورًا لكل جانب، فقد لا يُكتشف نموذج قديم جدًا.
▸ عند امتلاء ميزانية النماذج المتتبعة، قد يُستبدل نموذج حي بآخر أحدث. رفع "أقصى نماذج متتبعة" يقلل ذلك.
▸ استخدمه ضمن منهج تداول متكامل يشمل إدارة المخاطر، لا كمصدر قرار وحيد.
─────────────────────────────────────────────
The_lurker — Fawaz Al-Enezi | فواز العنزي
───────────────────────────────────────────── Indicator

Composite Liquidity Flow: five-asset weighted volume deltaWhat it does
One histogram that answers a single question: which way is the whole index complex leaning right now? It estimates buying and selling pressure across five instruments at once, weights them, smooths them, and prints the net as a z-scored delta with an agreement layer on top.
What is original here
Volume delta and RSI are both public methodology, and neither is mine. Three things here are not standard:
1. Pressure is attributed per bar from candle geometry, then priced in dollars rather than counted in shares. A 600-dollar instrument and a 60-dollar instrument therefore contribute on a comparable scale, which a raw share-count composite cannot do.
2. The five legs are not summed. Index futures, their tracking funds, and an inverse hedge fund are weighted separately, and the hedge leg has its logic inverted, so buying in the inverse product is counted as selling pressure on the complex. Hedging demand is treated as information rather than noise. This is the part I have not seen elsewhere.
3. The composite is z-scored against its own recent distribution, so the same scale reads correctly on a quiet session and on a high-volatility print.
The RSI layer is a display filter, not an input to the flow calculation. It gates when markers are allowed to print and never changes the histogram. That is the reason for the combination: flow describes who is pushing, RSI describes whether price has already travelled, and a marker is only allowed when the two agree. Without the filter the same flow model prints far more markers, most of them late.
How it works
Per-instrument pressure comes from candle structure. On an up bar, the body plus the lower wick is attributed to buyers and the upper wick to sellers; on a down bar the attribution reverses. That fraction multiplies the bar volume, then the closing price, producing a dollar figure per leg. Legs are weighted, summed, smoothed with an exponential average, then converted to a z-score against a rolling lookback. A session filter zeroes the fund legs outside regular hours, where their volume is unrepresentative of real positioning.
Divergences require three conditions at once: price at a lookback extreme, three consecutive bars of the composite moving the other way, and optional confirmation from the filter. A cooldown then suppresses repeats so the markers stay rare enough to mean something.
How to use it
Built for intraday index trading and tuned by default for 5-minute charts. Above the zero line and rising, with the filter supportive, means the composite tape agrees with a long. Below and falling is the mirror. The divergence markers are warnings about the move in progress, not entries. The dashboard reports each component separately so you can see which one is disagreeing before you act on the net.
What it cannot do
Markers are evaluated on the live bar, so a divergence or agreement arrow can appear and then disappear before the bar closes. Judge them on closed bars only. Nothing is drawn in the past and no confirmed marker moves once its bar has closed.
Everything here is estimated from open, high, low, close and volume. It is a structural proxy for order flow, not tick data, and it inherits every weakness a proxy has: it cannot see the order book, it cannot distinguish an aggressive buyer from a passive one, and on thin instruments the attribution is close to meaningless. It describes the index complex only and says nothing useful about an individual stock. It does not predict anything. It describes what the current bar and its neighbors have already printed.
Settings
Five symbols and their weights, smoothing length and z-score lookback, filter parameters, divergence strictness and cooldown, session handling, and a display toggle for each visual layer. Indicator

Indicator
