v6
Added:
in_range(x, a, b)
check if a price is in a certain range, e.g. to check if price reached a target zone
Parameters:
x (float): the price variable
a (float): one range limit (sign agnostic)
b (float): other range limit (sign agnostic)
Returns: true if x is between a and b (inclusive)
range_overlap(a1, b1, a2, b2)
check if two price ranges overlap, e.g. to check if a target is price is possible that fits both target zones
Parameters:
a1 (float): one limit of range 1
b1 (float): other limit of range 1
a2 (float): one limit of range 2
b2 (float): other limit of range 2
Returns: true if x is between a and b (inclusive