For each buy/sell condition, create a boolean test... eg
close > close[1] // current close is higher than the prior close
that corresponds to your condition requirement. Then sum the number of true conditions and color the bar depending your criteria... Here's a short sample to get you going. Note that the conditions are applicable to the chart's timeframe... eg if you want a different timeframe - 1D on 60 minute chart - you'll need additional code.
//@version=5
indicator("Condition Test", overlay=true)
// Code the conditions as booleans
// close is above the prior bar close
priceAdvance = close > close[1]
// 10 period SMA is above the 20 period SMA
movAvgAdvance = ta.sma(close,10) > ta.sma(close,20)
// Condition Summation - set counter to zero before
// adding each true condition for each bar
conditionSum = 0
conditionSum += (priceAdvance ? 1 : 0)
conditionSum += (movAvgAdvance ? 1 : 0)
// color the bar yellow if we have exactly two conditions that match
// otherwise do nothing... eg color = na if total conditions != 2
barcolor(color=(conditionSum == 2 ? color.yellow : na))