Access to previous value of indicator

Created at 09 Feb 2015, 20:57
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!
CE

Cezary

Joined 28.05.2014

Access to previous value of indicator
09 Feb 2015, 20:57


Hi,

I would like to get value of   MovingAverage indicator but several  bars ago. 

In bot I don't know what current value of index is and what was index bars then.

How can I obtain value of indicator any number of bars ago ?

 

Regards,

Cezary


@Cezary
Replies

AlexanderRC
11 Feb 2015, 00:20

indicator_instance.Result.Last(bars_ago)


@AlexanderRC

Cezary
11 Feb 2015, 11:58

ok, thanks :)


@Cezary

Forex19
12 Feb 2015, 15:47

RE:

AlexanderRC said:

indicator_instance.Result.Last(bars_ago)

Can you give examples of code line?

Thanks.


@Forex19