I updated the title of your question to include the full name of the study you are referencing. The "aka NYSI" was also a typo, because one of the three options is NYSE and not "NYSI". But "NYSI" is not a very helpful nickname for this indicator because it can be set to "NYSE", "NASDAQ" or "AMEX". The more appropriate nickname that I can think of would be to convert its name to initials, such as "MSI".
Here is the code which replicates the McClellanSummationIndex and add the new features you requested. (only two lines of code were required to add those two features).
declare lower;
input exchange = {default NYSE, NASDAQ, AMEX};
input fastLength = 19;
input slowLength = 39;
input ratioAdjusted = No;
input isCumulative = Yes;
plot msi = McClellanSummationIndex(exchange, fastLength, slowLength, ratioAdjusted, isCumulative).SummationIndex;
msi.AssignValueColor(if msi > msi[1] then Color.DARK_GREEN else Color.DARK_RED);
plot ob = McClellanSummationIndex(exchange, fastLength, slowLength, ratioAdjusted, isCumulative).OverBought;
ob.SetDefaultColor(GetColor(5));
plot os = McClellanSummationIndex(exchange, fastLength, slowLength, ratioAdjusted, isCumulative).OverSold;
os.SetDefaultColor(GetColor(5));
plot neutral = McClellanSummationIndex(exchange, fastLength, slowLength, ratioAdjusted, isCumulative).NeutralLevel;
neutral.SetDefaultColor(GetColor(7));
AssignPriceColor(if msi > msi[1] then Color.DARK_GREEN else Color.DARK_RED);
I have included a screenshot below which shows the original McClellanSummationIndex above the custom version. You can see the candles as well as the MSI have been colored according to the conditions you requested.