Two Color SolidLine

Hi!

Please, is there a way to plot a solidLine with different colors (e.g. blue and yellow) depending on some variable ? E.g. plotting an SMA(10) solidLine in blue if variable X is true and in yellow if variable X is false.

Many thanks!
Fabio