Discussion of article "MQL5 Cookbook - Creating a ring buffer for fast calculation of indicators in a sliding window" - page 2
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
I understood your point perfectly well the first time.
What is a "value change signature"? It is some value that changes in dynamics. Therefore, it is an indicator. It is not necessary to develop a ring buffer for this purpose, but it is enough to create an algorithm for calculating the very "character of change" you are talking about on the basis of several of these ring indicators.
Signature is not a value. Signature is the character of change of a value.
It is not important to display it on a chart or make an indicator out of it. It is important that the programme can see the character of value change in the current period. It is important to build a mechanism for extracting this signature from the data array, which is the ring buffer.
This mechanism is the most complicated thing. You will understand it if you try to create it.
If you simply plot a curve on a graph, our brain sees the signature of the value change itself. It's adapted to do that.
But try to make a programme see it.
To add:
At the moment, trading algorithms work only with specific values of market environment parameters. They do not see the "behaviour" of the observed parameters in different time scales.
Expert Advisors cannot extract meaningful concentrate from the history of changes in values recorded in data arrays (ring buffers, for example).
Ring buffers allow to "observe" changes in values in the current period, but without extracting the characters of changes, their use is ineffective.
The presence of a mechanism for synthesising signatures will bring trading Expert Advisors to a new level. The user will be able to set the nature of changes in market parameters within the trading conditions of his programme.
The level and quality of such a programme will be a head above what we are doing now.
Interesting article.
When I calculate an indicator in MT4 by the last 50 bars, for example, in the tester such indicator works much faster than when calculating by all bars.
I have the impression that in MT5 this approach(calculation of the indicator by the last n-bars) is not much faster. Who knows on this subject, is it so or am I doing something wrong?
Interesting article.
When I calculate an indicator in MT4 by the last 50 bars, for example, in the tester such indicator works much faster than when calculating by all bars.
I have the impression that in MT5 this approach(calculation of the indicator by the last n-bars) is not much faster. Who knows on this subject, is it so or am I doing something wrong?
I don't quite understand about the calculation. Any indicator requires n periods for its calculation. If n=50, then you calculate it on the last 50 bars. And what is the calculation on all bars?
Calculation on the last n-bars is the calculation on 50 bars, and the calculation on all bars is the calculation on all available history in the terminal(Bars-Period_). In MT4 I use such a construction:
The indicator is called in the Expert Advisor, not on every bar, but when several conditions are triggered(the indicator call is in the body of several conditional operators).
In MT5, the speed of optimisation with this approach does not decrease much.
Interesting article.
When I calculate an indicator in MT4 by the last 50 bars, for example, in the tester such indicator works much faster than when calculating by all bars.
I have the impression that in MT5 this approach(calculation of the indicator by the last n-bars) is not much faster. Who knows on this subject, is it so or am I doing something wrong?
The only difference is the speed of the initial calculation for 1000 bars, which is prepared by the tester. Then any economically written indicator will work equally fast, both in MT4 and MT5.
Only the speed of the initial calculation for 1000 bars prepared by the tester differs. Then any economically written indicator will work equally fast, both in MT4 and MT5.
to use twists with programming constructs which they think can speed up the code.
In MT4 with the help of this twist, optimisation is many times faster and it doesn't seem to me, I can see it. It is quite possible that I am doing something wrong in MT5.
Maybe it's not the indicator at all, but the EA.
In MT4 with the help of this twist, the optimisation is many times faster and I don't think so, I can see it. It is quite possible that I am doing something wrong in MT5.
Maybe it's not the indicator at all, but the EA.
The calculation on the last n-bars is the calculation on 50 bars, and the calculation on all bars is the calculation on all available history in the terminal(Bars-Period_). In MT4 I use such a construction:
The indicator is called in the Expert Advisor, not on every bar, but when several conditions are triggered(the indicator call is in the body of several conditional operators).
In MT5, the speed of optimisation with this approach does not decrease much.
Calculating only the last indicator value, and not recalculating it completely with the arrival of a new tick, is such a standard story that it is strange that you have even started to discuss it. It is doubly strange that you speak about it as some trick you have found. In reality, it is a standard for writing all indicators. It is also mentioned in the documentation. That is why absolutely everyone uses recalculation on the last bar/ tick.