Home/Optimization

Optimization

Compare Pine Script strategy inputs in one request.

Compare up to 30 Pine Script input configurations and rank completed variants by return, Profit Factor, or drawdown-aware objectives.

What an optimization request does

Submit up to 30 input configurations for one compatible strategy. Each completed variant is one independent backtest run, using the resolved dataset and execution context recorded for that job.

Ranking objectives

Profit Factor

Ranks variants by gross profit relative to gross loss.

Net PnL %

Ranks variants by net percentage profit for the tested period.

Net PnL minus drawdown

Penalizes return by the magnitude of maximum drawdown.

Return over drawdown

Compares the achieved return with the drawdown taken to achieve it.

Run usage and job states

Maximum variants30 input configurations per optimization request
Run accountingEach submitted variant counts as one backtest run
AvailabilitySubject to the account's available run credits
Job statesQueued, running, succeeded, or failed

Use a separate validation period

Optimization finds the best result among the variants and period you tested. It does not prove that those settings will remain profitable. Select candidates on one period, then evaluate them on a separate period that was not used for ranking.

Run the workflow

Test the script with its assumptions attached.

Bring the Pine Script, market, timeframe, costs, and date range into one GPT conversation.

Open PineScript API