HasCrossedAbove and HasCrossedBelow

Created at 07 Dec 2018, 05:53
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!
D.

d.vietnguyen1011

Joined 19.11.2018

HasCrossedAbove and HasCrossedBelow
07 Dec 2018, 05:53


Can any one please explain the difference between these cases and HasCrossedAbove/HasCrossedBelow mechanism in general because it seems like the reference guide only includes one case and I've seen many modifications. Thanks

// Case 1
shortMA.Result.HasCrossedAbove(longMA.Result, 0)

// Case 2
shortMA.Result.HasCrossedAbove(longMA.Result.LastValue, 0)

// Case 3
shortMA.HasCrossedAbove.HasCrossedAvove(longMA, 0)

 


@d.vietnguyen1011