HTF Strat Bars w/stops [Market Breakers]

1 550
HTF Strat Bars w/stops [Market Breakers]

OVERVIEW
HTF Strat Bars w/stops puts up to four higher-timeframe candle panels on the right side of your chart. Each HTF bar is classified with The Strat numbering, and the script reads the active Strat combo on each timeframe. For every actionable or triggered setup it plots the entry, target and stop, calculates risk-to-reward, and adds a 50% stop when the standard stop gives a poor R:R. A summary table shows each timeframe's pattern and status, a weighted multi-timeframe bias, and Full Timeframe Continuity (FTFC).

The goal is to see the whole Strat picture across your timeframes, with trade levels already mapped, without flipping between charts.

HOW IT WORKS

HTF aggregation
HTF candles are built directly from the chart's own bars instead of request.security(). Each panel stays in sync with the chart, and the high/low of every HTF bar is traced back to the chart bar where it printed. Chart levels are anchored there. Each HTF must be higher than the chart timeframe. Intraday HTFs must also be an exact multiple of it. Invalid timeframes are skipped. Only standard chart types are supported.

Strat classification
Every HTF bar is compared to the bar before it:
- 1 = inside bar (took neither side)
- 2U = took the prior high only
- 2D = took the prior low only
- 3 = outside bar (took both sides)
Equal highs/lows count as "not taken."

In the panels, C1 and C2 are the last two closed HTF bars and C3 is the live bar.

Setup states
Each timeframe is in one of these states:

- Actionable — the last closed HTF bar is a 1 and the live bar hasn't broken it yet. Entry is the 1's high or low.
- 2-1-1 / 3-1-1: target is the bar before the first 1 (both sides on 2-1-1, reversal side on 3-1-1)
- 3-2-1 / 1-2-1: reversal side, target is the bar before the 2
- Optional extras (off by default): 2-2-1, 3-1, and the continuation side of 3-1-1 / X-2-1

- In force — the live HTF bar is the trigger.
- 2-1-2 / 3-1-2: entry is the 1, target is the bar before the 1
- 2-1-1-2 / 3-1-1-2 / 3-2-1-2 / 1-2-1-2: triggered actionables, keeping their original target
- 1-2-2 RevStrat: entry is the first 2, target is the bar before the 1
- 3-2-2 Rev: entry is the first 2, target is the 3
- 2-2 Rev: entry is the first 2, target is the bar before it
- 2-2 Cont / 1-2: entry only, no target
- 1-3: the live bar went outside after a 1; direction follows its candle color

- Watch — the live bar is still inside a closed 2. The script shows (faded) the 1-2-2 / 3-2-2 / 2-2 Rev trigger that would fire if that 2 is reversed. It's a heads-up only. It isn't actionable and doesn't count toward the bias.

- Target hit — the in-force setup reached its target.
- Outside — the live bar is a 3 (both sides taken).
- Watching — no qualifying combo.

Stops and R:R
- S1 (standard stop) is the opposite side of the trigger bar. Bull stop = trigger bar's low, bear stop = trigger bar's high. On the HTF, an in-force 2 can't reach its stop without becoming a 3, so a stop-out shows as "Outside."
- R:R = (entry → target) ÷ (entry → S1).
- S2 (50% stop) appears only when the S1 trade is below your minimum R:R (default 1:1). S2 sits at 50% of the trigger bar.
- If R:R is still below the minimum with S2, the setup is flagged SKIP in the table and alert.
- Setups with no target (1-2, 2-2 Cont) have no R:R and never get an S2.
- On two-sided actionable setups (2-1-1), each side's stop is the other side's entry, so no separate stop line is drawn. The table still lists both.

Bias and FTFC
- Bias is a weighted score of each timeframe's combo direction. Each HTF has its own weight (defaults 1/2/3/4, so higher timeframes count more). Two-sided setups, Watch and Watching count as neutral. The Agreement bar shows how much of the total weight points the same way.
- FTFC (Full Timeframe Continuity) shows when every enabled HTF's live candle is green, or every one is red.

