ProScreener/proscreener

STRINGFORMAT

STRINGFORMAT is a ProScreener display modifier that shows a value in a SCREENER results column exactly as stored, with no abbreviation or date conversion.

Syntax

probuilder
SCREENER(value AS "Column name" STRINGFORMAT)

How it works

Screener results tables apply automatic formatting to make numbers readable, which can shorten large values into forms like 20.2M. When the exact digits matter, that transformation destroys information. Placing STRINGFORMAT after the AS "Column name" clause suppresses all automatic conversion and prints the value verbatim.

This is the opt-out counterpart to the other three display modifiers. DATEFORMAT reinterprets the number as a calendar date, NUMBERFORMAT abbreviates its magnitude, and PERCENTFORMAT scales it by 100. STRINGFORMAT does none of these, which makes it the right choice for identifiers, encoded values such as raw YYYYMMDD dates that should stay numeric, or any figure that must survive export without rounding.

Despite the name, the modifier does not turn the value into text or enable string manipulation. ProScreener columns always carry numbers. The keyword only controls how the number is rendered in the results table.

Examples

Example 1, Displaying a raw value without conversion (ProScreener)

probuilder
// The value appears exactly as stored, digit for digit
number = 20221202
SCREENER(number AS "Raw Value" STRINGFORMAT)

The column shows 20221202 unchanged, where NUMBERFORMAT would have shortened it to 20.2M. This is the canonical example from the official reference.

Example 2, Keeping a date numeric (ProScreener)

probuilder
// Show the bar date as a plain YYYYMMDD number, not a formatted date
barDate = OpenDate
aboveMA = close > Average[50](close)
SCREENER[aboveMA](barDate AS "Raw date" STRINGFORMAT)

The opening date stays in machine-friendly YYYYMMDD form, which is convenient when results are exported and processed by other tools.

Example 3, Exact volume figures (ProScreener)

probuilder
// List active instruments with their full, unabbreviated volume
active = Volume > 1000000
SCREENER[active](Volume AS "Exact volume" STRINGFORMAT)

Each result shows the complete volume figure, for example 1483920 rather than the rounded 1.5M an abbreviated column would display.

Common errors and gotchas

  • Not a string type. The keyword does not create text values, concatenate labels, or format arbitrary strings. ProScreener has no string variables. STRINGFORMAT only means "display the number as is".
  • Wide columns. Full-precision large numbers take more horizontal space than abbreviated ones. Screens returning many columns of raw values become hard to read, so reserve the modifier for values where exact digits matter.
  • One format modifier per column. STRINGFORMAT cannot be combined with DATEFORMAT, NUMBERFORMAT, or PERCENTFORMAT on the same column. Pick the single modifier that matches the data.
  • ProScreener only. The keyword compiles nowhere else. Outside screeners, raw value display is the default behavior and needs no modifier.
  • DATEFORMAT, renders a YYYYMMDD number as a readable date in a screener column.
  • NUMBERFORMAT, abbreviates large numeric values in a screener column.
  • PERCENTFORMAT, renders a screener column value as a percentage.
  • SCREENER, defines the filter condition and result column of a screener.
  • Volume, the transaction volume recorded on a bar.
  • OpenDate, the opening date of a bar in YYYYMMDD form.
  • TIMEFRAME (PS), sets the timeframe used by subsequent screener code.