Help me,About ProtoOAGetTickDataRes !

Created at 13 Jul 2019, 08:56
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!
66

66281850

Joined 26.06.2019

Help me,About ProtoOAGetTickDataRes !
13 Jul 2019, 08:56


I have 2 questions:

first question:

when I  received a ProtoOAGetTickDataRes  message, I found some problems。

It  contains a list of  ProtoOATickData。 But only the first ProtoOATickData seems to be correct。

Like this:

ProtoOAGetTickDataRes.tickdata(0).timestamp()    =  1420235941367

ProtoOAGetTickDataRes.tickdata(0).tick()    =   120015  

 

ProtoOAGetTickDataRes.tickdata(1).timestamp()    =  -505

ProtoOAGetTickDataRes.tickdata(1).tick()    =   1

ProtoOAGetTickDataRes.tickdata(2).timestamp()    =  -2668

ProtoOAGetTickDataRes.tickdata(2).tick()    =   -2

ProtoOAGetTickDataRes.tickdata(3).timestamp()    =  -729

ProtoOAGetTickDataRes.tickdata(3).tick()    =   -1

ProtoOAGetTickDataRes.tickdata(4).timestamp()    =  -1277

ProtoOAGetTickDataRes.tickdata(4).tick()    =   1

 

What values mean from the second data?

 

second question:

I wang to got tick data  from Timestamp1 to Timestamp2.  Is the data returned by the server sorted by time?

order by desc  ? or  by asc?

 

 

@66281850
Replies

canbitwell
14 Jul 2019, 10:41

From what I can see so far about the tick data, say you have a tick at index X, you need to add X+1 to X, both the timestamp and price. (aka. X+1 is relative to X)

Say you already have tick(X=0) you can work about tick(X=1) relative to X, then work out(X=2) from tick(X=1) and so on.

I am not sure about the sorting. So I sort it myself.


@canbitwell