Author |
Topic: OnTicksReceived, historical vs. subscribed data (2 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
SierraChart Posts: 111 Joined: Jul 17, 2007 |
How do we determine if the data that comes in to the OnTicksReceived event is from a historical request (RequestTicks) or a subscription request (SubscribeTicks)? Without knowing we don't know how to process the data when we want to request both types.
|
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
Both RequestTicks and SubscribeTicks methods returns a Subscription object. You should use this object to compare it with one passed as a parameter of the OnTicksReceived event in order to determine what request is the data for.
Also, you can use only SubscribeTicks both for getting historical and realtime ticks - if you call it with yesterday datetime, you will get historical ticks from yesterday to present in the first event and then will getting new ticks in subsequent events. |
||||