Download MetaTrader 5
To add comments, please log in or register
Write articles, help other developers and make money
cryptex23
268
cryptex23 2016.11.02 19:32 

Hi All,

I am using loops to run a few calculations. For example look at the below, where I am using this to calculate mean over a period of time. I was wondering if I am better of inserting this into an array or is loop a better way? I am running this every one minute. I haven't been able to deploy this, everytime I do, the "shutdown by termination" error. Believe this is due to a 2.5 second time limit.

sum_y=sum_y+iClose("NZDUSD",PERIOD_M1,i);
Marco vd Heijden
Moderator
4507
Marco vd Heijden 2016.11.02 20:52  

Please show the full code and explain what you are trying to do.

Adding close values like this ? why ? it will grow very fast and possibly go beyond the storage capacity of sum_y.

/
To add comments, please log in or register