There is now way around this type of error because Thinkorswim has determined your script is too complex to compute a reliable value. The only alternative is to remove some of the complexity.
You can do this one of two ways. Reduce the number of conditions in each of your statements or split this into two separate columns.
For option one, I found that the error cleared up when I reduced the conditions to only include "XMA1" through "XMA6".
For option two, you can include all XMA's plots, but you can only include the bullish conditions in one column and the bearish conditions in another column.
For those interested in implementing option one, the following code will do that:
def bull = MovAvgExpRibbon()."XMA1" is greater than MovAvgExpRibbon()."XMA2" and MovAvgExpRibbon()."XMA2" is greater than MovAvgExpRibbon()."XMA3" and MovAvgExpRibbon()."XMA3" is greater than MovAvgExpRibbon()."XMA4" and MovAvgExpRibbon()."XMA4" is greater than MovAvgExpRibbon()."XMA5" and MovAvgExpRibbon()."XMA5" is greater than MovAvgExpRibbon()."XMA6";
def bear = MovAvgExpRibbon()."XMA1" is less than MovAvgExpRibbon()."XMA2" and MovAvgExpRibbon()."XMA2" is less than MovAvgExpRibbon()."XMA3" and MovAvgExpRibbon()."XMA3" is less than MovAvgExpRibbon()."XMA4" and MovAvgExpRibbon()."XMA4" is less than MovAvgExpRibbon()."XMA5" and MovAvgExpRibbon()."XMA5" is less than MovAvgExpRibbon()."XMA6";
AssignBackgroundColor (if bear then Color.RED else if bull then Color.GREEN else Color.BLACK);
Addlabel (yes, if bull then "BULL" else if Bear then "BEAR" else " " , Color.BLACK);
For those interested in implementing option 2:
Bullish column:
def bull = MovAvgExpRibbon()."XMA1" is greater than MovAvgExpRibbon()."XMA2" and MovAvgExpRibbon()."XMA2" is greater than MovAvgExpRibbon()."XMA3" and MovAvgExpRibbon()."XMA3" is greater than MovAvgExpRibbon()."XMA4" and MovAvgExpRibbon()."XMA4" is greater than MovAvgExpRibbon()."XMA5" and MovAvgExpRibbon()."XMA5" is greater than MovAvgExpRibbon()."XMA6" and MovAvgExpRibbon()."XMA6" is greater than MovAvgExpRibbon()."XMA7" and MovAvgExpRibbon()."XMA7" is greater than MovAvgExpRibbon()."XMA8";
AssignBackgroundColor (if bull then Color.GREEN else Color.BLACK);
Addlabel (yes, if bull then "BULL" else " " , Color.BLACK);
Bearish Column:
def bear = MovAvgExpRibbon()."XMA1" is less than MovAvgExpRibbon()."XMA2" and MovAvgExpRibbon()."XMA2" is less than MovAvgExpRibbon()."XMA3" and MovAvgExpRibbon()."XMA3" is less than MovAvgExpRibbon()."XMA4" and MovAvgExpRibbon()."XMA4" is less than MovAvgExpRibbon()."XMA5" and MovAvgExpRibbon()."XMA5" is less than MovAvgExpRibbon()."XMA6" and MovAvgExpRibbon()."XMA6" is less than MovAvgExpRibbon()."XMA7" and MovAvgExpRibbon()."XMA7" is less than MovAvgExpRibbon()."XMA8";
AssignBackgroundColor (if bear then Color.RED else Color.BLACK);
Addlabel (yes, if Bear then "BEAR" else " " , Color.BLACK);
Screenshot below shows each of these options applied to a watchlist gadget (listed in the order of the options described above).