Get custom symbol day open price

Created at 20 Aug 2014, 13:04
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
ST

StormeNet

Joined 13.12.2013

Get custom symbol day open price
20 Aug 2014, 13:04


Hi,

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;

In cTrader you can see the % Daily change for each symbol in the symbol list. Is there a way to access that data?

If that option isn't available, is there a way to tell GetSeries to only get a small portion of the Serie data?


@StormeNet
Replies

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

StormeNet
21 Aug 2014, 09:40

Ok Thanks,

I'll test it once my broker pushes that update.


@StormeNet

StormeNet
01 Sep 2014, 11:24

Great improvement indeed!

Good job :)


@StormeNet