This is an attempt to detect the so called Pay Attention Candles from RexDog Trading System (RDTS). (They are not clearly defined by any specific set in stone rule, so this is just my interpretation)
You can turn on and off the bar highlight/triangles if chart gets too busy and you want only one of the indication types.
The way this is defined as evident in the code is - it looks at the candle size (without the wicks!!! only open to close) to decide whether it is larger than ATR mutlipied by a multiplier (1.5 by default here - you can adjust) ATR period can also be adjusted but it's set to 9 by default.