Download MetaTrader 5

ENUM_STATISTICS - Requesting Short Profits Only

To add comments, please log in or register
Winsor Hoang
5051
Winsor Hoang  

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
10108
Rodrigo Malacarne  
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
5051
Winsor Hoang  
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
1991
graziani  
only way to get it automatically is to calculate it yourself in OnTester(), together with everything else you need.
Rodrigo Malacarne
Moderator
10108
Rodrigo Malacarne  
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
5051
Winsor Hoang  

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