NBars Up

NBars Up
Indicator

Support and resistanceSeparate panelFree on ChartLabs

NBars Up prints 1 when each of the last 3 bars made a higher high, a higher low and a higher close, and closed above its open. Otherwise it prints 0.

A run of higher highs and higher lows, the uptrend idea in John J. Murphy, Technical Analysis of the Financial Markets (1999), chapter 2. This flag also asks for a higher close and a close above the open. Reviewed by the ChartLabs team, updated Nov 2026.

Example market1hIndicatorsAtlas AINBars Upchartlabs.co/charts
Example market, 1h68,86565,84662,82759,80964,803.7
Atlas reads it

NBarsUp is 0.000.

NBarsUp 0.000

Atlas reads it

NBarsUp is 0.000.

NBarsUp 0.000

Illustration on simulated data.

NBars UpWhat is the NBars Up indicator?

Bar count is 3, from 1 to 500. The column is #32CD32, in its own panel, fixed at 3 decimals, with a base of 0. It is a column, not a line. The panel shows 0.000 or 1.000.

Five bars: open 10 high 11 low 9 close 10.5, then open 10.4 high 12 low 10 close 11.5, then open 11.2 high 13 low 11 close 12.5, then open 12.2 high 14 low 12 close 13.5, then open 13 high 13 low 12 close 12.2. The flags are 0.0000, 0.0000, 0.0000, 1.0000 and 0.0000. Record 0 cannot qualify, because it has no previous bar. The run reaches 3 on the fourth bar. The fifth bar breaks it.

This is not a count of higher highs inside a window, and it is not a tally that can read 2 or 3. An older length on the card did nothing, so it is gone. A bar with a non-numeric open, high, low or close is empty and the run resets to 0.

Four tests, every bar of the run

Higher high, higher low, higher close, and close above the open, each versus the previous bar. All four, on each of the last Bar count bars.

The run resets

One failed bar sets the run to 0. The next rise has to build the count again.

NBars Up signalsFour patterns to know.

1Bullish lean

Run complete

The fourth bar prints 1.0000. Three rising bars in a row met all four tests.

2Inconclusive

Still building

The second and third bars are part of the run and still print 0.0000, because the count has not reached 3.

3Bearish lean

Run broken

The fifth bar prints 0.0000. Its high did not clear the previous high.

4Inconclusive

A hole in the data

A non-numeric bar is empty and clears the run. The following bars start from zero.

NBars Up formulaHow it is calculated.

flag=1 when the rising run reaches the bar count
STEP 1

Score each bar against the one before

Higher high, higher low, higher close, close above the open. Record 0 fails.

STEP 2

Count the streak

The example reaches 3 on the fourth bar.

STEP 3

Print 1 or 0

1.0000 on that bar, then 0.0000 when the fifth bar breaks the streak.

NBars Up settingsEvery setting, explained.

SettingDefaultRangeWhat it changes
Bar count31 to 500How many rising bars in a row are required.
Column#32CD32FixedA column of 1 when the run qualifies, else 0. Panel shows 3 decimals.
Record 00FixedNo previous bar, so the run cannot start there.
Setting
Bar count
Default
3
Range
1 to 500
What it changes
How many rising bars in a row are required.
Setting
Column
Default
#32CD32
Range
Fixed
What it changes
A column of 1 when the run qualifies, else 0. Panel shows 3 decimals.
Setting
Record 0
Default
0
Range
Fixed
What it changes
No previous bar, so the run cannot start there.
35 bars that must keep rising
70,20866,82563,44360,06164,803.7

Drag to see how the setting changes the lines and how many signals you get. Illustration on simulated data.

NBars Up strategiesUse it in 3 setups.

Wait for the full run

Thefourth bar is1.0000

Traders often treat that as a short rising sequence, not as a measured move. The panel shows 1.000.

A rising bar can still print 0

Thethird bar is0.0000

It qualifies on its own, and the streak is only 2, under the bar count of 3.

One break clears it

Thefifth bar is0.0000

The high did not rise. The run is 0, so the next flags need three fresh bars.

Test a rule in the Strategy TesterFree with 1 year of history. Past results do not guarantee future results.

NBars Up mistakesCommon mistakes.

Counting highs over the last 14 bars

An older card described a tally. This flag is a streak of 3, and the value is only 0 or 1.

Dropping the close-above-open test

A higher high, low and close still fail if the close is not above the open. All four are required.

Reading 1.0000 as three

The column marks that the streak reached the count. It does not print the count.

NBars Up combinationsPair it with these.

NBars Up FAQQuestions traders ask.

What is the NBars Up setting?

Bar count 3, from 1 to 500. The column is #32CD32.

What is the worked series?

Four rising bars, then a break. The flags are 0.0000, 0.0000, 0.0000, 1.0000 and 0.0000.

Which four tests?

Higher high, higher low, higher close than the previous bar, and a close above the open.

Why is the third bar still 0?

The streak is 2. The flag waits until the streak reaches the bar count.

What does the fifth bar do?

It breaks the run, so the flag goes back to 0.0000.

Can it print 2 or 3?

No. The column is only 0 or 1. It does not print the streak length.

Does it repaint?

No. A closed bar stays. The live bar moves until it closes.

Is there a book formula with this exact name?

No. The closest published idea is Murphy's higher highs and higher lows (1999, chapter 2). The kernel adds the higher close and the close above the open.

Related indicatorsMore support and resistance tools.

All support and resistance indicators

Try NBars Up on a live chart.
Free. No download.

Works in your browser and on iPhone too.

Example market1h
NBars Up