Topics
Replies
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
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
21 Aug 2014, 09:24
I need to get the daily market open time for several symbols in a bot however the following method takes a lot of time for each symbol (some symbols up to 142 seconds with an average of 16 per symbol):
Symbol s = MarketData.GetSymbol(symbol);
MarketSeries serie = MarketData.GetSeries(s, TimeFrame.Daily);
double dailyOpen = serie.Open.LastValue;
We optimized this functionality in cAlgo 1.24. You can try it in Spotware cAlgo.
In cTrader you can see the % Daily change for each symbol in the symbol list. Is there a way to access that data?
No, we do not expose those values in cAlgo.API.
@Spotware
Spotware
18 Aug 2014, 16:14
RE: RE:
AlexanderRC said:
Spotware said:
Also I have seen a situation that when viewing two identical 1-tick charts in two separate instances of cTrader, a tick was missing in one instance and present in another.
Tick chart shows all received ticks. Do you compare two instances of cTrader from the same broker?
Yes, cTrader was from the same broker and both instances were usung the same account. But that was observed around half a year ago. Unfortunately, I do not have a screenshot.
Next time when you observe this problem please press Shift+Ctrl+Alt+T in both platforms. It will send us troubleshooting information.
@Spotware
Spotware
18 Aug 2014, 12:50
We investigated your report. You access Close price in OnBar method.
OnBar method is invoked when new bar is opened. At that moment MarketSeries collection already contains tick from new bar. It means that last bar is not formed and in general cases open = high = low = close. Probably you need to access to last formed bar. You can use Last(1):
var closeOfFormedBar = MarketSeries.Close.Last(1);
@Spotware
Spotware
18 Aug 2014, 10:42
No, it will not be available in next version as well. We can recommend you to post your request to vote.spotware.com.
@Spotware
Spotware
18 Aug 2014, 10:36
You can check our voting service: vote.spotware.com. We do not plan to publish exact roadmaps,
@Spotware
Spotware
18 Aug 2014, 10:06
Is it possible that OnTick() handler in cBot misses some incoming tick if OnTick() still executes when the tick arrives?
Our platform puts all incoming ticks to the queue. When we handle items from the queue we apply all collected ticks to MarketSeries, but invoke OnTick handler only for last tick. Therefore, OnTick handles only latest known ticks.
Also I have seen a situation that when viewing two identical 1-tick charts in two separate instances of cTrader, a tick was missing in one instance and present in another.
Tick chart shows all received ticks. Do you compare two instances of cTrader from the same broker?
Are there are kind of throttling in cServer when it sends (or does not send) ticks?
No, there is no throttling in cServer.
@Spotware
Spotware
18 Aug 2014, 09:49
RE: RE:
neverman said:
Spotware said:
You are right, time in the left column is your local time. You can add Server.Time to the Print statement.
Problem solved ... the system time was wrong ... I have to find a way the system timer to stay always same with the server time ?!?
You can use Server.Time property in order to obtain current server time.
@Spotware
Spotware
15 Aug 2014, 09:41
RE:
neverman said:
Hello,
I worked on the following code and its not working very well:
var dailyEurGbpSeries = MarketData.GetSeries("EURGBP", TimeFrame.Minute); var dailyClose = dailyEurGbpSeries.Close.Last(1);
I'm starting this code on tick graph with the idea to get the last M1 close (not current). I added Print(dailyClose) to the code and the result was strange.
07/08/2014 22:15:59.909 | GBP, EURGBP, t1 | Previous Close is0.79377
07/08/2014 22:16:00.143 | GBP, EURGBP, t1 | Previous Close is0.79377
07/08/2014 22:16:00.564 | GBP, EURGBP, t1 | Previous Close is0.79377
...
07/08/2014 22:16:06.211 | GBP, EURGBP, t1 | Previous Close is0.79377
07/08/2014 22:16:06.243 | GBP, EURGBP, t1 | Previous Close is0.79381
As you see it took 6 seconds to show me the true Close M1. Where is the mistake ?
First of all, please rename dailyEurGbpSeries variable, because it is minute, not daily series. It is not clear why do you think that GetSeries took 6 seconds. Please try to clarify your question.
@Spotware
Spotware
26 Aug 2014, 17:11
RE:
StormeNet said:
Did you press the Stop button?
@Spotware