DocsParameters

Parameter Groups

Use the group option to organize parameters into sections in the sidebar panel. This has no effect on execution — it is purely for display.

Usage

function define(ctx) { // Indicator group ctx.param('fastLength', { type: 'int', label: 'Fast EMA', default: 9, min: 5, max: 50, step: 5, optimize: true, group: 'Indicators', }); ctx.param('slowLength', { type: 'int', label: 'Slow EMA', default: 21, min: 10, max: 200, step: 10, optimize: true, group: 'Indicators', }); // Risk group ctx.param('stopMultiplier', { type: 'float', label: 'Stop ATR Mult', default: 2.0, min: 1.0, max: 5.0, step: 0.5, optimize: true, group: 'Risk Management', }); ctx.param('useTrailingStop', { type: 'boolean', label: 'Trailing Stop', default: false, group: 'Risk Management', }); }

Result in the UI

The Parameters panel groups them under collapsible headers:

  • Indicators — Fast EMA, Slow EMA
  • Risk Management — Stop ATR Mult, Trailing Stop

Tips

  • Parameters without a group appear under a default "General" section
  • Keep group names short — they display in a sidebar panel
  • Consistent naming across strategies helps when switching between them
groupsorganizationuidisplaygroup