You could also use reqRealTimeBars which sends you a completed bar every 5 seconds. You just combine them into 30-second intervals and take action on the completed bars.
As usual IB makes it harder than needed due to the subscription dropping sometimes so you have to monitor error messages and restart if needed.
I would also double check that your local clock is stable. PC clocks are notoriously bad and will not stay stable unless you force them to be, via updating from a reliable time server.
toggle quoted message
Show quoted text
On 6/14/2021 9:55 PM, Patrick C wrote:
Anyone else deal with this issues and have some solutions on how to ensure your getting accurate candle ticks in the last "closed" candle?