In my code I want an absolute (no matter + or -) value of one indicator be not more than one point differ from the absolute value of another indicator.
So I wrote && (SMA1[0] < (VMA1[0] + 1) ).
But sometimes VMA1[0] is higher than SMA1[0] and true will be && (VMA1[0] < (SMA1[0] + 1) ) for the same direction.
What would be the right way to compare absolute values?
Thank you so much.

Comment