Welcome Features News Download Registration Support FAQ Wish list Links
Advanced stock charting and analysis program

A-Z Index | Category Index |

SETBACKTESTMODE
- Sets working mode of the backtester

Trading system toolbox
(AFL 3.0)


SYNTAX SetBacktestMode( mode )
RETURNS NOTHING
FUNCTION Sets working mode of the backtester. A 'mode' parameter is one of the following backtest modes:

Supported backtest modes:

  • backtestRegular - regular, signal-based backtest, redundant signals are removed as shown in this picture
  • backtestRegularRaw - signal-based backtest, redundant (raw) signals are NOT removed, only one position per symbol allowed
  • backtestRegularRawMulti - signal-based backtest, redundant (raw) signals are NOT removed, MULTIPLE positions per symbol will be open if BUY/SHORT signal is "true" for more than one bar and there are free funds, Sell/Cover exit all open positions on given symbol, Scale-In/Out work on all open positions of given symbol at once.
  • backtestRotational - rotational trading system see this.
EXAMPLE // default, as in 4.90, regular, signal-based backtest, redundant signals are removed
SetBacktestMode( backtestRegular );

// signal-based backtest, redundant (raw) signals are NOT removed, only one position per symbol allowed
SetBacktestMode( backtestRegularRaw );

// signal-based backtest, redundant (raw) signals are NOT removed,
// MULTIPLE positions per symbol will be open if BUY/SHORT signal is "true" for more than one bar and there are free funds
// Sell/Cover exit all open positions on given symbol, Scale-In/Out work on all open positions of given symbol at once.
SetBacktestMode( backtestRegularRawMulti );

// rotational trading mode - equivalent of EnableRotationalTrading() call
SetBacktestMode( backtestRotational );
SEE ALSO EnableRotationalTrading() function

References:

The SetBacktestMode function is used in the following formulas in AFL on-line library:


    Add your comment:

    (please do not ask questions here, if you have a question please send it to support e-mail address)

    Your name:
    Your e-mail:
    Comment:
     

    About | Privacy | Terms of Use | Contact information
    Copyright © 2003 AMIBROKER.COM