Pleasekhtauon wrote: ↑Thu Dec 31, 2020 8:44 amReally appreciate the feedback! This is part of my reason I decided to post here so that I could get more advice on my coding.mladen wrote: ↑Thu Dec 31, 2020 4:38 amInstead of limiting the number of calculated bars, change line 287 from this :
return(0);
to this
return(rates_total);
Right now with default settings, the indicator will calculate 4000 bars on each tick and I doubt that it will beat the 1 calculated bar on a new tick when that line is changed
Also 5 out of 6 loops is not needed - one single loop will do all the work
Here's the latest version where I followed your suggestion & made the code a bit cleaner:
MACD_Momentum_&_Trend_Index_1.031.mq4
When you state thing like "my coding" you should state the origin of the code too
I know that igorad is not posting on this forum, but when you use his code and ad a couple of lines, it, at the least, should be appropriate that you mention whose code actually you are posting