How to get index for past Nth signal

Created at 16 Sep 2019, 10:52
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!
RA

RayAdam

Joined 02.06.2019

How to get index for past Nth signal
16 Sep 2019, 10:52


Hi Support,

Is there a way to get the candle index for past Nth signal

Option tried so far

MyIndicatorSeries.LastValue & MyIndicatorSeries.Last are of type double

MyIndicatorSeries.Count - 1 gives out the index for the Last signal only (also got the 2nd Last with variabel manipulation)

Post signal candle count may be another option, didn't try to store multiple past value yet.

Is there some built-in function available to get such data or something i missed with above methods

any help would be highly appreacited,

Thanks in advance


@RayAdam
Replies

PanagiotisCharalampous
16 Sep 2019, 11:02

Hi RayAdam,

See below an example

var index = MarketSeries.OpenTime.GetIndexByTime(MarketSeries.OpenTime.Last(9));

Best Regards,

Panagiotis


@PanagiotisCharalampous