Matching signals from two "range bar" settings

Hi all. I would like to know if there are ways code an afl that can trigger signals based on CCI values from two different range bar - like 30 R and 10 R. For ex. when both the 30 R and 10 R are >100 CCI, its a buy. I am newbie and don’t know what commands can reference the values from two charts.