Muli Currency Indicator

 

Under the new mql5 system for referencing indicator values, you must create a global array, indicator handles, copy the buffer, and set the array as series.  If i'm trying to reference indicator values across 12 currency pairs, must I do this for each different currency?  This seems rather resource intensive, especially when CopyBuffer & ArraySetAsSeries occur every tick.  I'd appreciate a reference to another article or a simple explanation, thanks.

 

Pat 

 

It is up to your logic to determine when to make the calculations.

For instance, in OnTick() you can perform a check for appearance of a new bar. You may also choose to use OnTimer() function of EAs to decide when to make your calculations. 

 
I experimented with both OnTick and OnTimer for my contest Portfolio EA. OnTick only fires on a new tick for the chart currency it is attached to. This may cause a problem if the particular chart doesn't get a tick update in a significant time interval. I settled with OnTimer with a 1 second interval to check all my currencies evenly and regularly.