Download MetaTrader 5
To add comments, please log in or register
Follow the news. View our company's official channel!
Winsor Hoang
4752
Winsor Hoang 2014.08.29 02:20 

Hi there,

 

Currently we have the following ENUM STATISTICS:

 

 STAT_PROFIT Net profit after testing double

STAT_SHORT_TRADES

# of Short trades

int

STAT_LONG_TRADES

# of Long trades

int

STAT_PROFIT_SHORTTRADES

# of Profitable short trades

int

STAT_PROFIT_LONGTRADES

# of Profitable long trades

int

 

 

I am looking for  

 STAT_PROFIT_LONGONLY Net LONG PROFIT ONLY after testing double

STAT_PROFIT_SHORTONLY

Net SHORT PROFIT ONLY after testing

double

 

Please let me know if this is possible or that if I can create or edit the current class of ENUM_STATISTICS. Many thanks in advance.


Rodrigo Malacarne
Moderator
9746
Rodrigo Malacarne 2014.08.30 14:34  
waterhorse:

Hi there,

I am looking for  

 STAT_PROFIT_LONGONLY Net LONG PROFIT ONLY after testing double

STAT_PROFIT_SHORTONLY

Net SHORT PROFIT ONLY after testing

double

Please let me know if this is possible or that if I can create or edit the current class of ENUM_STATISTICS. Many thanks in advance.

Did you try to use STAT_PROFIT_LONGTRADES and STAT_PROFIT_SHORTTRADES ? Isn't it what you need?
Winsor Hoang
4752
Winsor Hoang 2014.09.03 19:56  
Malacarne:
Did you try to use STAT_PROFIT_LONGTRADES and STAT_PROFIT_SHORTTRADES ? Isn't it what you need?

See attached picture. 

STAT_PROFIT_LONGTRADES and STAT_PROFIT_SHORTTRADES will only give 501 and 459.

I am looking for the buy profit and sell profit components that make up the STAT_Profit. 

 

 

Backtesting results 

graziani
1909
graziani 2014.09.03 20:36  
only way to get it automatically is to calculate it yourself in OnTester(), together with everything else you need.
Rodrigo Malacarne
Moderator
9746
Rodrigo Malacarne 2014.09.04 03:29  
waterhorse:

See attached picture. 

STAT_PROFIT_LONGTRADES and STAT_PROFIT_SHORTTRADES will only give 501 and 459.

I am looking for the buy profit and sell profit components that make up the STAT_Profit. 

Well, as graziani wrote, it is possible to get these figures, however you have to use the OnTester event handler to obtain this information directly from the terminal.

Regards,
Malacarne 

Winsor Hoang
4752
Winsor Hoang 2014.09.04 20:46  

Thanks Graziani & Malacarne for replying to my question. Let's assume that it is possible to get these figures using OnTester event handler. Would this create any other obstacles on the MT5 custom optimization i.e. multicores backtesting?

 Please note that my request to add these two features is based on this article Creating Custom Criteria of Optimization of Expert Advisors

 It seems that the below two commands should be part of the standard components for ENUM STATISTICS. This will make MQL5 a more power language. 

 

 STAT_PROFIT_LONGONLY Net LONG PROFIT ONLY after testing double

STAT_PROFIT_SHORTONLY

Net SHORT PROFIT ONLY after testing

double

/
To add comments, please log in or register