Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1445
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
Thank you!
Tried it and got an error, I'm doing something wrong:
Is buffer[] distributed? I see the declaration, but I don't see the size setting
Is buffer[] distributed? I see the declaration, but I don't see the size set
Set size, error somewhere else, doesn't work.
Set size, error somewhere else, doesn't work.
What are you transmitting?
What are you passing on?
Vitaly, why copy the function from the inluder? Wouldn't it be easier to plug in a library?
#include <MovingAverages.mqh>
In general, remove the call to this function from the loop. There is already a full loop in this function. In begin you need to pass the beginning of significant data in the array, based on which you are doing smoothing. For some types of smoothing you need a pre-calculation. For SMMA it is about two calculation periods.
In general, remove the call to this function from the loop. There is already a full loop in this function. In begin you need to pass the beginning of significant data in the array, based on which you are doing smoothing. For some types of smoothing you need a pre-calculation. For SMMA it is about two calculation periods.
But when a new bar is added, won't the entire array be recalculated? And when the current value in the array changes, the buffer would also need to be recalculated. In this case, how can we avoid the loop?
Once at the start of the indicator, through the entire buffer, and then only the last index on each tick? This is an impromptu. I haven't done so yet... I have to check it.
And in this case, when a new bar is added, won't the whole array be recalculated? And it wouldn't hurt to recalculate when the current value in the buffer array changes, either. In this case, how can we avoid the loop?
Once at the start of the indicator, through the entire buffer, and then only the last index on each tick? This is an impromptu. I haven't done so yet... I have to check it.
Well, look at the code - Vitaly has directly laid it out
Well, look at the code - Vitaly posted it directly
Now I came to debug "SmoothedMAOnBuffer()" construct in mt4.
I don't understand what's wrong
Now I've come to debugging the "SmoothedMAOnBuffer()" construct in mt4.
What's wrong, I don't understand it at all