distance definition and values

#1
Dear all,
I simply need to create a formula able to plot and identify a value only if the distance between two defined values ​​does not exceed a certain number:

example
if first condition occours, the second one must occour within a defined distance
and viceversa but with the possibility to change the distance for both.
if One or both conditions are true plot me a value to identify that.

How to implement it in amibroker?

:confused:

any help is appreciated.
 

Similar threads