Prime Number Oscillator

PNO
Indicator

Support and resistanceSeparate panelFree on ChartLabs

Prime Number Oscillator is the close minus the nearer prime. A tie uses the lower prime. A close that is not a whole number prints zero.

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

Example market1hIndicatorsAtlas AIPNOchartlabs.co/charts
Atlas reads it

PNO is 0.000.

PNO 0.000

Atlas reads it

PNO is 0.000.

PNO 0.000

Illustration on simulated data.

Prime Number OscillatorWhat is the PNO indicator?

There is no length. The line is white, 1 px, in its own panel, 3 decimals. It takes the prime at or below the close and the prime at or above it, and subtracts the nearer one. A tie uses the lower prime. A non-integer close passes the test itself, so the result is zero. A non-finite close leaves the bar empty.

Closes 10, 9, 8.5, 67786, 4, 1 and 11 print -1.000, 2.000, 0.000, 3.000, 1.000, 0.000 and 0.000. 10 is nearer to 11 than to 7, so the line is 10 minus 11. 9 is the same distance from 7 and from 11, so the lower prime wins and the line is 9 minus 7. 67786 is the same distance from 67783 and 67789, so the line is 3.000. 8.5, 1 and 11 already pass, so they print 0.000.

The panel can be read next to Prime Number Bands, which runs the same test on the high and the low. This line is only the close.

A tie is not a coin flip

Equal distance uses the lower prime. 9 prints 2.000, not -2. 67786 prints 3.000, not -3.

Zero means the close passed

A decimal, a number below 4, or a prime close, prints 0.000. Empty is reserved for a non-finite close.

PNO signalsFour patterns to know.

1Inconclusive

Close under the next prime

10 prints -1.000. The nearer prime is above the close.

2Inconclusive

Close over the previous prime

9 prints 2.000 because the tie went to 7. 4 prints 1.000 because the tie went to 3.

3Inconclusive

Close already passes

8.5, 1 and 11 print 0.000. There is no nearer prime to subtract.

4Inconclusive

A large tie

67786 sits halfway between 67783 and 67789 and prints 3.000.

PNO formulaHow it is calculated.

PNO=close−nearer prime
STEP 1

Test the close

If it is not a whole number, or it already passes, print 0.000.

STEP 2

Find the prime on each side

One at or below, one at or above.

STEP 3

Subtract the nearer

On a tie, subtract the lower one. 10 prints -1.000. 9 prints 2.000. 67786 prints 3.000.

PNO settingsEvery setting, explained.

SettingDefaultRangeWhat it changes
InputsNoneNoneNo length. The line reads the close.
LinewhiteFixedOne line, 1 px.
PanelOwn panel, 3 decimalsFixedThe example prints -1.000, 2.000, 0.000, 3.000, 1.000, 0.000, 0.000.
Setting
Inputs
Default
None
Range
None
What it changes
No length. The line reads the close.
Setting
Line
Default
white
Range
Fixed
What it changes
One line, 1 px.
Setting
Panel
Default
Own panel, 3 decimals
Range
Fixed
What it changes
The example prints -1.000, 2.000, 0.000, 3.000, 1.000, 0.000, 0.000.

PNO strategiesUse it in 3 setups.

Closer to the prime above

Close10prints-1.000

11 is 1 away and 7 is 3 away.

A tie

Close9prints2.000

7 and 11 are both 2 away. The lower prime is the one that is used. 67786 prints 3.000 for the same reason.

A decimal close

Close8.5prints0.000

It passes the test, so there is no distance to plot. 1 and 11 do the same.

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

PNO mistakesCommon mistakes.

Treating zero as a missing bar

0.000 means the close passed the test. A non-finite close is the empty bar.

Averaging the two primes on a tie

The rule picks the lower prime. 9 is not 0. It is 2.000.

Reading the line as a trade

A negative print only means the nearer prime is above the close. It is not a call to sell, and a positive print is not a call to buy.

PNO combinationsPair it with these.

PNO FAQQuestions traders ask.

What are the Prime Number Oscillator settings?

None. One white line, own panel, 3 decimals, from the close.

What is the worked series?

Closes 10, 9, 8.5, 67786, 4, 1, 11 print -1.000, 2.000, 0.000, 3.000, 1.000, 0.000, 0.000.

What happens on a tie?

The lower prime is used. 9 prints 2.000. 4 prints 1.000. 67786 prints 3.000, the distance down to 67783 rather than up to 67789.

Why is 8.5 zero?

A close that is not a whole number passes the prime test, so the distance is 0.000. The same is true of 1 and of 11.

What is an empty bar?

The close is not a finite number. Zero is a real print, not an empty bar.

Is this the Modulus oscillator?

The name matches their description. The numbers are this engine rule, including the tie break.

Does it repaint?

No. A closed close stays.

How does it relate to Prime Number Bands?

Bands step from the high and the low. This line is the close minus the nearer prime.

Related indicatorsMore support and resistance tools.

All support and resistance indicators

Try PNO on a live chart.
Free. No download.

Works in your browser and on iPhone too.

Example market1h
PNO