MarvelChart en Help

Backtest

Backtest

The Backtest function on the Chart can be activated via the relative button on the order command bar, located in the top right corner of the document.

By activating the function, the Backtest command bar will appear at the bottom of the Chart, composed of the following buttons:

  1. Choice of the Trading System, related parameters and optimization;

  2. Setting the quantity or countervalue to be used in the Backtest;

  3. Backtest execution with optimization if activated. If a Backtest has already been executed, the previous results are reset before starting a new execution;

  4. Performance Report of the last Backtest executed;

  5. Resetting of the last Backtest executed. Removes from the Chart all the markers of the orders generated by the Backtest and any indicators added automatically, resets the results of the Performance Report;

  6. Copies the settings of the Trading System and the quantity or countervalue in the Auto-Trade function, hides the Backtest function commands and displays the Auto-Trade function command bar.

After executing the Backtest, the markers that highlight the executed orders will appear on the Chart.

Trading System Selection, Parameters and Optimization

Backtest Signal

The trading system selection and parameter setting window allows you to customize the trading system operation for use in the Backtest. The window is composed of the following elements:

  1. Signal - Drop-down box through which you can choose the trading system to use in the Backtest. The trading systems are listed through a tree view and are grouped by category;

  2. Optimization - On/Off button, activates or deactivates the Backtest optimization parameter setting. It is possible to optimize any numeric parameter. When optimization is active, three additional columns are displayed in the parameters table 3: From, To and Step;

  3. Parameters Table - Shows a list of the trading system Input parameters. The available columns are:

  • Name - Name of the Input parameter;

  • Value - Value of the parameter;

  • From - Minimum value to use in the Inputs optimization;

  • To - Maximum value to use in the Inputs optimization;

  • Step - Inputs optimization interval;

  1. Preview of the combinations for optimization - If the optimization is active, under the parameter table 3 the number of Inputs combinations that have been configured and an estimate of how much time will be needed to complete the optimization of the trading system are shown;

  2. Show Code - Shows the source code of the trading system currently selected in the 1 Signal drop-down box. If not already installed on the PC, MarvelChart suggests installing the Microsoft Visual Studio development environment. However, it is possible to view the source code in any text editor;

  3. OK - Confirms the current settings and closes the window;

  4. Cancel - Cancels the current settings and closes the window.

Setting the quantity or countervalue

Backtest Quantity/Amount

The window for setting the quantity or countervalue to be applied to the Backtest consists of the following elements:

  1. Drop-down box in which to choose the quantity calculation method. The available alternatives are:

  • Amount - Fixed countervalue for all trades, the quantity of contracts/shares to buy or sell is calculated based on the price;

  • Fixed Quantity - Fixed quantity, the same for all trades;

  1. Quantity - If the Fixed Quantity value was chosen in the drop-down box 1, this field indicates the number of contracts/shares to buy or sell for each trade executed by the Backtest;

  2. Countervalue - If the Amount value has been chosen in the 1 drop-down box, this field indicates the countervalue for each trade executed by the Backtest. The quantity of contracts/shares to buy or sell is calculated based on the price.

Backtest order markers on the Chart

Backtest Results

After running the Backtest, the markers that highlight the executed orders will appear on the Chart. To see the characteristics of the orders signaled by the 1 markers, activate the Cross-Hair function and position the mouse cursor over the relevant marker. The order characteristics include:

  • Progressive number of the trade;

  • Direction of the order;

  • Quantity;

  • Name of the asset;

  • Possible Limit or Stop entry price;

  • Order type, Market, Limit or Stop;

  • Order Description.

Last modified: 13 December 2024