It draws Fib retracements based on the highest high measured when HeikinAshi candles are green, and lows based on when HeikinAshi candles are red.
The idea is that you can see the fib retracements based on HeikinAshi trends on a larger timeframe to help trade in smaller timeframes.
for v2 I reset the fib trace when a new high is set and also at the second green heikin candle. And I only show the last 20 bars of fib lines to avoid confusion and focus on the current trade.
Happy trading!