ProScreener/proscreener

NUMBERFORMAT

NUMBERFORMAT is a ProScreener display modifier that abbreviates large numeric values in SCREENER results columns, showing 20221202 as 20.2M for example.

Syntax

probuilder
SCREENER(value AS "Column name" NUMBERFORMAT)

How it works

Screener columns that carry volume, traded value, or other large numbers quickly become hard to compare when every cell is eight or nine digits long. Placing NUMBERFORMAT after the AS "Column name" clause tells the results table to shorten the value using standard magnitude suffixes, so millions display with an M suffix and thousands with a K suffix, keeping roughly three significant digits.

The modifier affects presentation only. The full-precision value remains behind the column, so sorting the results still orders by the exact number rather than by the rounded display text.

NUMBERFORMAT is one of four display modifiers that can follow a column definition, alongside DATEFORMAT, PERCENTFORMAT, and STRINGFORMAT. Exactly one modifier can be applied per column, and the choice is purely about how the number should read in the results table.

Examples

Example 1, Abbreviating a large fixed number (ProScreener)

probuilder
// A large numeric value, displayed in shortened form
number = 20221202
SCREENER(number AS "Formatted Number" NUMBERFORMAT)

The column shows 20.2M instead of the raw 20221202. This is the canonical example from the official reference.

Example 2, Readable average volume column (ProScreener)

probuilder
// Liquidity filter with an abbreviated average volume column
avgVol = Average[20](Volume)
liquid = avgVol > 500000
SCREENER[liquid](avgVol AS "Avg volume" NUMBERFORMAT)

Instruments trading more than 500,000 units on average over 20 bars are listed with their average volume shown as a compact figure such as 1.2M.

Example 3, Approximate turnover in currency units (ProScreener)

probuilder
// Traded value approximated as price times volume
turnover = close * Volume
SCREENER[turnover > 10000000](turnover AS "Turnover" NUMBERFORMAT)

Multiplying price by volume gives a rough traded-value figure. The abbreviation keeps a column of nine-digit numbers scannable at a glance.

Common errors and gotchas

  • Precision is lost in the display. The abbreviation rounds to about three significant digits, so 20221202 and 20240101 both display as 20.2M. When exact values matter, use STRINGFORMAT instead, or omit the modifier.
  • One format modifier per column. NUMBERFORMAT cannot be combined with DATEFORMAT, PERCENTFORMAT, or STRINGFORMAT on the same column. Pick the single modifier that matches the data.
  • Not a percentage or date converter. The modifier only shortens magnitude. A ratio like 0.05 stays 0.05, it does not become 5%, and a date number becomes 20.2M rather than a calendar date. Use PERCENTFORMAT or DATEFORMAT for those cases.
  • ProScreener only. The keyword compiles nowhere else. Indicators control number display through their own settings, not through screener modifiers.
  • DATEFORMAT, renders a YYYYMMDD number as a readable date in a screener column.
  • PERCENTFORMAT, renders a screener column value as a percentage.
  • STRINGFORMAT, shows a screener column value exactly as stored.
  • SCREENER, defines the filter condition and result column of a screener.
  • EstimatedVolume, projected final volume of the current bar in ProScreener.
  • Volume, the transaction volume recorded on a bar.
  • TIMEFRAME (PS), sets the timeframe used by subsequent screener code.