IsRising()

Created at 13 Sep 2014, 21:40
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!
ER

Ermisl

Joined 05.06.2014

IsRising()
13 Sep 2014, 21:40


I have a simple question referring to the IsRising() method.

ie

if (Functions.IsRising(sma.Result))

Does it check the value of the last bar against the previous bar or it can be used to check "on tick" last value to the previous one?


@Ermisl
Replies

Spotware
15 Sep 2014, 11:13

It checks last value against the previous. Implementation:

        public static bool IsRising(this DataSeries series)
        {
            return series[series.Count - 1] > series[series.Count - 2];
        }

 


@Spotware

Ermisl
15 Sep 2014, 13:42

RE:

Thank you.


@Ermisl