There is no certainty that a user can speed up this process in a general way. Obviously, the overhead is spent on calculating the hash function.
One variant of such an indicator hash function in a general form was posted here
Disadvantages:
Your variant relies on referring to the chart for the handshake, right? Have you tried running the EA in the tester ? Will it work ? How much slower ?
The function shown in the code will also rape the terminal on every tick - requesting the handle of an already created indicator is no better than just throwing a call in the style of "this indicator is needed - look for its handle and create a new instance if you don't have it yet".
Your variant is laying on appealing for hend to the chart, right ? Have you tried running the EA in a tester ? Will it work ? How much slower ?
The function shown in the code will also rape the terminal on every tick - requesting the handle of an already created indicator is no better than just throwing a call in the style of "this indicator is needed - look for its handle and create a new instance if it doesn't exist yet".
Yes, this is a frontal method, which fully justified itself, since it was required accuracy and did not need any performance at all. The task was to close the interfering cleverness of MT5.
There didn't care about performance, but it was clear that an array of MqlParam values must be fed to the input of any hash function. And this can't work fast taking into account the fact that there is a slow string-field.
Therefore, writing a universal indicator fast hash function much faster than what is built into MT5 is an open task. But I am categorically against calling indicators from somewhere. That's why I don't even want to study the question.
There is no resonance to make your hash function in OOP wrapper, since this function is already implemented behind the scenes of MT5 and works fast.
Which suggests that it is already difficult to catch up with the system hash function at the user level, and it will be almost impossible to overtake it by a meaningful amount.
I see no sense in inventing something in this case
Bars and indicators in the form of drawings on the screen I bring. But in EAs it's almost absurd.
People test EAs on real ticks, while for some reason they are oriented not on ticks, but on bars. And it would be fine if bars were built for each type of price (bid, ask, flipper), but this is not the case.
There is some kind of masochism when people voluntarily switch to historical data with a terrible loss of information. And on this fragment they try to cook up something, including the use of machine learning methods.
Now the only use of indicators is a spy-mode in a tester. But as soon as there are services with
voidOnTick( conststring &Symb );
indicators for Expert Advisors will lose any relevance.
In single symbol mode "spy" works 2.5 times slower than pure OnTick. I.e. the empty indicator (built on PERIOD_W1 to keep bar history to a minimum) has a huge overhead in the Tester!
I don't see any sense in inventing something in this case
Now the only usefulness of indicators is a spy-mode in the tester. But as soon as services with
So indicators for Expert Advisors will lose any relevance.
I read it, but decided to just explicitly state the problems with your approach. Because it was you who started accusing Vladimir of lack of caching, etc.
The claims to Vladimir were precisely about the "inefficiency" of the presented approach. Your variant does not solve this problem.
I read it, but decided to just explicitly state the problems with your approach. Because it was you who started accusing Vladimir of lack of caching, etc.
Claims to Vladimir were precisely about the "inefficiency" of the presented approach. Your variant does not solve this problem.
Standard indicators (they are the only ones discussed in the article) are cached in an elementary way! Because all input parameters are known.
It is difficult to write a universal hash function. But it is not required in the article. It deals with the simplest case. And even for it there is no hash function.
3.3 Let's compare the execution speed of MACD based Expert Advisors
The comparison will involve:
"MACD Sample.mq5" - Expert Advisor from the standard delivery with correct access to indicators
"MACD Sample One value at a time.mq5" - analogue of "MACD Sample.mq5", in which we get one value from the indicators at a time.
"MACD Sample 4 to 5 MQL4 style.mq5" - MQL4 Expert Advisor rewritten to MQL5 with minimal modifications and with access to indicators in MQL4 style.
Testing was conducted on USDJPY,M30 from 2017.02.01 to 2018.01.16 on MetaQuotes-Demo server. After each test (be it changing the Expert Advisor or changing the tick generation mode) the terminal was rebooted. Computer configuration:
I added the Profit column , the time of the tests was taken off the second pass just in case. Yellow highlights (formatting) left as in the article, because I copied the table, I just did not want to make a new one.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
So your agents (where there is a 21 second test) would be banned?
If I answer YES, will you start asking about the criteria for banning? Let's stop there, OK?
There is no certainty that a user can speed up this process in a general way. Obviously, the overhead is spent on calculating the hash function.
One variant of such an indicator hash function in a general form was posted here
Disadvantages:
Disadvantages:
You have not read
Forum on trading, automated trading systems and testing trading strategies.
Discussion of the article "LifeHack for trader: cooking fast food from indicators"
fxsaber, 2018.01.26 09:22 pm.
Yes, this is a frontal method, which fully justified itself, since it was required accuracy and did not need any performance at all. The task was to close the interfering cleverness of MT5.
And others, of course, did not try, because...
Forum on trading, automated trading systems and testing trading strategies
Discussion of the article "LifeHack for trader: cooking fast food from indicators"
fxsaber, 2018.01.26 09:02 pm.
There didn't care about performance, but it was clear that an array of MqlParam values must be fed to the input of any hash function. And this can't work fast taking into account the fact that there is a slow string-field.
Therefore, writing a universal indicator fast hash function much faster than what is built into MT5 is an open task. But I am categorically against calling indicators from somewhere. That's why I don't even want to study the question.
And I almost agree with Vasily's hypothesis.
Forum on trading, automated trading systems and testing trading strategies.
Discussion of the article "LifeHack for trader: cooking fast food from indicators".
Vasiliy Sokolov, 2018.01.26 09:14
There is no resonance to make your hash function in OOP wrapper, since this function is already implemented behind the scenes of MT5 and works fast.
Which suggests that it is already difficult to catch up with the system hash function at the user level, and it will be almost impossible to overtake it by a meaningful amount.
I see no sense in inventing something in this case
Forum on trading, automated trading systems and testing trading strategies.
Discussion of the article "LifeHack for trader: cooking fast food from indicators"
fxsaber, 2018.01.26 09:27 pm.
Bars and indicators in the form of drawings on the screen I bring. But in EAs it's almost absurd.
People test EAs on real ticks, while for some reason they are oriented not on ticks, but on bars. And it would be fine if bars were built for each type of price (bid, ask, flipper), but this is not the case.
There is some kind of masochism when people voluntarily switch to historical data with a terrible loss of information. And on this fragment they try to cook up something, including the use of machine learning methods.
Now the only use of indicators is a spy-mode in a tester. But as soon as there are services with
indicators for Expert Advisors will lose any relevance.Forum on trading, automated trading systems and testing of trading strategies
Analysis of test and optimisation results in MetaTrader 5 strategy tester
fxsaber, 2018.01.28 12:25 pm.
Indicators are Evil!
You didn't read it
And I almost agree with Vasily's hypothesis
I don't see any sense in inventing something in this case
Now the only usefulness of indicators is a spy-mode in the tester. But as soon as services with
So indicators for Expert Advisors will lose any relevance.I read it, but decided to just explicitly state the problems with your approach. Because it was you who started accusing Vladimir of lack of caching, etc.
The claims to Vladimir were precisely about the "inefficiency" of the presented approach. Your variant does not solve this problem.
I read it, but decided to just explicitly state the problems with your approach. Because it was you who started accusing Vladimir of lack of caching, etc.
Claims to Vladimir were precisely about the "inefficiency" of the presented approach. Your variant does not solve this problem.
Standard indicators (they are the only ones discussed in the article) are cached in an elementary way! Because all input parameters are known.
It is difficult to write a universal hash function. But it is not required in the article. It deals with the simplest case. And even for it there is no hash function.
3.3 Let's compare the execution speed of MACD based Expert Advisors
The comparison will involve:
Testing was conducted on USDJPY,M30 from 2017.02.01 to 2018.01.16 on MetaQuotes-Demo server. After each test (be it changing the Expert Advisor or changing the tick generation mode) the terminal was rebooted. Computer configuration:
I added the Profit column , the time of the tests was taken off the second pass just in case. Yellow highlights (formatting) left as in the article, because I copied the table, I just did not want to make a new one.
Confirmed that the profit is different for the third EA. I have not found out the reason.
I found a possible reason for the net profit mismatch - the Expert Advisor "MACD Sample 4 to 5 MQL4 style.mq5" has errors in stop modification.
Since the code was taken from the MQL4 version, it is possible that this is a legacy error.
I found a possible reason for the net profit mismatch - the Expert Advisor "MACD Sample 4 to 5 MQL4 style.mq5" has errors in stop modification.
Since the code was taken from the MQL4 version, it is possible that this is a legacy error.
This is not the problem - this error occurs when the new StopLoss level does not differ from the current one
My results according to the article
Confirmed that the profit is different for the third EA. I did not find out the reason.