The resource loading... loading...

Save Backtest Settings

In the strategy editing page, in the pagination of “Backtest” (namely the backtest system), you can set options like backtest configurations and strategy parameters to backtest the strategy. Backtest settings refer to backtest time range, exchange platform, slippoint and service fee etc.; while strategy parameters are used to set parameter options for strategies. When these parameters are set, you can follow the set backtesting strategy, then how to save the set configuration information?

    1. You can use the “Save Backtest Settings” button on the Strategy Editing Page to record all the backtest configuration information (including backtest settings and strategy parameter settings) in the strategy source code in the form of code.
    1. When you save a strategy by clicking the “Save Strategy” button on the strategy editing page, the platform will automatically record the current backtest settings, strategy parameter configurations, and other information. How to load backtest configuration into the backtest system?
    1. When refreshing the strategy editing page or reopening this strategy editing page, the backtest configuration information recorded by the “Save Backtest Settings” button will be automatically loaded first.
    1. If there is no backtest configuration information recorded in the current strategy code as a comment backtest (saved in the strategy code via the “Save Backtest Settings” button), the backtest system automatically configures the backtest settings to the backtest configuration information when the “Save Strategy” button was last clicked for the current strategy.
    1. If the backtest configuration information recorded in the form of comments at the beginning of the strategy code is modified on the strategy editing page, you need to synchronize the currently updated backtest configuration information to the strategy backtest interface option. You can click the “Backtest Settings” button above the backtest in the strategy editing area.
/*backtest
start: 2021-06-26 00:00:00
end: 2021-09-23 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"BTC_USDT"}]
*/
'''backtest
start: 2021-06-26 00:00:00
end: 2021-09-23 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"BTC_USDT"}]
'''
/*backtest
start: 2021-06-26 00:00:00
end: 2021-09-23 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"BTC_USDT"}]
*/

Click “Save backtest settings”, there are slight format differences on JavaScript/Python/C++/MyLanguage/PINE languages when saving backtest settings to the strategy code: MyLanguage:

(*backtest
start: 2021-06-26 00:00:00
end: 2021-09-23 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"BTC_USDT"}]
*)

PINE Language:

/*backtest
start: 2021-06-26 00:00:00
end: 2021-09-23 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"BTC_USDT"}]
*/
Backtesting System Parameter Optimization Custom Data Source