Price Action Invalidation Stop Loss (TheStrat)

A stop-loss visualizer that places the stop where price action says your directional read is wrong, defined by higher-timeframe bar structure. Based on TheStrat methodology by Rob Smith.
ABOUT THESTRAT
TheStrat, developed by Rob Smith, is a price-action framework that classifies every bar by how it relates to the prior bar's range, then reads that structure across multiple timeframes. Every bar is objectively one of a few types, and the way those types stack across timeframes defines whether a move is continuing or reversing.
BAR TYPES
WHAT IT DOES
The stop sits at the level where the directional thesis would be invalidated: the prior higher-timeframe bar's high or low, the point where that timeframe prints a directional 2 or 3 against the position.
It assumes entry on the 15-minute timeframe or lower, using the 30-minute and 60-minute as the structural higher timeframes. The indicator behaves identically on any chart resolution at or below 15m. Whether you load it on a 5m or 15m chart, it references the same 15m / 30m / 60m structure.
THREE STATES
Long (blue): stop below price at the relevant higher-timeframe invalidation level.
Short (orange): stop above price.
Neutral (gray): no side is structurally supported, so the indicator stays flat.
Invalidation exits the current side. A reversal happens only if the opposite side is also valid. Otherwise the indicator goes neutral rather than flipping, which avoids the whipsaw of a pure stop-and-reverse model in choppy conditions.
HOW THE STOP IS DERIVED
SETTINGS
Behavior: tighten on 2-in-direction, 3-override, neutral state.
Visual markers (off by default): state transitions, tighten events, state background tint, higher-timeframe reference levels.
Debug: structured Pine Logs of every state change, tighten, and near-miss for bar-by-bar auditing.
HOW TO USE
Add it to any chart at 15-minute resolution or lower. The single stepped line is the live invalidation stop for the currently supported direction. When the line is absent (neutral), structure is mixed and there is no clean side.
This is a visualization and study tool. It is not a strategy, does not place orders, and does not generate buy/sell signals. Past structure does not guarantee future behavior. Always manage your own risk.
ABOUT THESTRAT
TheStrat, developed by Rob Smith, is a price-action framework that classifies every bar by how it relates to the prior bar's range, then reads that structure across multiple timeframes. Every bar is objectively one of a few types, and the way those types stack across timeframes defines whether a move is continuing or reversing.
BAR TYPES
- 1 (Inside bar): trades entirely within the prior bar's range. High is below the prior high and low is above the prior low. Consolidation by definition.
- 2u (Directional up): takes the prior bar's high but not its low.
- 2d (Directional down): takes the prior bar's low but not its high.
- 3 (Outside bar): takes both the prior bar's high and its low. Range expansion on both sides.
- Failing 2 (F2): a bar that was a directional 2 but current price retraces back into the range of the prior candle. A failed 2u breaks the prior high but falls back below the highest high of the prior candle; a failed 2d breaks the prior low then turns back up above the lowest low of the prior candle. A failed 2 marks rejection of the attempted move and often a reversal.
WHAT IT DOES
The stop sits at the level where the directional thesis would be invalidated: the prior higher-timeframe bar's high or low, the point where that timeframe prints a directional 2 or 3 against the position.
It assumes entry on the 15-minute timeframe or lower, using the 30-minute and 60-minute as the structural higher timeframes. The indicator behaves identically on any chart resolution at or below 15m. Whether you load it on a 5m or 15m chart, it references the same 15m / 30m / 60m structure.
THREE STATES
Long (blue): stop below price at the relevant higher-timeframe invalidation level.
Short (orange): stop above price.
Neutral (gray): no side is structurally supported, so the indicator stays flat.
Invalidation exits the current side. A reversal happens only if the opposite side is also valid. Otherwise the indicator goes neutral rather than flipping, which avoids the whipsaw of a pure stop-and-reverse model in choppy conditions.
HOW THE STOP IS DERIVED
- Base level: the tighter of the prior 30m / 60m extremes (the higher of the two lows for a long, the lower of the two highs for a short).
- Tightening: when a higher timeframe closes a directional 2 in your favor, the stop pulls up to that bar's low (long) or down to its high (short).
- Failed-2 handling: if a higher timeframe breaks its prior high or low then fails back through it, the stop tightens to the most recent completed 15m level.
- 3-override (optional): while a bar is a live outside bar (3), the stop holds at that bar's extreme so the expansion can resolve instead of tripping mid-bar.
- A direction is only active when the 30m and/or 60m is in a clean 2 or 3 in that direction, not a failed 2, failed 3, or inside bar.
SETTINGS
Behavior: tighten on 2-in-direction, 3-override, neutral state.
Visual markers (off by default): state transitions, tighten events, state background tint, higher-timeframe reference levels.
Debug: structured Pine Logs of every state change, tighten, and near-miss for bar-by-bar auditing.
HOW TO USE
Add it to any chart at 15-minute resolution or lower. The single stepped line is the live invalidation stop for the currently supported direction. When the line is absent (neutral), structure is mixed and there is no clean side.
This is a visualization and study tool. It is not a strategy, does not place orders, and does not generate buy/sell signals. Past structure does not guarantee future behavior. Always manage your own risk.
Tools for traders and investors smart enough to keep it simple 😘👌
➡️ SETUP SCREENER GUIDE: TheStratSuite.com/scanner/guide
🤑 TheStrat Suite is now FREE & open source: TheStratSuite.com
345strategies.com · github.com/345-strategies
➡️ SETUP SCREENER GUIDE: TheStratSuite.com/scanner/guide
🤑 TheStrat Suite is now FREE & open source: TheStratSuite.com
345strategies.com · github.com/345-strategies
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.
Tools for traders and investors smart enough to keep it simple 😘👌
➡️ SETUP SCREENER GUIDE: TheStratSuite.com/scanner/guide
🤑 TheStrat Suite is now FREE & open source: TheStratSuite.com
345strategies.com · github.com/345-strategies
➡️ SETUP SCREENER GUIDE: TheStratSuite.com/scanner/guide
🤑 TheStrat Suite is now FREE & open source: TheStratSuite.com
345strategies.com · github.com/345-strategies
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.