Disliked{quote} Glad you got it sorted! FWIW, my suggestion would be: For any indicators that are extremely basic, calculate the values manually from within the EA. This avoids carrying buffer values unnecessarily. For any indicators that are available as an inbuilt function, use them (i.e. iRSI, iMACD, iADX etc.) Otherwise, make sure all your indicators are properly coded and use iCustom to call them. Here is very basic code that shows you how to use OnTimer() to update multiple symbols across multiple timeframes using an iCustom call. Once you've convinced...Ignored
No it cycles through all the 216 different symbols without problems, only it does ask allot of the computers RAM memory. I cannot run the EA and play a youtube music video at the same time. When i do this the EA becomes very slow and eventually stops cycling. I have a couple of other questions for you that perhaps you could answer for me.
1. I analyze every symbol on multiple timeframes. Sometimes however, a symbol just doesen't have enough bars in the month or week chart in order to make an indicator calculation. Icustom() returns the empty value for a double variable (247346457557 or something) instead of a real value. Does the Icustom() function generate an error message one can capture by using SetLastError() maybe? How does SetLastError() work? I want to use an if statement that basically says
if icustom(indi,0,0) == ERROR
{ignore erroneous indicator value
Alert("indi returned an error)}
icustom also returns nothing when the symbol has been taken offline by the broker. Will the generate an error message one can capture?
2. What is the difference between Bars and IndicatorCounted()? They both seem to return the same value. Could one substitute IndicatorCounted() for iBars(symbol,timeframe) if one wanted to put all the externally called indicators internally (as functions)?
Kind regards,
PS: thank you for the Ontimer example you posted. You seem to be using Arraysize() as a substitute to IndicatorCounted()