For the complete documentation index, see llms.txt. This page is also available as Markdown.

Order grid optimizer in the Backtester

The optimizer takes the set of parameters from the history and shows the past selection of options. This instruction applies to the cloud optimizer inside the Backtester. Selection doesn't create a warrant or launch a robot.

Prepare the original settings

If you haven't worked with a Backtester yet, start with the first calculation and read the model limitations. — first count — The limitations of the model

Open the Backtester and the grid optimizer tab. In this interface, it is accessible with VIP access.

VIP tools are included in the PRO when you buy a one-year subscription. For more information on the terms see the article Free, PRO and VIP.

Choose an exchange, one instrument, a direction and a period. Check the deposit, leverage, margin, commission and indicator terms. These settings are used when selecting along with the optimizer ranges.

One cloud launch takes only one instrument. If you've used multi-mode before, remove the extra marks from the list: the selected tools have priority over the single selection field.

Connect your own Modal account

The cloud computing uses the computations in your Modal account. Open the Modal keys, go to How to get the Modal keys? and move your own Token ID and Token Secret to the relevant fields. These are the keys to the computing service, not the API keys to the exchange.

The entered keys are stored in this browser. Cleaner removes them from form and local storage; the token itself is retrieved in Modal. Do not include key values in screenshots or support messages.

Cloud computing costs are your Modal account. Check the current terms of payment for Modal before you launch. — Payment terms of Modal Value Value in the optimizer result estimate of computational time, not final account.

Set the range of the switch

Turn on switches only for the parameters you want to change: grid step and dynamic step, number of insurance orders, marting, first order, take-profit or stop.

For the included parameter, fill in the Minimum value, Maximum value and Range Step. The last field specifies the distance between the parameters being checked. It's different from a trade-off between orders.

The deactivated parameter remains fixed: its current value is taken from the main form. The first order is set by the volume in the currency of the quotation, the net step and exit in percentages, the dynamic step and the martinggeal multipliers, the number of CO as a whole number.

The number of combinations is shown under the ranges. It's equal to multiplying the number of values by the included transition directions. A smaller step increases the workload; exceeding the available limits may stop the start even before the calculation.

A demonstration example of the optimizer range BacktesterThe values are used to explain the form of the transition.
A demonstration example of the optimizer range BacktesterThe values are used to explain the form of the transition.

Account for the fixed break-even stop

When BE is enabled in the main Bybit form, the optimizer applies one trigger/level pair to every variation and does not optimize it. The line below the variation count shows the fixed pair. Apply best restores the pair used by that run.

A BE closure increases the total trade count but may be absent from the optimizer's current closure-reason breakdown. The displayed reasons can therefore sum to less than total trades. See Break-even stop for the full behavior.

Set the selection and walk-forward

If necessary, limit the price drop, the deposit drop, the maximum time of the trade in hours and the minimum number of trades. You can set the width of the net in percentages and the maximum amount of deposit required for the entire order ladder, including the leverage. The blank field disables the appropriate user filter.

In addition to your filters, the optimizer throws out options with a miscalculation, liquidation, or no transactions. If the list is empty, see what stage the options were excluded at. This is not an automatic reason to relax the limitation: check the entry data and the reasons for the exclusion first.

One segment is the calculation of the entire period. For several segments of Walk-Forward, the selected history is divided into sections; an additional calculation of the full period is performed. Variants are ranked by the average segment profit, and the limitations on drawdown and duration are checked for the worst segment values.

This kind of analysis uses the history you've chosen. It is not a test for future data and does not guarantee the sustainability of the strategy after launch.

Run the selection and read the result

Click Start Grid Optimize and follow the status. Uploading history and preparing calculations are part of the waiting; GPU running time is only part of it. For the termination, use Cancel. After the connection is lost, check the current startup status first so you don't send a second calculation.

Compare The data period with the dates you requested, the number of combinations and the number of filters you've passed. The dates shown do not guarantee that there are no passes within the history.

The service returns up to 30 options. For one segment they are selected by full-time profit, for Walk-Forward by average profit of segments. So the first line in Walk-Forward doesn't have to have the maximum profit of the full period in the table. The column sort changes the order of the lines already obtained.

Compare the parameters, number of trades, share of profitable trades, drop-offs and duration. Best variation means first place among tested combinations by the selected selection regime, not a recommendation for trading.

A demonstration example of optimization results in Backtester. Comparing options requires checking the period, the constraints and the initial strategy.
A demonstration example of optimization results in Backtester. Comparing options requires checking the period, the constraints and the initial strategy.

Move the selected settings

Click Apply in the correct line. The grid values and the available values of the first order, the taek-profit and the stop are set to the basic Backtester form. Check the exchange, the instrument, the dates and the indicators separately: this button does not replace all the original settings.

Then run a regular backtest to sort out the trades and get a separate result in the archive. The use of parameters alone does not trigger calculations or trades. The last result of the optimizer is stored in the browser; it is not a record of a regular back-text archive.

The result depends on historical data and model assumptions. The commission introduced does not confirm the exchange rate; funding, actual orders and slipping are not reproduced. Increasing the number of combinations tested does not guarantee a result in real trading.