Market Structure Indicator for TradingView
One-time Pine Script v6 indicator: the facts
Market Structure Indicator for TradingView is a one-time purchase: pay $19.00 once and download the complete Pine Script v6 source, a user guide and the license terms. Paste it into TradingView's Pine Editor and it runs on your own charts, including on TradingView's free plan. There is no subscription, no renewal and no invite-only access list, and a 7-day money-back guarantee applies.
| Price | $19.00, one-time |
| You get | Complete Pine Script v6 source, user guide, license terms |
| Runs on | TradingView, including the free plan |
| Repainting | Non-repainting: events on confirmed bars only |
| Refund | 7-day money-back guarantee |
| Pay with | Card or crypto |
About this product
Confirmed-pivot market structure: HH/HL state, swing-to-swing structure lines, and close-based BOS and CHoCH labels — once per level.
Most market-structure tools redraw their swings as price moves, so the "structure" you see at the end of the day is not the structure that was on the chart live. This one is built the other way. Swings come only from confirmed pivots (5 bars each side by default); the state — uptrend, downtrend, or range/undefined — is a stated comparison of the last two confirmed swing highs and the last two confirmed swing lows, recomputed only when a new pivot confirms.
Structure lines connect consecutive confirmed swing points on each side. A bar that closes above the last swing high in an uptrend marks one BOS; a close below the last higher low marks one CHoCH and moves the state to a pending CHoCH reading until the next pivot confirms. Every level can produce each event once — a broken level is consumed, not re-labelled on every re-cross. Breaks are close-based only: wicks do not count.
You get the complete Pine Script v6 source, with the swing, state, BOS, and CHoCH rules stated in full in the guide — including the structural limitation of every pivot tool: a swing is confirmed a few bars after the turn, never at the turn itself. The on-chart table shows the state, the last swing high and low, and the last event with its age in bars.
Features
- Swings from confirmed pivots only (adjustable pivot length, default 5) — no repainting
- Structure state from the last two swing highs and lows: HH+HL uptrend, LH+LL downtrend, otherwise range/undefined
- Swing-to-swing structure lines with width and per-side color inputs, capped at 30 segments per side (adjustable)
- BOS labels on close-based breaks of the last swing level, once per level
- CHoCH labels on close-based breaks against the trend, with the pending CHoCH state shown in the table
- Marker shape (arrow or triangle) and size (tiny or small) inputs; label toggle and label size input
- Smart table (tiny/small/normal, position input) showing state, last swing high, last swing low, and last event with bars-ago
- Alerts for BOS and CHoCH in both directions
- Full source included — every rule inspectable in the Pine Editor
What's included
- The complete Pine Script v6 source file (market-structure-indicator.pine) — paste into TradingView's Pine Editor and add to any chart
- User guide with the exact mechanical definition, every input explained, and a hand-verified worked example
- Evidence receipt, security review, and licensing review for this build
- Product artwork
Requirements
- A TradingView account (the free tier runs indicators) and a modern web browser. Nothing else to install; the script runs on TradingView's platform, on your own charts and data entitlements.
$19.00, one-time payment. 7-day money-back guarantee: email us within 7 days of purchase for a refund.
Educational tool only, not financial advice. This indicator measures and draws the stated mechanical quantity; it does not predict price movement, and it presents no win-rate or performance statistics. Publication of this listing follows a TradingView Pine Editor compile pass on the included source.
Frequently asked questions
How does this indicator decide the market structure state? From the last two confirmed swing highs and swing lows. If the latest swing high is above the prior one and the latest swing low is above the prior one (higher high + higher low), the state is uptrend; the mirror image is downtrend; anything else is range/undefined. The state is recomputed only when a new pivot confirms.
What is the difference between BOS and CHoCH in this tool? A BOS is a close-based break in the direction of the current state: a close above the last swing high in an uptrend, or below the last swing low in a downtrend. A CHoCH is a close-based break against it: a close below the most recent higher low in an uptrend, or above the most recent lower high in a downtrend. After a CHoCH the table shows a pending CHoCH state until the next pivot confirmation recomputes the state from the swing sequence.
Why did a swing appear late, several bars after the high? A pivot with length 5 cannot be confirmed until 5 bars after it forms — that lag is what makes the swing non-repainting and honest. Shorter pivot lengths confirm faster and produce more, weaker swings.
Can one level produce several BOS labels? No. Each swing level can produce at most one BOS and at most one CHoCH. Once a level is broken it is consumed; it is not tested again until a newly confirmed swing replaces it.
Does a BOS or CHoCH mean price will keep going that way? No, and this product claims nothing of the kind. A BOS or CHoCH records that a bar closed past a confirmed swing level. It describes geometry that has already occurred; it is not a prediction and not a trade signal.
One-time purchase — no subscription. You pay once and keep the complete Pine Script v6 source. There is no recurring charge, no monthly fee, and nothing to renew.
Questions about this product
What exactly do I get?
market-structure-indicator.pine — complete Pine Script v6 source, USER-GUIDE.md — the exact mechanical definition, every input, verified worked example, EVIDENCE-RECEIPT.md — build evidence per the SML Research+ standard, SECURITY-REVIEW.md and LICENSING-REVIEW.md, LICENSE-TERMS.md, Product artwork (PNG). Delivered as one download, the moment your payment is confirmed — on this site, with no shipping and no account.
Is this a one-time purchase or a subscription?
One-time. You pay once and keep the complete Pine Script v6 source; there is no renewal and no invite-only access list.
Do I get the Pine Script source code?
Yes: the complete Pine Script v6 source, a user guide and the license terms. You can read every rule and adjust every input.
Does it work on TradingView's free plan?
Yes. Paste the source into TradingView's Pine Editor and add it to your chart; the free plan runs custom indicators.
How do I set up this Pine Script indicator on TradingView after I buy it as a one-time purchase, with no subscription?
Get started in about a minute: open TradingView's Pine Editor, create a new indicator, replace the template with the source, save, click Add to chart, then adjust the inputs from the gear icon. TradingView's first-steps page shows where the editor opens: https://tradingview.com/pine-script-docs/primer/first-steps. Step by step: https://dual.scriptmasterlabs.com/guides/install-pine-script-v6-indicator-check-repainting
How does buying this one-time purchase Pine Script indicator compare with free TradingView scripts and invite-only subscriptions?
Compared with free open-source scripts on TradingView, you get one stated definition per rule, a written guide and a compile check before listing. Compared with invite-only subscriptions, you pay once and get the source instead of renting hidden access. If a free script does what you need, it is a fine alternative.
What are the risks and limitations of buying this one-time purchase Pine Script indicator for TradingView instead of a subscription?
It measures and draws a stated rule; it does not predict price, recommend trades or show a win rate. TradingView's free plan caps how many indicators one chart can hold. Trading involves risk of loss; this is educational software, not financial advice. TradingView's manual explains repainting, so you can test it yourself: https://tradingview.com/pine-script-docs/concepts/repainting
Does it repaint?
No. Events are computed on confirmed bars only; pivot-based logic marks events at the confirmation bar and the guide states that lag. A marker, once printed, does not move or disappear.