Breadth Calculations

Hi, i have attached a file that is calculating breadth of the SPDR sectors. I am having issue with not getting the correct signal (ADP signal) and incorrect dates. I have similar watch lists that us Optuma breadth symbols and they work. I created breadth scans and custom codes that I have included on the watchlist.
Breadth scans: Advancers, decliners, total issues in sector, new highs new lows, and % > 200D EMA. I created custom codes using these breadth scan to compute Advance/Decline percent, Hi/Lo percent, and percent of stocks > 200D EMA. I have switch scripts to toggle bullish or bearish based on criteria.

Also, I am using a variable + 0 as my result, what is the 0 representing?

MA1 = MA(BARS=10, STYLE=Exponential, CALC=Close);
V1 = CLOSE(MA1) > .30;
V2 = CLOSE(MA1) < -.30;
V3 = SWITCH(V1,V2);
V3+0

Thanks in advance for you help, Jamie

00-Breadth-Thrust.owb (563 KB)