function call interrupted?

 

I am using arrays and resize them with each new bar by calling a user function to do this.

I have the impression that this function is interrupted when a new tick is coming in, with the result that the arrays have incorrect information. Generally visable when changing charts or timeframe and only the last data is available with only a small part of the indicator displayed.

Can I prevent interruption of a user function call?

Thanks for helping

 
In an EA I don't think anything will be interrupted . . . start runs till it's finished . . . and then the EA waits for the next tick . . then start runs again. Things are different for an Indicator . . .
 
sylvano45:
Generally visable when changing charts or timeframe and only the last data is available with only a small part of the indicator displayed.
Can I prevent interruption of a user function call?

There is no interruption period. There is no new ticks while indicators run, and ticks are skipped while EA is running.

Changing charts indicates that you're not resetting global variables (a deinit/init cycles does not reload the EA and thus doesn't reset globals)

Reason: