Keep in mind that our terms and conditions state we do not attempt to reverse engineer or copy the behavior of proprietary indicators on this website. But we can certainly build solutions based on your own description (specifications). And stacked EMA's is a pretty common request so I don't see any issues providing the solutions you requested.
Here is the code for the stacked ema's. I have only included three ema's in this solution due to time constraints for free solutions I provide in this forum. You can add additional ema's to this solution after you read the code and understand how the patterns are computed.
input maLengthOne = 8;
input maTypeOne = AverageType.EXPONENTIAL;
input maPriceOne = close;
input maLengthTwo = 20;
input maTypeTwo = AverageType.EXPONENTIAL;
input maPriceTwo = close;
input maLengthThree = 50;
input maTypeThree = AverageType.EXPONENTIAL;
input maPriceThree = close;
plot maOne = MovingAverage(maTypeOne, maPriceOne, maLengthOne);
plot maTwo = MovingAverage(maTypeTwo, maPriceTwo, maLengthTwo);
plot maThree = MovingAverage(maTypeThree, maPriceThree, maLengthThree);
def stackBullish = maOne > maTwo and maTwo > maThree;
def stackBearish = maOne < maTwo and maTwo < maThree;
AddCloud(if stackBullish then Double.POSITIVE_INFINITY else Double.NaN, if stackBullish then Double.NEGATIVE_INFINITY else Double.NaN, Color.GREEN, Color.CURRENT);
AddCloud(if stackBearish then Double.POSITIVE_INFINITY else Double.NaN, if stackBearish then Double.NEGATIVE_INFINITY else Double.NaN, Color.RED, Color.CURRENT);
And here is the solution for the ADX indicator with red background when ADX is above 40:
input length = 14;
input averageType = AverageType.WILDERS;
plot adx = DMI(length, averageType).adx;
adx.setDefaultColor(GetColor(5));
AddCloud(if adx > 40 then Double.POSITIVE_INFINITY else Double.NaN, if adx > 40 then Double.NEGATIVE_INFINITY else Double.NaN, Color.RED, Color.CURRENT);