The indicator is repainting. That is a very common feature on custom indicators. Is that is the case, the bot is doomed.
You are checking that condition once per day. Not all days the conditions will be true.
Are you sure the indicator's buffer is correctly selected?
If you subtract high price from low prise (-) you will get the value in points, you will need a variable to store, you can check the distance with a check distance block.