CPU usage
CPU usage
22 Aug 2014, 18:05
Hi All,
Are you not experienced CPU usage problem nowadays? cAlgo use unusually large CPU on my computer, but I didn't change anything.
Thanks
Replies
rkokerti
25 Aug 2014, 12:35
Two other question. What is less memory / CPU consumig?
1,
if(criterias) { XY[index] = MarketSeries.Close[index]; } else { XY[index] = double.NaN; }
or
RefreshData() if(criterias) { XY[index] = MarketSeries.Close[index]; }
2,
if(criterias) { XY[index] = MarketSeries.Close[index]; } else { XY[index] = double.NaN; }
or
if(criterias) { ChartObjects.DrawText("XY"+index.ToString(),"XY",index,MarketSeries.Close[index],VerticalAlignment.Center,HorizontalAlignment.Center,Colors.Yellow); } else { ChartObjects.RemoveObject("XY"+index.ToString()); }
Thanks in advance!
@rkokerti
Spotware
25 Aug 2014, 14:48
RE:
rkokerti said:
Two other question. What is less memory / CPU consumig?
1,
if(criterias) { XY[index] = MarketSeries.Close[index]; } else { XY[index] = double.NaN; }or
RefreshData() if(criterias) { XY[index] = MarketSeries.Close[index]; }2,
if(criterias) { XY[index] = MarketSeries.Close[index]; } else { XY[index] = double.NaN; }or
if(criterias) { ChartObjects.DrawText("XY"+index.ToString(),"XY",index,MarketSeries.Close[index],VerticalAlignment.Center,HorizontalAlignment.Center,Colors.Yellow); } else { ChartObjects.RemoveObject("XY"+index.ToString()); }Thanks in advance!
Unfortunately, we don't have such information.
@Spotware
Spotware
25 Aug 2014, 17:50
RE:
rkokerti said:
I'm sorry, but not you are the developer of cAlgo?
Who can tell me, what is the best solution for Indicator optimization?
All above examples should not cause high CPU loading. We can recommend you to profile your indicator using performance profilers.
@Spotware
rkokerti
27 Aug 2014, 17:41
( Updated at: 21 Dec 2023, 09:20 )
Today I received and install the new version of cAlgo. The ver. Nr. is 1.24.102 for both cAlgo software.
The CPU usage now worse than previously. FxPro use 6 times more CPU than Spotware cAlgo with same setup.
Please help me, because FxPro cAlgo crashes!
@rkokerti
rkokerti
03 Sep 2014, 14:43
RE:
rkokerti said:
What is the expected release date? Because very cumbersome to use the software now.
I have a question in this connection. Why Spotware working properly while FxPro not? Same version number, same setup, but working differently. Can not be that, the problem is at on the broker side?
@rkokerti
AlexanderRC
03 Sep 2014, 16:05
( Updated at: 21 Dec 2023, 09:20 )
RE: RE:
rkokerti said:
rkokerti said:
What is the expected release date? Because very cumbersome to use the software now.
I have a question in this connection. Why Spotware working properly while FxPro not? Same version number, same setup, but working differently. Can not be that, the problem is at on the broker side?
Check digital signature on cTrader.exe/cAlgo.exe and look for its date. The version may be the same but the actual builds may be different. To find the actual .exe you are executing, use the Image Path Name in Windows Task Manager or Open File Location context menu command for the process.
@AlexanderRC
Spotware
03 Sep 2014, 17:00
Our tests show that there is no any significant difference between CPU consumption in cAlgo 1.23 and latest cAlgo 1.24. Probably performance issues that you observe do not relate to the latest update.
We deployed latest version to all our brokers. Different CPU consumption for different brokers could be caused because of different price feeds. For example, if broker provides ticks more frequently your indicators and cBots will require more CPU resources to handle all incoming ticks.
@Spotware
Balena
03 Sep 2014, 23:06
RE:
tSpotware said:
Our tests show that there is no any significant difference between CPU consumption in cAlgo 1.23 and latest cAlgo 1.24. Probably performance issues that you observe do not relate to the latest update.
We deployed latest version to all our brokers. Different CPU consumption for different brokers could be caused because of different price feeds. For example, if broker provides ticks more frequently your indicators and cBots will require more CPU resources to handle all incoming ticks.
there is a problem for sure... it's not the bots... i see same cpu issue running 1hr as I do running 1 tick
@Balena
rkokerti
04 Sep 2014, 15:19
Gentlemen!
I'm sorry to say this, but I'm a trader (user) here and now. I don't know what is the reason that I can not use cAlgo as intended.
Please do something to cAlgo working properly. A few minutes ago, when European Central Bank published Minimum Bid Rate, and therefore volatility sharp increased in the market, the cAlgo was absolutely useless.
So, Please do something!
@rkokerti
rkokerti
09 Sep 2014, 12:43
Dear Developers,
I continued the analysis of my indicator, to find the reason of huge CPU consumption.
I think I found the reason. If I remove the attached part of the code, then CPU consumption greatly reduced.
ATRValue = Math.Round(atr.Result[index] *10000 *(Symbol.PipValue / Symbol.PipSize)); PosPerc = Math.Round((ATRValue / Account.Equity *100),1); ChartObjects.DrawText("ATR",ATRValue.ToString() + " $" + "=" + PosPerc.ToString() + " %",index+2,MarketSeries.Close[index],VerticalAlignment.Center,HorizontalAlignment.Right,Colors.MediumSpringGreen);
Unfortunately, I need this code snippet, because this is the part of my Risk Management.
Another observation is that if there is no open position then CPU consumption low, otherwise very high.
There is something proposal how to solve this problem?
@rkokerti
Spotware
09 Sep 2014, 14:15
RE:
rkokerti said:
Dear Developers,
I continued the analysis of my indicator, to find the reason of huge CPU consumption.
I think I found the reason. If I remove the attached part of the code, then CPU consumption greatly reduced.
ATRValue = Math.Round(atr.Result[index] *10000 *(Symbol.PipValue / Symbol.PipSize)); PosPerc = Math.Round((ATRValue / Account.Equity *100),1); ChartObjects.DrawText("ATR",ATRValue.ToString() + " $" + "=" + PosPerc.ToString() + " %",index+2,MarketSeries.Close[index],VerticalAlignment.Center,HorizontalAlignment.Right,Colors.MediumSpringGreen);Unfortunately, I need this code snippet, because this is the part of my Risk Management.
Another observation is that if there is no open position then CPU consumption low, otherwise very high.
There is something proposal how to solve this problem?
Instead of calculating those values on every tick (in OnCalculate method) we can recommend you to use OnTimer event. You put this code to OnTimer handler and try to adjust the timer interval.
@Spotware
rkokerti
09 Sep 2014, 15:13
It doesn't help.... :(
protected override void Initialize() { atr = Indicators.AverageTrueRange(5,MovingAverageType.Exponential); Timer.Start(5); } //----------------------------------------------------------------- protected override void OnTimer() { int index = MarketSeries.Close.Count-1; // ATRValue = Math.Round(atr.Result[index] *10000 *(Symbol.PipValue / Symbol.PipSize)); // PosPerc = Math.Round((ATRValue / Account.Equity *100),1); // ChartObjects.DrawText("ATR",ATRValue.ToString() + " $" + "=" + PosPerc.ToString() + " %",index+2,MarketSeries.Close[index],VerticalAlignment.Center,HorizontalAlignment.Right,Colors.MediumSpringGreen); }
@rkokerti
rkokerti
09 Sep 2014, 15:15
RE:
rkokerti said:
It doesn't help.... :(
protected override void Initialize() { atr = Indicators.AverageTrueRange(5,MovingAverageType.Exponential); Timer.Start(5); } //----------------------------------------------------------------- protected override void OnTimer() { int index = MarketSeries.Close.Count-1; ATRValue = Math.Round(atr.Result[index] *10000 *(Symbol.PipValue / Symbol.PipSize)); PosPerc = Math.Round((ATRValue / Account.Equity *100),1); ChartObjects.DrawText("ATR",ATRValue.ToString() + " $" + "=" + PosPerc.ToString() + " %",index+2,MarketSeries.Close[index],VerticalAlignment.Center,HorizontalAlignment.Right,Colors.MediumSpringGreen); }
@rkokerti
... Deleted by UFO ...
Spotware
25 Aug 2014, 10:25
We optimized the CPU usage in cAlgo version 1.24. Can you reproduce this issue using Spotware cAlgo?
@Spotware