Topics
16 Nov 2023, 07:42
 1105
 1
15 Nov 2023, 10:36
 1980
 16
Replies

Spotware
26 Aug 2014, 17:11

RE:

StormeNet said:

Hi,

I have the following exception happening:

25/08/2014 22:30:24.282 | Executing Market Order to Buy 10k EURCZK
25/08/2014 22:30:24.578 | ? Executing Market Order to Buy 10k EURCZK SUCCEEDED, Position PID24657760
25/08/2014 22:30:24.578 | USDCNH (Ask: 6.1574, Bid: 6.1524) False
26/08/2014 06:46:11.379 | Crashed in OnTimer with AlgoAbortedException: Exception of type 'Frontend.CrossDomain.Dispatchers.AlgoAbortedException' was thrown.
26/08/2014 06:46:12.887 | cBot "CreateTrades" was stopped for EURUSD, h1.

In my Ontimer I log to a csv file every 30 seconds but it stopped logging at 23:29 whilst the exception only happened at 6:47.

Any thoughts on the situation?

Did you press the Stop button?


@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

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, 10:25

We optimized the CPU usage in cAlgo version 1.24. Can you reproduce this issue using Spotware cAlgo? 


@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
20 Aug 2014, 09:07

cAlgo API doesn't expose Symbols collection. We plan to add it in the future.


@Spotware

Spotware
19 Aug 2014, 14:39

We cannot reproduce the issue. Please make sure that you use m1 timeframe.


@Spotware

Spotware
18 Aug 2014, 16:46

Many new time frames have been released including a 2 hour timeframe on Spotware cTrader! It will be live for our broker's cTraders soon. 

click here for more info  


@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:40 ( Updated at: 21 Dec 2023, 09:20 )

List of indicators is already sorted in cAlgo:


@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:33

We cannot provide a time estimate for the release global variables at this time


@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, 11:40

You are right, time in the left column is your local time. You can add Server.Time to the Print statement.


@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
15 Aug 2014, 09:35

It is not clear what you mean. Please try to clarify your question.


@Spotware

Spotware
14 Aug 2014, 09:13

Symbol.Ask is not a function, it is a property. Example of usage:

Print(Symbol.Ask);

 


@Spotware