Your topic has been moved to the section: Technical Indicators
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
momocoong:Indicator call function like iMA(), iRSI(), iCustom() .... etc. It's strict must call only in OnInit() ? If call in other event like OnCalculate(), Buffer value will be distorted. (From code the red line buffer should be equal as moving average period 1) Below is code. You can compare between call in OnInit() and call on OnCalculate() with input.
There is no MQL5 bug. You need to fix your code. Read the documentation on CopyBuffer and on iMA.
Here is an example for beginners ...
Moving average code for beginners by William210
Gerard Willia G J B M Dinh Sy, 2023.08.24 16:40
Moving average beginner tutorial to learn how to code in MQL5
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
"[MQL5 bug]" removed from topic title by moderator.
Indicator call function like iMA(), iRSI(), iCustom() .... etc. It's strict must call only in OnInit() ?
If call in other event like OnCalculate(), Buffer value will be distorted. (From code the red line buffer should be equal as moving average period 1)
Below is code. You can compare between call in OnInit() and call on OnCalculate() with input.