
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
2 issue.
Print(SingleTesterCache.Summary.ToString()) command;
I tested it in other Expert Advisors etc. and it gives out some wrong statistics.
variant 1
option 2
2 problem.
Forum on trading, automated trading systems and testing trading strategies
Errors, bugs, questions
Renat Fatkhullin, 2021.01.01 00:14
Perhaps I assume that it does not work because of the reason of incorrect code transfer from the script to the Expert Advisor.
I will send you an example.
Procedure.
1. Any Expert Advisor is taken - I have tested repeatedly on the standard Movin' Averag.
2. I put inclusions at the top:
3. In OnDeinit I insert this from the 2nd script from here: https://www.mql5.com/ru/code/27611:
3.2 I tried the same "sort of" in this form
Perhaps I assume that it does not work because of the reason of incorrect code transfer from the script to the Expert Advisor.
I will send an example now.
It would be better with ready files. I don't understand what you need to get.
I'd rather have the files ready to go. And I don't understand what you need to get.
Yes, I wanted to get the statistics of the last single run and write it to a file, for example, as you wrote here in the multitester topic. https://www.mql5.com/ru/forum/318305/page23#comment_19934192.
To do without inserting code in OnDeinit EA everywhere.
In fact, not even all statistics are needed, but a few parameters. For example, MQLInfoString(MQL_PROGRAM_NAME),TesterStatistics(STAT_SHARPE_RATIO).
Yes, I wanted to pull out the statistics of the last single run and write it to a file, for example, as you wrote here in the multitester topic. https://www.mql5.com/ru/forum/318305/page23#comment_19934192
To avoid inserting code in OnDeinit EA everywhere.
In fact, not even all statistics are needed, but a few parameters. For example, MQLInfoString(MQL_PROGRAM_NAME),TesterStatistics(STAT_SHARPE_RATIO).
Probably, you can try to run examples from the delivery or discussions.
I guess you could try running the examples from the delivery or discussions.
I haven't found such functionality or something similar to record pass statistics in csv file yet. Hmm, even in libraries I have not found suitable functions. I will look for more.
I see such a block, but how to call the necessary information from it I did not understand
string ToString( void ) const
{
return(this.Header.expert_path[] + "\n; " +
this.Header.symbol[] + "\n; " +
::TimeToString(this.Header.date_from, TIME_DATE) + " - " + ::TimeToString(this.Header.date_to, TIME_DATE) + "\n; " +
::DoubleToString(this.Summary.TesterStatistics(STAT_PROFIT), 0) + ", " + " +
::DoubleToString(this.Summary.TesterStatistics(STAT_TRADES), 0) + ", " + ::DoubleToString(this.Summary.TesterStatistics(STAT_TRADES), 0) + ", " +
::DoubleToString(this.Summary.TesterStatistics(STAT_PROFIT_FACTOR), 2) + ", " + ::DoubleToString(this.Summary.TesterStatistics(STAT_PROFIT_FACTOR), 2) + ", " +
::DoubleToString(this.Summary.TesterStatistics(STAT_EXPECTED_PAYOFF), 2) + ", -" + ::DoubleToString(this.Summary.TesterStatistics(STAT_EXPECTED_PAYOFF), 2) + ", -" +
::DoubleToString(this.Summary.TesterStatistics(STAT_EQUITY_DD), 2));
}
I see such a block, but I don't understand how to call the required information from it
Every time I look at my code as if it were someone else's, I just don't remember it at all.
That's why I can't give you a hint.
Every time I look at my code as if it were someone else's - I stupidly don't remember it at all.
That's why I can't tell you.
I see, so the more you study, the more you understand. It's just that as I understand, not all functionality can be included in the current version of the library, that is, something may be missing to fulfil the task. The main thing is to understand whether it is possible or not)
The main thing is to understand whether it's possible or not)
https://www.mql5.com/ru/code/viewcode/27611/229701/exptradesummarysingle.mqh