Author |
Topic: How to differentiate between ticks(trades) and bid/ask updates (5 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
PNannis Posts: 17 Joined: Apr 16, 2014 |
In the OnPriceTick event handler how do I differentiate a "trade" (tick) vs a bid/ask update. I want an non-aggregated tick by tick feed. Just treating each callback as a tick doesn't work and ends up over-reporting the number of ticks.
Peter Nannis |
||||
VPfau Moderator Posts: 164 Joined: |
Each update is uniq and reflects changes at any property of a price. See descriptions here:
http://www.openecry.com/api/api/html/T_OEC_API_OnPriceChangedEvent.htm http://www.openecry.com/api/api/html/T_OEC_API_Price.htm If you need updates for bid\ask changes only you need a write some filter. Thanks. Vitaliy Pfau |
||||
PNannis Posts: 17 Joined: Apr 16, 2014 |
So between multiple 1 lot trades at the same time and price the only field that would change would be the total volume count between the events?
I tried to derive them that way but the the total volume is still being under reported. Is the feed throttled down? (I am using the OnPriceTick event) Please explain how I should properly identify each tick in the example above Thanks/Peter Peter Nannis |
||||
VPfau Moderator Posts: 164 Joined: |
Server sends as many quotes as it could.
Remarks on OnPriceTick says: Quote: this event raised every time when price update comes, so it is recommended not to perform any CPU consuming operations (like GUI updates) in the event handler. Probably you need OnPriceChanged event. This event could skip some price updates, if they come too often. OECTrader uses this event for quote window. Vitaliy Pfau |
||||
PNannis Posts: 17 Joined: Apr 16, 2014 |
I figured it out so I am posting this reply so that others with the same issue may benefit.
To get a true streaming tick feed you need to subscribe to the price feed using the "SubscribeTicks" method (not "Subscribe") and then handle the "OnTicksReceived" event (not "OnPriceTick") Peter Nannis |
||||