Prime Number Bands

Prime Bands
Indicator

Support and resistanceOn the price chartFree on ChartLabs

Prime Number Bands put a line on the first prime at or above the high, and one on the first prime at or below the low. A non-whole price stays put.

The closest published relative is the Prime Number Bands description from Modulus Financial Engineering. These two lines follow the chart engine rule. Reviewed by the ChartLabs team, updated Nov 2026.

Example market1hIndicatorsAtlas AIPrime Bandschartlabs.co/charts
Atlas reads it

Top is above Bottom (69,853.8).

Top 69,853.8 · Bottom 69,392.2

Atlas reads it

Top is above Bottom (69,853.8).

Top 69,853.8 · Bottom 69,392.2

Illustration on simulated data.

Prime Number BandsWhat is the Prime Bands indicator?

There is no length. The top line is #32CD32 and the bottom line is #FF0000, both 1 px, on the price chart. The top walks up from the high until the prime test passes. The bottom walks down from the low. A price that is not a whole number passes at once, so the band equals that price.

Highs 10, 10.5 and 68999, lows 8, 8.2 and 68000. The top prints 11.0000, 10.5000 and 69001.0000. The bottom prints 7.0000, 8.2000 and 67993.0000. The 10.5 and the 8.2 stay put because they are not whole numbers. 68999 steps up to 69001. 68000 steps down to 67993.

Values below 4 pass the test, so they do not move. A non-finite high or low leaves that band empty. This is two lines, on the high and the low, not a band around the close.

Not a copy of the Modulus text

The name matches their description. The numbers come from this engine prime test.

Whole numbers only get moved

A forex price with a decimal stays on itself, and the two lines can lie on the high and the low.

Prime Bands signalsFour patterns to know.

1Inconclusive

High steps up to a prime

10 becomes 11.0000. 68999 becomes 69001.0000.

2Inconclusive

Low steps down to a prime

8 becomes 7.0000. 68000 becomes 67993.0000.

3Inconclusive

A decimal price

10.5 stays 10.5000 and 8.2 stays 8.2000. The test passes immediately.

4Inconclusive

A missing price

A non-finite high leaves the top empty. The bottom still follows the low, and the reverse is true too.

Prime Bands formulaHow it is calculated.

Top=prime at or above high
STEP 1

Start at the high and the low

There is no length and no source switch.

STEP 2

Step until the test passes

Up from the high, down from the low, by 1, and only while the price is a whole number that fails.

STEP 3

Leave decimals where they are

10.5 prints 10.5000 on the top. 8.2 prints 8.2000 on the bottom.

Prime Bands settingsEvery setting, explained.

SettingDefaultRangeWhat it changes
InputsNoneNoneNo length. The top reads the high and the bottom reads the low.
Top#32CD32FixedFirst passing value at or above the high, 1 px.
Bottom#FF0000FixedFirst passing value at or below the low, 1 px.
Setting
Inputs
Default
None
Range
None
What it changes
No length. The top reads the high and the bottom reads the low.
Setting
Top
Default
#32CD32
Range
Fixed
What it changes
First passing value at or above the high, 1 px.
Setting
Bottom
Default
#FF0000
Range
Fixed
What it changes
First passing value at or below the low, 1 px.

Prime Bands strategiesUse it in 3 setups.

An integer high

High10prints11.0000

11 is the first prime at or above 10. 68999 prints 69001.0000.

An integer low

Low8prints7.0000

7 is the first prime at or below 8. 68000 prints 67993.0000.

A decimal stays

High10.5prints10.5000

The prime test treats a non-integer as already passing.

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

Prime Bands mistakesCommon mistakes.

Looking for a middle line

There are two lines. There is no third band and no close input.

Expecting every price to jump

Only a whole number that fails the test moves. Decimals, and values below 4, stay put.

Using the close

The top is the high and the bottom is the low. A close between them does not place either line.

Prime Bands combinationsPair it with these.

Prime Bands FAQQuestions traders ask.

What are the Prime Number Bands settings?

None. Top #32CD32 from the high, bottom #FF0000 from the low, on the price chart.

What is the worked example?

Highs 10, 10.5, 68999 print 11.0000, 10.5000, 69001.0000. Lows 8, 8.2, 68000 print 7.0000, 8.2000, 67993.0000.

Why does 10.5 stay at 10.5?

A price that is not a whole number passes the prime test immediately, so the band does not move.

Why does 68999 become 69001?

68999 fails the test. The line steps up by 1 until a value passes, which is 69001.

Is the close used?

No. High for the top, low for the bottom.

What if the high is not a number?

That band is empty. The other band still follows its own price.

Does it repaint?

No. A closed high and low stay. The live bar moves until it closes.

Where does the name come from?

Modulus Financial Engineering published a Prime Number Bands description. This page documents the chart engine rule, not their wording.

Related indicatorsMore support and resistance tools.

All support and resistance indicators

Try Prime Bands on a live chart.
Free. No download.

Works in your browser and on iPhone too.

Example market1h
Prime Bands