This fixed it for me...
// Copy the indicator values to the corresponding buffers CopyBuffer(hmm5, 0, 0, rates_total, mm5Buffer); CopyBuffer(hmm8, 0, 1, rates_total, mm8Buffer); CopyBuffer(hmm21, 0, 2, rates_total, mm21Buffer); CopyBuffer(hmm72, 0, 3, rates_total, mm72Buffer);

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
For study purposes, I'm trying to create an indicator that draws 4 moving averages: 5, 8, 21 and 73 periods at once. But suddenly, MetaTrader stopped drawing all 4 moving averages.
Is it correct to use CopyBuffer in OnCalculate()?