How to find Upper Circuit (Daily) candle in a Weekly Candle [Conditions apply]?

Can someone help me write an AFL for the below condition?
Condition (when AFL is 'Explored') to filter and display SCRIPS:
(i) Weekly ROC % >= 25%
(ii) The same Weekly candle needs to have at least one Daily ROC % as an Upper Circuit*.

* Range has to be:
a) 5% => 4.90 - 5%
b) 10% => 9.50 - 10%
c) 20% => 18 - 20%


Anybody there to help…

If my query is not clear, please let me know so that I could explain in detail.