99% cpu usage - instances that use data2 for auto trading  [SOLVED]

Questions about MultiCharts and user contributed studies.
kagein
Posts: 55
Joined: 12 Oct 2017
Has thanked: 16 times
Been thanked: 10 times

99% cpu usage - instances that use data2 for auto trading

Postby kagein » 24 Jun 2019

I have an instance of MultiCharts that has 8 workspaces open, each with 6 charts. All charts rely on a second data stream. When auto trading is turned on at a set time of the day (8:00 gmt) it seems cpu usage immediately spikes to 100% freezing my server. Only by opening task manager and ending the task, will the server become usable again. Once i open the data2 instance up again, it seems to uses no more than 1% as it does normally.

My code has no time related functions specific to that time and I'm not using IOG.

Server specs are i7- 7700k and 64gb of ram.
Screenshot 2019-06-24 at 22.09.54.png
(278.6 KiB) Downloaded 295 times

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: 99% cpu usage - instances that use data2 for auto trading

Postby TJ » 24 Jun 2019

Do you have any PL code created drawing objects?

eg. Trendlines, arrows, texts, etc.,

kagein
Posts: 55
Joined: 12 Oct 2017
Has thanked: 16 times
Been thanked: 10 times

Re: 99% cpu usage - instances that use data2 for auto trading

Postby kagein » 24 Jun 2019

Do you have any PL code created drawing objects?

eg. Trendlines, arrows, texts, etc.,
No

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: 99% cpu usage - instances that use data2 for auto trading

Postby TJ » 24 Jun 2019

Usually it is a coding error.

Are you running IOG?

Please check to see if you have a snippet that sends an order, then cancels it immediately, and resubmits it again.

kagein
Posts: 55
Joined: 12 Oct 2017
Has thanked: 16 times
Been thanked: 10 times

Re: 99% cpu usage - instances that use data2 for auto trading

Postby kagein » 24 Jun 2019

As I wrote above, not using iog and have no time related code

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: 99% cpu usage - instances that use data2 for auto trading

Postby TJ » 24 Jun 2019

What are the chart resolutions?

How much back history on the chart?

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: 99% cpu usage - instances that use data2 for auto trading

Postby TJ » 24 Jun 2019

As I wrote above, not using iog and have no time related code
It is possible you have a hidden infinite loop.

Have you tried one chart only ?

How does the CPU respond?

kagein
Posts: 55
Joined: 12 Oct 2017
Has thanked: 16 times
Been thanked: 10 times

Re: 99% cpu usage - instances that use data2 for auto trading

Postby kagein » 25 Jun 2019

As I wrote above, not using iog and have no time related code
It is possible you have a hidden infinite loop.

Have you tried one chart only ?

How does the CPU respond?
i doubt it, It happens with different data2 strategies (varying from simple to complex) and only occurs when they are placed on a chart. If i have them in portfolio trader, no cpu spikes at all. The only thing the different strategies have in common is that the second data series uses daily data built from minute data.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: 99% cpu usage - instances that use data2 for auto trading

Postby Henry MultiСharts » 27 Jun 2019

Hello kagein,

On each chart that has Data2 please go to Format->Strategy properties->Backtesting, under Advanced enable the option "Ignore Tick cache in Realtime".

kagein
Posts: 55
Joined: 12 Oct 2017
Has thanked: 16 times
Been thanked: 10 times

Re: 99% cpu usage - instances that use data2 for auto trading  [SOLVED]

Postby kagein » 27 Jun 2019

This seems to fix the issue. Ill keep an eye on it but thanks.


Return to “MultiCharts”