Automated Trading and Strategy Testing Forum
New article Custom Indicators in MQL5 for Newbies is published:
Author: Nikolay Kositsin
Thank you.It is very clear and useful for beginners.
if(prev_calculated==0) // check for the first start of the indicator first=MAPeriod-1+begin; // start index for all the bars else first=prev_calculated-1; // start index for the new bars
when first=MAPeriod-1+begin; which is current bar ?  or [rates_total] ?
when first=prev_calculated-1; it is a large number, need repeat calculate ?