WHAT'S ON THE CHART
- HTF panels: up to four panels (default 15m / 1h / 4h / D) with Strat-colored or direction-colored candles, Strat numbers under each bar, and the HTF name and current pattern above each panel with a status icon.
- Panel levels: entry (E), target (T), stop (S) and 50% stop (S2) lines, starting at the bar that defines each level.
- Prior HTF highs/lows: each panel can mark the highs and lows of its closed bars, optionally only the ones not yet taken. That's the resting liquidity price may reach for.
- FVG zones: optional shaded fair value gaps between panel bars.
- Chart levels (optional, per HTF): entry/target/stop lines on the main chart, anchored at the chart bar where each level printed, with tags like "1h E". They can hide automatically once the target is hit.
- Trigger marks: a label on the chart bar where an HTF combo first went in force. Checked on chart-bar close, one mark per HTF bar, and stacked when several timeframes trigger on the same bar.
- Chart bar coloring: optional Strat coloring of the chart's own bars (1 / 2U / 2D / 3).
- HTF1 separators: faint vertical lines marking each HTF1 bar open.

THE TABLE
- Bias, Agreement %, FTFC and a count of bull / bear / neutral combos
- Per-timeframe rows: pattern, status, and optionally the full combo sequence and Entry → Target · Stop · R:R
- The optional columns can be hidden for a narrower table on phone or tablet

HOW TO USE IT
1. Pick HTFs that are higher than your chart timeframe (and a multiple of it for intraday). A Daily panel on a 1–3m chart needs about 5 days of loaded history.
2. Read top-down. Use the higher-timeframe panels and the Bias/FTFC rows for direction, and the lower HTFs for timing.
3. Actionable (⏳) means a trigger level is set. In force (✅) means the trigger has fired. Target hit (🎯) means that setup has played out. Watch (👀) is a possible reversal to keep an eye on.
4. Check the R:R before acting. If S1 is under your minimum, the script shows the tighter S2. If it's flagged SKIP, the setup doesn't meet your R:R rule even with the tighter stop.
5. Turn on "Levels on chart" for the timeframe(s) you actually execute from, so the main chart doesn't get crowded.

ALERTS
- Detailed alerts: create an alert with "Any alert() function call." Each alert fires once per bar close when an HTF combo goes in force. The message includes the ticker, timeframe, pattern, entry, target, stop, R:R, and S2 / SKIP when it applies.
- Simple alert conditions: bullish combo in force, bearish combo in force, any combo in force, FTFC up, FTFC down.

SETTINGS (SUMMARY)
- HTF panels: timeframes, on/off, chart levels per HTF, bar style, color mode, bars shown, spacing and offset
- Actionable setups / In-force patterns: toggle each combo individually, plus the Watch hint
- Trigger marks: location, distance and stacking (ATR-based), colors, size, how many to keep
- Entry / target / stop levels: stops on/off, S2 and minimum R:R, hide levels after target hit, tag and price display, and separate line color/width/style for chart and panel levels
- Markings: label sizes, Strat numbers, C1–C3 tags, prior highs/lows, sweeps, FVGs, separators, chart bar coloring
- Colors: 1 / 2U / 2D / 3 colors, a light-chart option for 3s, custom border and wick
- Table: theme, size, position, optional columns, HTF weights, agreement bar length

NOTES AND LIMITATIONS
- Signals are evaluated on chart-bar close. The live HTF bar is still forming, so status, pattern and levels can change until that HTF bar closes.
- The first HTF bar on the chart may be partial and is excluded from the Strat reads.
- Works on standard chart types only (not Heikin Ashi, Renko, etc.).

CREDITS
This script is open source under the Mozilla Public License 2.0 and builds on:
- "HTF Fractal Bars [Herman]" by helmans13 (MPL 2.0): chart-bar HTF aggregation and the right-side panel concept
- "The Strat - Multi-Timeframe Combo Analyzer" by StonkTrader4 (MPL 2.0): Strat classification and combo rules
- The Strat methodology, created by Rob Smith

Added in this version: the actionable / in-force / watch combo engine with entry and target mapping, trigger-bar stops with R:R, the conditional 50% stop and SKIP flag, weighted multi-timeframe bias and FTFC, prior HTF high/low liquidity levels on the panels, chart-anchored level lines, trigger marks, and detailed alerts.

DISCLAIMER
This indicator is for educational and informational purposes only. It is not financial advice and does not guarantee results. Always use your own judgment and risk management.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.