forge.param

Forge API 1

Setting declarations shared by strategies and indicators (contract C2 section 1).

``fast = param.Int(20, min=5, max=60, step=5, group="Trend")`` in a strategy and ``period = param.Int(14, min=2, max=200)`` in an indicator are the same declaration: one language, one way to declare a setting (C2 decision 1; 02 LANG-085 to LANG-094, 04 IND-040 to IND-048). The Studio form, the sweep grid, the docs and the Strategy Spec's ``params`` list all read it.

Written by the pre-session (2026-09-29) and frozen. These are declarations only: binding a value to a strategy or indicator instance belongs to its base class (lanes 5 and 6), and building a sweep from the candidates belongs to the Tester (lane 5, SL3).

NameKindSummary
ParamclassBase of every setting declaration.
ParamErrorexceptionA setting declaration, or a value given for one, is invalid.
describe_paramsfunctionEvery setting declared on ``cls`` and its bases, base settings first, in declaration order.
Boolclass
Choiceclass
ColorclassDisplay only: a theme token (``theme.up``) or ``#rrggbb``.
DecimalclassA number with a fixed count of decimal places (02 LANG-085).
EnumclassA dropdown over a Python ``enum.Enum``; the default is one of its members.
Floatclass
Intclass
MAX_CANDIDATESconstant
MA_METHODSconstant
MaMethodclassA moving-average method dropdown (04 IND-044).
PriceclassA price level, draggable on the Studio chart.
SessionclassA time window like ``"07:00-10:00"``; several are comma separated.
SourceclassA price field (``close``, ``hl2``...) or another indicator's output.
SymbolclassA symbol; ``None`` means the run's own symbol.
TextclassDisplay only: a short text.
TimeclassA clock time like ``"16:55"``.
Timeframeclass
VolumeclassTick volume or real traded volume (04 IND-043).