Author |
Topic: SubscriptionType.TickBar vs SubscriptionType.Ticks (5 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
VVigen Posts: 3 Joined: Nov 25, 2009 |
Hi,
Can you please help me to understand the difference beetween using SubscriptionType.TickBar vs SubscriptionType.Ticks with SubscribeBars function ? And what represents BarInterval in each case ? I have more questions after i get reply on this simple one please:-) Thanks Vigen Vigen Dolbakyan |
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
Ticks subscription allows to receive trades (ticks), and TickBar subscription gets bars composed from every N ticks, where N is BarInterval.
BarInterval is not used for Ticks subscriptions. |
||||
VVigen Posts: 3 Joined: Nov 25, 2009 |
Hi Thank you very much for a quick reponse.
This is what I was expecting , now my real question ? Can you please confirm that what I think is correct I want to get 33tick well known chart 1. Call SubsribeBars(startdate, OEC.Data.SubscriptionType.TickBar, 33) 2. Where startdate for example is last 10 minutes 3. I have my handler OnNewTick of OECClient.Global.OnTicksReceived(array of Bar) I assume that OnNewTick will be triggered with the array of bars, where each bar represents 33tick bar(meaning 33 trades took place ). But I receive something that doesn’t seem like what I expect For example when first onTickRecived arrives it has Bars array size =1440 each bar has the same low,high, close, open, and ticks=1 Can this be true or i missunderstanding something Thanks very much in advance Vigen Vigen Dolbakyan |
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
You need to handle OnBarsReceived event.
OnTicksReceived event works for SubscribeTicks and has Ticks in parameters. |
||||
VVigen Posts: 3 Joined: Nov 25, 2009 |
Sorry thats what i meant,
Example i brought was for Private Sub onNewBar(ByVal SubScription As OEC.API.Subscription, ByVal Bars As OEC.API.Bar()) Bar also has Ticks in oparameters Vigen Dolbakyan |
||||