Question regarding Live Trendbar
Question regarding Live Trendbar
06 Oct 2020, 11:26
Hi Panagiotis,
while diving deeper into Open API 2.0 I've seen one confusing thing:
- When subscribing for live trendbar (CreateSubscribeLiveTrendbarReq) the server sends all trendbars with the corresponding periods as TrendbarList.
- The timestamp (utcTimestampInMinutes) can be used to detect a new candle as it is equal to the timestamp of the open tick..
- The calculation of Open (= Low + DeltaOpen), High (= Low + DeltaHigh) and Low is working as expected.
- But, the value of DeltaClose is a little bit confusing for me as it is always 0; therefore Close = Low...
I guess it would be more logical - and even correct - when DeltaClose = Bid - Low; therefore Close would always be the current Bid price (as it is in cTrader)...
Are my considerations correct or did I misinterpret the logic behind the mentioned fields?
Many thanks for your reply and best regards,
Christian
Replies
george.secillano
12 Oct 2020, 05:43
RE:
PanagiotisCharalampous said:
Hi Christian,
DeltaClose is not populated for Live trendbars, only for historical ones, since the bar has not closed yet. You should be using the bid price instead.
Best Regards,
Panagiotis
Hi Panagiotis,
Would you mind suggesting how the current bid price can be retrieved? Should I be using tick data and calculate the current bid price?
Thanks,
George
@george.secillano
george.secillano
12 Oct 2020, 06:47
RE: RE:
george.secillano said:
PanagiotisCharalampous said:
Hi Christian,
DeltaClose is not populated for Live trendbars, only for historical ones, since the bar has not closed yet. You should be using the bid price instead.
Best Regards,
Panagiotis
Hi Panagiotis,
Would you mind suggesting how the current bid price can be retrieved? Should I be using tick data and calculate the current bid price?
Thanks,
George
Nevermind. You were referring to the ProtoOASpotEvent. Thanks.
@george.secillano
PanagiotisCharalampous
06 Oct 2020, 11:53
Hi Christian,
DeltaClose is not populated for Live trendbars, only for historical ones, since the bar has not closed yet. You should be using the bid price instead.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous