Author |
Topic: Tick Data (33 messages, Page 2 of 2) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
Sorry, but there is no such sample.
Please call OECClient.RequestTicks, then handle OnTicksReceived event. |
||||
DMu72 Posts: 20 Joined: May 28, 2008 |
In Help writed "OECClient.RequestTicks Method
Requests price ticks for given time range" How get tick-history in format: Timestamp; Price; Volume ? |
||||
DMu72 Posts: 20 Joined: May 28, 2008 |
Before use method RequestTicks,
example ff = api.RequestTicks(mSymbol, mStartDate, mEndDate) neeed declareted type result variable/array, in the example "ff" What class I must type Dim ff As OECAPICOM.????????? ? |
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
The method
public Subscription RequestTicks( Contract contract, DateTime StartDate, DateTime EndDate ) returns only Subscription object. Tick data are loaded asynchronously, and will be passed to a handler of the event OnTicksReceived: public delegate void OnTicksReceivedEvent(Subscription Subscription, Ticks Ticks); where Ticks object holds timestamps, prices and volumes, and Subscription object is passed to associate data with the RequestTick call, so you can issue multiple requests at a time. |
||||
DMu72 Posts: 20 Joined: May 28, 2008 |
Pls, give an example how get tick history
Private Sub CommandButton1_Click() Dim mSymbol, mStartDate, mEndDate As String mSymbol = Range("B1") ' QMN8 mStartDate = Range("K8") ' 12.06.08 00:00 mEndDate = Range("K9") ' 12.06.08 12:00 ????? End Sub What must write instead of "?????" that should have tick-history ? |
||||
DMu72 Posts: 20 Joined: May 28, 2008 |
Thanks for helps - I did it by self
All ok. But 1. object Ticks return Volumes in formate UInt16[] and Excel.VBA return error. In Watches it look as: Expression Value Type Volumes <Unsupported variant type> Volumes(0) <Unsupported variant type> Volumes(1) <Unsupported variant type> .... I think, it is incompatibility of datatype VBA and OEC.API. How overcome it? 2. object Ticks return some records, in example 4096 In Watches it look as: Expression Value Type Prices Single(0 to 4095) ........... How get quantity records in returned object Ticks ? 3. Why ALL values Ticks.Types = 0 ? |
||||
DMu72 Posts: 20 Joined: May 28, 2008 |
and (for example ESM8)
4. Timestamps NOT unique because NOT include milisecond Timestamps Prices 13.06.08 00:01:03,0 ; 1 342,25 13.06.08 00:01:03,0 ; 1 342,25 13.06.08 00:01:03,0 ; 1 342,25 13.06.08 00:01:03,0 ; 1 342,25 13.06.08 00:01:03,0 ; 1 342,50 13.06.08 00:01:03,0 ; 1 342,50 13.06.08 00:01:03,0 ; 1 342,50 13.06.08 00:01:03,0 ; 1 342,50 13.06.08 00:01:03,0 ; 1 342,50 13.06.08 00:01:04,0 ; 1 342,50 13.06.08 00:01:04,0 ; 1 342,50 13.06.08 00:01:04,0 ; 1 342,50 13.06.08 00:01:04,0 ; 1 342,50 13.06.08 00:01:04,0 ; 1 342,50 13.06.08 00:01:12,0 ; 1 342,25 13.06.08 00:01:16,0 ; 1 342,75 13.06.08 00:01:17,0 ; 1 342,75 What I must do to make more precise Timestamps ? |
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
sorry, we currently are not getting milliseconds from exchange, so there is no way to get more precise timestamps.
|
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
it seems UInt16 type is not supported by Excel version you are using. Try to use newer version with VBA.NET or use other .NET enabled environment.
|
||||
DMu72 Posts: 20 Joined: May 28, 2008 |
How about question ?2 :
2. object Ticks return some records, in example 4096 In Watches it look as: Expression Value Type Prices Single(0 to 4095) ........... How get quantity records in returned object Ticks ? |
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
the volumes with incompatibile type (referred in previous reply) are the quantities, so currently you have no access to them from Excel.
|
||||
DMu72 Posts: 20 Joined: May 28, 2008 |
Y not understoud me.
I asked about counter returned records. "How many records returned?" In debuger I see it. How I can get it value in program variable? |
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
for language-specific questions I would suggest using Microsoft documentation. for example,
http://msdn.microsoft.com/en-us/library/sb29et9e.aspx |
||||