Light version of MarketSeries ?

Created at 30 May 2017, 12:02
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!
FU

Futuresmo

Joined 13.09.2013

Light version of MarketSeries ?
30 May 2017, 12:02


Hi

I am interested in getting only last bar values in multiple crossess at the same time. Is there any way getting it without retrieving the whole data for MarketSeries object?

Instead of

var pairSeries = MarketData.GetSeries(fxPair, timeFrame);

Something like MarketData.GetSeries(fxPair, timeFrame).LastBarValues

The primary concern is performance, it may take long time to load 50-60 assets on the bar. Instead of getting whole series, only specific bar could be accessed directly.

 

Please clafiry


@Futuresmo
Replies

croucrou
30 May 2017, 15:39

You need to initialize the series, to then access last bar values.


@croucrou

Futuresmo
30 May 2017, 17:29

Market series initializes at least 2000 bars, that could be overhead with many multipairs setups. The purpose is to load 1 bar insted of 2000


@Futuresmo

croucrou
30 May 2017, 20:05

I understand, but accessing the last bar values is possible only after initialization of the series.

The series is an array and you are refering to value from an array.


@croucrou