HTF candle in the LTF Chart

i want to add sweep line and alert in this indicator. Its simple like if a HTF candle sweep the previous HTF candle high/low and close below/above on the respective way. can anybody help?