Hello
I trade multiple strategies on multiple charts, several dozen of them. I do not have any obvious performance issues, but I want to know how to improve performance, just in case.
1. If Multicharts takes 25% CPU on 4-core system, does it mean that it utilizes 100% of one core? Or it uses multiple cores and this is not a concern?
2. Do alerts affect performance? Is there a difference, performance wise, between "on bar close", "every tick" and "once per bar" alert?
3. Any general tips for strategy programming? Do IntrabarPersist variables negatively affect performance and should I avoid them?
Any input is much appreciated.
Autotrade performance
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Autotrade performance
Hello AAY,Hello
I trade multiple strategies on multiple charts, several dozen of them. I do not have any obvious performance issues, but I want to know how to improve performance, just in case.
1. If Multicharts takes 25% CPU on 4-core system, does it mean that it utilizes 100% of one core? Or it uses multiple cores and this is not a concern?
MultiCharts utilizes the multi-threaded CPU to increase chart indicator calculations by splitting the load between the CPU cores (each chart gets a separate flow). So each core gets its personal load.
Each study calculation requires some resources. The more calcualtions you have, the more events happen beacause of these calcualtions - the more resources are utilized.2. Do alerts affect performance? Is there a difference, performance wise, between "on bar close", "every tick" and "once per bar" alert?
If you need them in your code and you know how to use them - it won't negatively affect the performance.3. Any general tips for strategy programming? Do IntrabarPersist variables negatively affect performance and should I avoid them?
Any input is much appreciated.
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Autotrade performance
A typical store bought desktop computer has a quad core CPU running at 2.6 GigaHertz.how many EL codes lines could be run in tick/tick study ? with a powerful computer of course
That is 2,600,000,000 calculations per second on each core!
Of course that is a simplistic view... most of the operations require more that one clock cycle. And the CPU must also perform housekeeping duties.
But you get the point... today's computers are powerful; even an inexpensive off the shelf run of the mill computer, is fully capable of running MultiCharts with ease.
The best way to assure yourself is to try it out... Go load up MultiCharts with lots of data, add lots of indicators (eg. try multiple copies of MACD and Stochastics), then run some tests. You can try both backtest, or with a demo feed, do some realtime tests.
The ticks are processed FIFO. If there are more ticks than the computer can handle, which can happen during major report release time (eg. FOMC or job report), the ticks are processed one at a time until the cache is cleared.what append if new tick come before the end of the runing study ?
- ABC
- Posts: 718
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 408 times
- Contact:
Re: Autotrade performance
I would say that this highly depends on the "quality" of your code as well. Two codes that generate the same outcome can still have dramatically different calculation times.how many EL codes lines could be run in tick/tick study ? with a powerful computer of course
Regards,
ABC