workin on the below script but i seem to be missing something, getting "At least one plot should be defined"
#--- Bar Direction ---
#Classify bars based on their direction into only two categories,either BL (+1) or BR (-1)
input roundToDigits = 2;
def h = round(high, roundToDigits);
def l = round(low, roundToDigits);
def c = round(close, roundToDigits);
def o = round(open, roundToDigits);
def range = h - l;
def IBS = if range != 0 then (c - l) / range * 100 else 0;
def BarDir = if (c > o and IBS >= 50) or (c <= o and IBS > 50) then 1 else -1;
# else if (c < o and IBS <= 50) or (c >= o and IBS < 50) then -1;
#--- Bar Direction ---
#Classify bars based on their direction into only two categories,either BL (+1) or BR (-1)
input roundToDigits = 2;
def h = round(high, roundToDigits);
def l = round(low, roundToDigits);
def c = round(close, roundToDigits);
def o = round(open, roundToDigits);
def range = h - l;
def IBS = if range != 0 then (c - l) / range * 100 else 0;
def BarDir = if (c > o and IBS >= 50) or (c <= o and IBS > 50) then 1 else -1;
# else if (c < o and IBS <= 50) or (c >= o and IBS < 50) then -1;