Forums › ProRealTime English forum › ProBuilder support › How to code a change of the "ribbon" › Reply To: How to code a change of the "ribbon"
05/08/2019 at 2:25 PM
#97964
1 2 3 4 5 6 |
ma1=Average[1] ma2=Average[2] ma3=Average[3] ma4=Average[4] x = ma1 > ma2 AND ma2 > ma3 AND ma3 > ma4 return x |
So.
- x > x[1] will tell you the first bar when they are in order
- x < x[1] will tell you the first bar when they are no more in order
- x <> x[1] will tell you whenever there’s been a change from order to disorder and viceversa