Feature Request: Reliable Trendbar close event

Created at 12 Aug 2022, 23:43
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
vasile.peste's avatar

vasile.peste

Joined 07.06.2021

Feature Request: Reliable Trendbar close event
12 Aug 2022, 23:43


Hello, currently we can subscribe to trendbar updates through the SpotEvent. But here is no way to subscribe to trendbars being closed, and you don't provide any information when a trendbar is closed.

To detect if a trendbar is closed, I have to check the SpotEvent, get the current trendbar and compare it with the previous one from the previous SpotEvent, this allows me to detect if a trendbar has been closed because the open timestamp will be greater in the actual trendbar. But this has problems:

 

1. If, for example it's 23:59, and the market closes at 00:00. I will get no spot event to tell me that the current trendbar has been closed. Because no new trendbar is going to be opened. So basically it's impossible to know if a trendbar has closed when the market is closed.

2. This detection relies on market ticks, if a H1 trendbar is closed, and then the market is not liquid and there are only few ticks every 2-3 minutes, then the period being closed will be detected with a initial delay of a few minutes...

 

Can you provide a reliable Trendbar close event?

Thank you.


@vasile.peste