INVITE-ONLY SCRIPT

StockLeave Signal Bars

219
Overview
The Signal Bars indicator identifies potential trade entries by highlighting expansion and reversal bars. These are defined by individual bar characteristics and further refined by contextual factors such as price position relative to structural boundaries. The purpose is to locate bars that signal potential market initiation or reaction.

Expansion Bars
The expansion captures bars that breakout from a period of reduced volatility. These often initiate directional movement and are recognized using a two-part definition.

Range Expansion: The current bar’s range must exceed the average range. This ensures the move is comparatively large and stands out from recent behavior.

Range Compression: The bars before the expansion must be below a threshold of the average range. This confirms a low-volatility lead-up, strengthening the likelihood that the expansion has significance.

This script applies additional filters: a local breakout ensures price breaks the previous bar’s high or low; a strong close confirms directional intent by requiring the close near the bar’s extreme; mean proximity checks that expansion starts near the mean price using a dynamic buffer relative to bar size; a directional filter blocks signals during extended directional runs; and consecutive suppression prevents multiple expansions to show in succession.

istantanea

Pin Bar Reversals
Reversal setups aim to identify potential turning points after price has reached a zone of imbalance or extension. These bars typically exhibit long tails and occur near structural boundaries such as the outer Keltner bands. Their design favors short-term price rejection and potential reversal.

Tail Dominance: The wick (upper or lower) must be at least twice the size of the bar’s body and account for more than a certain percentage of the entire bar’s range. This ensures the bar represents strong rejection rather than mere indecision.

Close Location: The bar must close near the opposite end of its wick to confirm that rejection was held into the close. For bearish reversals, the close must be near the low; for bullish reversals, near the high. This reinforces intent and pressure in the direction of the reversal.

This script applies additional filters: local extreme ensures the bar marks a local turning point to confirm reversals occur after extension, not within structure; boundary proximity requires the bar to appear near the outer Keltner Bands, aligning bearish signals with the upper band and bullish with the lower, indicating price has reached an area of likely imbalance.

Snapback Reversals
Snapbacks are structured to capture failed extensions outside structural boundaries. While traditional reversals are identified by a single bar with a rejecting tail, snapbacks use a two-bar sequence: a strong impulse bar that closes beyond the bands, followed by a bar that reclaims in the opposite direction. The difference lies in the formation, not the intent, as both anticipate a reversion after price imbalance.

Impulse Bar Criteria: The previous bar must close beyond the upper (bullish impulse) or lower (bearish impulse) Keltner band. It must also close near its extreme and have a large body. This confirms strong directional pressure.

The current bar must close beyond the midpoint of the previous bar’s body and reverse the prior direction. This signals a failure to follow through and a snapback into the prior range. These will show only when price extends beyond the boundaries. This ensures that the setup targets failed breakouts rather than normal pullbacks or mid-range fluctuation.

istantanea

Alert Configuration
The Signal Bars indicator includes an alert function with two built-in conditions to help reduce screen time and focus attention when predefined conditions are met.
  • Expansion: Alerts when a bar meets all conditions for a valid expansion.
  • Reversal: Alerts when a bar meets the criteria for a pin bar or snapback reversal.


These are built into the indicator with the alertcondition() function and can be turned on whenever the indicator is applied to a chart. Each alert includes a default message that uses dynamic placeholders; {{ticker}} for the symbol and {{interval}} for the timeframe.

  1. Create a new alert and select the condition “StockLeave Signal Bars.”
  2. Then select from the two options: Expansion and Reversal.
  3. For expansions, select “once per bar” to capture developing momentum.
  4. For reversals, use “once per bar close” to confirm rejection setups.


Apply alerts across multiple timeframes to improve coverage. Lower timeframes are better suited for fast-moving markets, while higher timeframes work well in slower or more selective environments. This process only needs to be done once. The created alerts can then be toggled on or off from the Alerts panel as preferred, without requiring reconfiguration.

Applied Discretion
The indicator functions on fixed logic, but interpretation always takes precedence. Consider price action, structure, volatility, and broader market context. Most signals will not lead to trades; while many may appear in a session, only a select few will align with context and warrant execution based on discretion.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.