Well, there is good news and bad news. Those labels would require you to manually hard code calculations for all 100 individual stocks. While not technically impossible, it would be quite tedious, and it could possibly cause some issues with the platform, load slowly, or something along those lines.
The good news is that, in terms of weighting, the nasdaq 100 is really more like the nasdaq 20, along with around 80 stocks weighted at less than one percent. At one point, apple got so large that it dominated the entire index, such as that the entire index just basically did what ever apple did. If I remember correctly, the calculation of the index was altered to avoid this. The top 20'ish stocks still dominate the index.
Focusing on only those 20 or so significantly weighted stocks might be more feasible. But its up to you... The code below is the first request, just for starters. It should be enough for you to complete it on your own with simple copy-paste-edits. I am certainly not going to do all that data entry for all of the symbols myself. Whether you go with 100 or 20'ish, just change the #Total at the bottom.
Ruby:
Script E {
input Sym = "";
def C = Close(Sym);
plot E =
if isNaN(C) then No
else C > expAverage(C,9)
;
}
def AboveEMA =
(
E("AAPL") +
E("MSFT") +
E("AMZN")#+
#E(...) +
#E(...) +
#E(...)
) / 3; #total
;
AddLabel(Yes,"Above EMA: " + aspercent(AboveEMA),color.blue);
I can help you with the others if you decide its worth it.
You can find the weighting at
https://www.slickcharts.com/nasdaq100.
Personally, I would just go as far as INTU.