Skip to content

Testing Statistics

Testing Statistics

After the testing is over, different parameters of the trading results statistics are calculated. The values of the parameters can be obtained using the TesterStatistics() function, by specifying the parameter ID from the ENUM_STATISTICS enumeration.

Although two types of parameters (int and double) are used for calculating statistics, the function returns all values in the double form. All the statistic values of the double type are expressed in the deposit currency by default, unless otherwise specified.

ENUM_STATISTICS

IDDescription of a statistic parameterType
STAT_INITIAL_DEPOSITThe value of the initial depositdouble
STAT_PROFITNet profit after testing, the sum of STAT_GROSS_PROFIT and STAT_GROSS_LOSS (STAT_GROSS_LOSS is always less than or equal to zero)double
STAT_GROSS_PROFITTotal profit, the sum of all profitable (positive) trades. The value is greater than or equal to zerodouble
STAT_GROSS_LOSSTotal loss, the sum of all negative trades. The value is less than or equal to zerodouble
STAT_MAX_PROFITTRADEMaximum profit – the largest value of all profitable trades. The value is greater than or equal to zerodouble
STAT_MAX_LOSSTRADEMaximum loss – the lowest value of all losing trades. The value is less than or equal to zerodouble
STAT_CONPROFITMAXMaximum profit in a series of profitable trades. The value is greater than or equal to zerodouble
STAT_CONPROFITMAX_TRADESThe number of trades that have formed STAT_CONPROFITMAX (maximum profit in a series of profitable trades)int
STAT_MAX_CONWINSThe total profit of the longest series of profitable tradesdouble
STAT_MAX_CONPROFIT_TRADESThe number of trades in the longest series of profitable trades STAT_MAX_CONWINSint
STAT_CONLOSSMAXMaximum loss in a series of losing trades. The value is less than or equal to zerodouble
STAT_CONLOSSMAX_TRADESThe number of trades that have formed STAT_CONLOSSMAX (maximum loss in a series of losing trades)int
STAT_MAX_CONLOSSESThe total loss of the longest series of losing tradesdouble
STAT_MAX_CONLOSS_TRADESThe number of trades in the longest series of losing trades STAT_MAX_CONLOSSESint
STAT_BALANCEMINMinimum balance valuedouble
STAT_BALANCE_DDMaximum balance drawdown in monetary terms. In the process of trading, a balance may have numerous drawdowns; here the largest value is takendouble
STAT_BALANCEDD_PERCENTBalance drawdown as a percentage that was recorded at the moment of the maximum balance drawdown in monetary terms (STAT_BALANCE_DD).double
STAT_BALANCE_DDREL_PERCENTMaximum balance drawdown as a percentage. In the process of trading, a balance may have numerous drawdowns, for each of which the relative drawdown value in percents is calculated. The greatest value is returneddouble
STAT_BALANCE_DD_RELATIVEBalance drawdown in monetary terms that was recorded at the moment of the maximum balance drawdown as a percentage (STAT_BALANCE_DDREL_PERCENT).double
STAT_EQUITYMINMinimum equity valuedouble
STAT_EQUITY_DDMaximum equity drawdown in monetary terms. In the process of trading, numerous drawdowns may appear on the equity; here the largest value is takendouble
STAT_EQUITYDD_PERCENTDrawdown in percent that was recorded at the moment of the maximum equity drawdown in monetary terms (STAT_EQUITY_DD).double
STAT_EQUITY_DDREL_PERCENTMaximum equity drawdown as a percentage. In the process of trading, an equity may have numerous drawdowns, for each of which the relative drawdown value in percents is calculated. The greatest value is returneddouble
STAT_EQUITY_DD_RELATIVEEquity drawdown in monetary terms that was recorded at the moment of the maximum equity drawdown in percent (STAT_EQUITY_DDREL_PERCENT).double
STAT_EXPECTED_PAYOFFExpected payoffdouble
STAT_PROFIT_FACTORProfit factor, equal to the ratio of STAT_GROSS_PROFIT/STAT_GROSS_LOSS. If STAT_GROSS_LOSS=0, the profit factor is equal to DBL_MAXdouble
STAT_MIN_MARGINLEVELMinimum value of the margin leveldouble
STAT_CUSTOM_ONTESTERThe value of the calculated custom optimization criterion returned by the OnTester() functiondouble
STAT_TRADESThe number of tradesint
STAT_PROFIT_TRADESProfitable tradesint
STAT_LOSS_TRADESLosing tradesint
STAT_SHORT_TRADESShort tradesint
STAT_LONG_TRADESLong tradesint
STAT_PROFIT_SHORTTRADESProfitable short tradesint
STAT_PROFIT_LONGTRADESProfitable long tradesint
STAT_PROFITTRADES_AVGCONAverage length of a profitable series of tradesint
STAT_LOSSTRADES_AVGCONAverage length of a losing series of tradesint
Last updated on