### USER INPUTS
input show_ema_1 = yes;
input show_ema_2 = yes;
input show_ema_3 = yes;
input show_ema_4 = yes;
input show_ema_5 = yes;
input ema_1_length = 8;
input ema_2_length = 21;
input ema_3_length = 34;
input ema_4_length = 55;
input ema_5_length = 89;
### GLOBAL COLORS
### (USERS CAN EDIT COLORS IN THE PREFERENCES SCREEN RATHER THAN CODE SECTION)
DefineGlobalColor("EMA 1", Color.YELLOW);
DefineGlobalColor("EMA 2", Color.CYAN);
DefineGlobalColor("EMA 3", Color.LIGHT_ORANGE);
DefineGlobalColor("EMA 4", Color.LIGHT_GREEN);
DefineGlobalColor("EMA 5", Color.PINK);
### EMPTY PLOT
plot nothing = Double.NaN;
nothing.HideTitle();
nothing.HideBubble();
### LABELS
AddLabel(show_ema_1, "EMA 1: " + Round(ExpAverage(close, ema_1_length), 2), GlobalColor("EMA 1"));
AddLabel(show_ema_2, "EMA 2: " + Round(ExpAverage(close, ema_2_length), 2), GlobalColor("EMA 2"));
AddLabel(show_ema_3, "EMA 3: " + Round(ExpAverage(close, ema_3_length), 2), GlobalColor("EMA 3"));
AddLabel(show_ema_4, "EMA 4: " + Round(ExpAverage(close, ema_4_length), 2), GlobalColor("EMA 4"));
AddLabel(show_ema_5, "EMA 5: " + Round(ExpAverage(close, ema_5_length), 2), GlobalColor("EMA 5"));