Color candles with specific body %

Hello Friends,

I need an indicator which will color the candles whose body size is <or=50% of the range.

Color candle  = Body 50% of range.

Range= High-low




you can use range bars in amibroker or can define the range in amibroker as per the calculation, check the below screenshot

Dear AlgoGreek,
Thanks a lot for your feedback. I want to know if you can code it in pi if possible. It wont be difficult for an experienced coder like you. I just want a differently colored candle whose body size is less than or equal to fifty percent of the total length of the candle as explained.
I am eagerly waiting for your feedback.
If you could do that for me I should be most grateful.

do you have boring candle code for afl amibroker