historical Ask/Bid prices in the  calculate event of an indicator

Created at 26 Jun 2020, 16:23
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!
GE

genappsforex

Joined 25.11.2019

historical Ask/Bid prices in the  calculate event of an indicator
26 Jun 2020, 16:23


Is there a way (other than backtesting and saving to disk) to get historical Ask/Bid prices (that were valid on the time of the tick causing the calculate event to fire) in the  calculate event on of an indicator? 

 


@genappsforex
Replies

PanagiotisCharalampous
26 Jun 2020, 16:25

Hi genappsforex,

Check GetTicks() method.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

genappsforex
26 Jun 2020, 16:35

RE:

@PanagiotisCharalampous

I looked at that but could not see a way to align the tick to the chart (not date/time in a tick) Sorry so my question should be altered to:

Is there a way (other than backtesting and saving to disk) to get historical Ask/Bid prices (that were valid on the time of the tick causing the calculate event to fire) in the  calculate event on of an indicator? 

 


@genappsforex

PanagiotisCharalampous
26 Jun 2020, 16:41

Hi genappsforex,

Tick has a Time property. Use that to find the relevant tick at the time you need it.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

genappsforex
26 Jun 2020, 17:48

RE:

How could i've overseen that !
Thanks.

btw a GetIndexByTime method would be nice there.


@genappsforex