MT4 Crashing

 
Good day. 
So I have a custom Indicator that works fine. 
and when I change chart symbol it crushes my MT4. 

the Indicator works well if I change time frame no problem the Crash happens only when Symbol Change. 

could this be linked to brute force method I have employed
 
Jefferson Metha:
Good day. 
So I have a custom Indicator that works fine. 
and when I change chart symbol it crushes my MT4. 

the Indicator works well if I change time frame no problem the Crash happens only when Symbol Change. 

could this be linked to brute force method I have employed

Is there any infinite loop possibilities in your data requests ? i assume you are using data from all timeframes for the calculations

(there are some occasions where the indicator must reinit before using the data and if inside a while loop ,the "how many bars" you downloaded does not move)

When the indicator loads a new symbol include a "skip" through all used timeframes first to nudge the broker for data

 
thank you it was more like an infinite loop. it was running for 
MathPow(Bars,Bars) 

Number of times lol. 

Thanks. I had to create an external Print Function using FileWwrite 
then I noticed During the MT crush the File Size was growing at an exponential Rate left it over night when I cam it was still running and file was about 2 GB CSV file


thanks