Library "CarlLib"
LastLowRedHighGreen(open, close, high, close, reqChangePerc) returns values representing the high of the most recent green and the low of the most recent red
Parameters:
open: open series
close: close series
high: high series
close: close series
reqChangePerc: the minimum require change percentage for the values to switch to new ones.
Returns: [highOfLastGreen, lowOfLastRed,changeOfLowPerc, distanceToHigh, distanceToLow, distanceToLongExitPercentage,distanceToShortExitPercentage]