Explanation: ta.ema: Calculates the 20 EMA and 200 EMA. Conditions: If the close is below both EMAs, the candle color is red. If the close is above both EMAs, the candle color is green. If the close is above 20 EMA but below 200 EMA, or below 20 EMA but above 200 EMA, the candle color is blue. plotcandle: Plots the candles with the specified colors