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).
| Name | Kind | Summary |
|---|---|---|
| Param | class | Base of every setting declaration. |
| ParamError | exception | A setting declaration, or a value given for one, is invalid. |
| describe_params | function | Every setting declared on ``cls`` and its bases, base settings first, in declaration order. |
| Bool | class | |
| Choice | class | |
| Color | class | Display only: a theme token (``theme.up``) or ``#rrggbb``. |
| Decimal | class | A number with a fixed count of decimal places (02 LANG-085). |
| Enum | class | A dropdown over a Python ``enum.Enum``; the default is one of its members. |
| Float | class | |
| Int | class | |
| MAX_CANDIDATES | constant | |
| MA_METHODS | constant | |
| MaMethod | class | A moving-average method dropdown (04 IND-044). |
| Price | class | A price level, draggable on the Studio chart. |
| Session | class | A time window like ``"07:00-10:00"``; several are comma separated. |
| Source | class | A price field (``close``, ``hl2``...) or another indicator's output. |
| Symbol | class | A symbol; ``None`` means the run's own symbol. |
| Text | class | Display only: a short text. |
| Time | class | A clock time like ``"16:55"``. |
| Timeframe | class | |
| Volume | class | Tick volume or real traded volume (04 IND-043). |