Is it possible in cTrader Automate to programmatically populate a data structure with the values that would make up a 1 hour candle constructed from mid prices, i.e. open mid, high mid, low mid and close mid?
Yes this is possible
Is GetTicks() the way to do this, i.e. get all the ticks from e.g. 10:00 am and 0 seconds to 10:59 and 59 seconds, then convert the ticks to mid price using the ask and the bid and then select the open, high, low and close from the mid price ticks to give me 4 values representing a 1 hour candle constructed from mid prices?
Yes you should use GetTicks() for this.
Also is GetTicks() able to get every tick in a 1 hour time frame or does it miss ticks, for example in MT4 the on-tick event is triggered by a tick, but if your algo is still processing this tick when the next tick arrives it will miss this next tick.
This is how it works in cTrader as well but this should not affect historical data. Ticks are stored on the server even if your client does not process them.
marksnsparkle
23 Sep 2020, 15:26
RE:
PanagiotisCharalampous said:
Thank you for the reply PanagiotisCharalampous ... that's great news!
@marksnsparkle