Memory and CPU usage with many experts

 

Hi all, could you tell me if memory and CPU usage are the same between these two options?

- run the same expert on 10 different charts

- run the expert on a single chart, but in this case the expert can trade on 10 symbols indicated as input string. So I can open only 1 chart.

Is CPU and memory usage lower in the second case?

Thank you

 

It may depends on a lot of factors, basically related to how the EA is coded...

If you make a multisymbol EA that works by OnTimer function, probably it better and faster to work a single symbol on a chart, working by OnTick.

If you are coding a multisymbol EA by methods like Chart Events, it should be around the same.

These are just my ideas, I never did a test to proove what I'm saying, what I'm almost sure is that if there will be a difference, it will be little, so unless you are trading 100+ symbols on several platforms, you will not see a significant change in resources usage.

 

I recommend: Do not trade multiple currencies in one EA.

  1. You can't use any {MT4: predefined variables, MT5: predefined variables,}

  2. A multi-asset EA runs in one thread so that one asset blocks all the others, while each EA for a single asset runs in its own thread,

  3. Must poll (not OnTick, unless you use specific indicators)
              The Implementation of a Multi-currency Mode in MetaTrader 5 - MQL5 Articles (2011)

  4. and usually other problems, e.g. A problem with iBarShift - MQL4 programming forum - Page 2 (2016)

  5. You must handle History {MT4:4066/4073 errors: Download history in MQL4 EA - MQL4 programming forum, MT5: Timeseries and Indicators Access /  Data Access - Reference on algorithmic/automated trading language for MetaTrader 5.}

  6. Code it to trade the chart pair only. Look at the others if you must. Don't assume that Time[i] == iTime(otherPair, TF, i) always use iBarShift.

Then put it on other charts to trade the other pairs. Done.

Reason: