# Bar Counting H1/H2

Bar Counting H1/H2 is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Numbers Al Brooks' pullback attempts bar by bar: H1 to H4 under bull pullbacks and L1 to L4 over bear rallies, counted once a bar makes a new trend extreme and closes beyond a rising or falling 20 EMA, and reset at each new trend extreme. Second entries trade on a stop one tick beyond the signal bar, and H2s or L2s that trigger and then break the signal bar's other end are marked failed.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Sep 3, 2026.
- Access: free.
- Concepts: [bar counting H1/H2](https://www.luxalgo.com/library/concept/bar-counting-h1-h2/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=eh2csf1fwiurlkn3tu0szy1f
- Page: https://www.luxalgo.com/library/indicator/bar-counting-h1-h2/

The **Bar Counting H1/H2** indicator provides a disciplined framework for identifying pullbacks within strong directional trends. By systematically tracking the sequence of price movements against a primary trend, the tool highlights objective entry points known as High (H) and Low (L) counts. This approach helps traders filter out market noise and focus on higher-probability setups, providing clear labels for entry signals, protective stop placements, and profit targets. It serves as an essential utility for those who rely on classic price action patterns to time their entries during active market phases.

## How to Trade the Bar Counting H1/H2?

Trading with this indicator relies on the principle of counting pullbacks against an established exponential moving average (EMA). In a bullish trend, the indicator looks for pullbacks and labels them as H1, H2, and so on. An H1 represents the first attempt to resume the uptrend after a pullback, while an H2 signifies the second attempt. 

To trade effectively, look for the following:
* Signal Identification: Prioritize setups that align with the slope of the EMA. A rising EMA confirms a bullish bias, while a falling EMA confirms a bearish bias. 
* Entry Timing: The indicator identifies H1 and H2 or L1 and L2 setups. While first attempts can work in very strong trends, second attempts (H2/L2) are often preferred as they confirm a two-legged pullback has completed.
* Risk Management: The indicator provides two methods for stop placement: placing the stop just beyond the signal bar or behind the extreme of the entire pullback. Using the pullback extreme offers a wider safety margin but requires a smaller position size.
* Profit Taking: You may target the previous trend extreme for a test of momentum or use a fixed risk multiple (R-Multiple) to ensure a consistent reward-to-risk ratio. The built-in dashboard helps monitor open trades and historical performance metrics.

## Bar Counting H1/H2 Settings

### Trend Context
* **Moving Average Length**: Sets the period for the EMA used to define the trend direction and context for counts.
* **Trend Extreme Lookback**: Determines the number of bars used to calculate new highs or lows for trend tracking.

### Count
* **Maximum Count**: Defines the highest attempt numbered before counting stops; a pullback that needs this many attempts has lasted long enough to question the current trend.
* **Show Every Count**: Toggles the visibility of all count labels versus only those that meet the criteria for a traded setup.

### Trade Plan
* **Trade**: Selects which setups to signal, such as only second entries (H2/L2) or both first and second entries.
* **Protective Stop**: Chooses the stop loss logic, either based on the signal bar alone or the absolute extreme of the pullback.
* **Target**: Sets the method for profit calculation, either targeting the previous trend extreme or a specific R-multiple.
* **Minimum Reward / R Multiple (R)**: Acts as a floor for the target price or the fixed target ratio.
* **Maximum Hold (Bars)**: Sets the maximum duration for a trade; if the target is not reached within this timeframe, the trade is closed.

### Dashboard
* **Show Dashboard**: Toggles the display of the live market context table.
* **Position**: Controls where the dashboard is anchored on the screen.
* **Size**: Adjusts the scale of the dashboard text.

### Style
* **Show Moving Average**: Toggles the visibility of the EMA line on the chart.
* **Bull / Bear / Average**: Allows customization of the colors used for the count labels, dashboard, and the EMA line.

## Frequently Asked Questions

### What is the difference between an H1 and an H2 entry?
An H1 is the first attempt for price to break above the high of the previous bar during a pullback, while an H2 represents the second attempt. H2 entries are often considered higher probability as they follow a two-legged pullback, which is a common structure in healthy trends.

### How does the indicator identify a valid trend?
The indicator uses an exponential moving average to establish the trend baseline. A bull trend is identified when the average is rising and price is closing above it, while a bear trend requires a falling average with price closing below it.

### What does the Failed label indicate?
A "Failed" label appears when a trade was triggered but subsequently broke through its protective stop level. This provides valuable context, as a failed second entry often signals that the market is entering a range or is preparing to reverse the current trend.

## Related indicators

- [Smart Money Concepts (SMC)](https://www.luxalgo.com/library/indicator/smart-money-concepts-smc/) (Break of Structure): markdown at https://www.luxalgo.com/library/indicator/smart-money-concepts-smc.md
- [Structure & Trend Dashboard](https://www.luxalgo.com/library/indicator/structure-trend-dashboard/) (Break of Structure): markdown at https://www.luxalgo.com/library/indicator/structure-trend-dashboard.md
- [FVG + Liquidity Sweep + CISD](https://www.luxalgo.com/library/indicator/fvg-liquidity-sweep-cisd/) (Change of Character): markdown at https://www.luxalgo.com/library/indicator/fvg-liquidity-sweep-cisd.md
- [MSS Sweep Fib Retrace](https://www.luxalgo.com/library/indicator/mss-sweep-fib-retrace/) (Change of Character): markdown at https://www.luxalgo.com/library/indicator/mss-sweep-fib-retrace.md
- [HTF CISD Projections](https://www.luxalgo.com/library/indicator/htf-cisd-projections/) (Change of Character): markdown at https://www.luxalgo.com/library/indicator/htf-cisd-projections.md
- [HTF Sweep Signals](https://www.luxalgo.com/library/indicator/htf-sweep-signals/) (Swing Failure Pattern): markdown at https://www.luxalgo.com/library/indicator/htf-sweep-signals.md
- [Liquidity Structure & Order Flow](https://www.luxalgo.com/library/indicator/liquidity-structure-order-flow/) (Break of Structure): markdown at https://www.luxalgo.com/library/indicator/liquidity-structure-order-flow.md
- [Market Structure Break & OB Probability Toolkit](https://www.luxalgo.com/library/indicator/market-structure-break-ob-probability-toolkit/) (Break of Structure): markdown at https://www.luxalgo.com/library/indicator/market-structure-break-ob-probability-toolkit.md

---

Source: https://www.luxalgo.com/library/indicator/bar-counting-h1-h2/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
