Rules:
If the next candle breaks the previous candles high, it's considered part of the UP move.
The candle that doesn't break the previous candles high is considered to be a pullback.
Or
If the next candle breaks the previous candles low, it's considered part of the Down move.
The candle that doesn't break the previous candles low is considered to be a pullback.
Hopefully these images make it a bit clearer.
https://www.tradingview.com/x/jnCRPIXn/
https://www.tradingview.com/x/6gwcqAJm/
