Code optimization

 
I have written an indicator which perform significant amount of calculations. The result is that indicator is hard to use and slows down the system. Is there any guide available to optimize the mql4 code? If let me know if any one knows.

Thanks,
 

1. Don't recalculate any more bars than is necessary at each tick

2. Don't put more bars on your charts than you need.

3. Show some code, and somebody will likely assist