performance with variables

 

What's better in terms of performance? :

Use global variables for acces them from differents functions in the EA, or declare as local in start function and pass through parameters to other used functions?

(like indicators, that are re-calculated every time in the start loop)

Thanks

 
  1. There is a slight performance hit passing parameters than globals, But good coding practice should minimize globals.
  2. Properly coded indicators only update bar zero every time. The difference is negligible.