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.
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
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 |
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi there,
Currently we have the following ENUM STATISTICS:
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_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.