When signals are used to perform a backtest, the Backtesting System™ is able to return the Sensitivity setting that maximized a user specified statistic such as net profit, winrate, profit factor, or maximum drawdown.

Certain settings will disable the optimization procedure, such as disabling the backtesting window or using autopilot.


Users can choose to optimize net profit, winrate, profit factor, potential ratio (φ)(\varphi) or maximum drawdown depending on the options selected from the Optimize drop-down menu within the OPTIMIZER settings section.

  • Net Profit

  • Winrate

  • Profit Factor

  • Maximum Drawdown

  • Potential Ratio (φ)

The overall profit or loss achieved (higher is better).

Optimization can be performed on any given range for the Sensitivity setting.

Optimizing the Sensitivity setting using a large range of values and/or using a large backtest window can increase computation time, potentially returning time-out errors.

Results from the optimizer can vary from the backtest results returned by the strategy, this is due to the difference between how the Tradingview backtesting engine opens positions compared to the internal engine used to perform optimization within the script. Using different signal algorithms for long/short entry rules can return very different results from the optimizer compared to backtesting results.

Take profits and/or stop losses orders are taken into account by the internal engine if these are enabled, however, there can still exist a great degree of disparity between results from the backtest and results returned by the optimizer.

Warmup Period

The warmup period allows the script to compute the signal algorithms n bars prior to the backtesting window, where n is the selected warmup period. This allows to backtest signals that are closer to the ones returned by the Signals & Overlays™ toolkit, returning more accurate optimized settings as a result.

Optimization Dashboard

Users can see the backtests results for sensitivity values within the specified optimization range on a dashboard shown on the top-right of their chart. This dashboard presents results in descending order, with results associated to the best optimized statistic appearing on top.


Users that do not wish to have a large dashboard on the chart can use the Simple optimization dashboard. This dashboard will only return the Sensitivity setting that optimize the selected statistic alongside the statistic of interest.


Users can control the location as well as hide the optimization dashboard on the chart from the DISPLAY settings section.

A dashboard location set to None will hide it from the chart as well as disable the optimizer.