Ron black clear method

I was wondering if anyone could program this. It essentially tracks the highest low in an upswing and once a candle completely clears below that highest low it begins tracking lowest highs. It has been programmed at most of the other charting platforms. Here a version over at tradingview