Add the NYSE up/down volume ratio to the Quad
In thinkorswim Desktop, open $UVOL and $DVOL in separate chart cells. Use the same five-minute time aggregation and cash-session date. Read both symbol values at the same interval. These are values from breadth symbols, so use each bar’s close. Summing their reported values over the session would repeatedly count volume already included.
To display the calculation on an ES, SPY, or other time chart, open Charts → Studies → Edit Studies → Create. Replace the starter text with the study below, name it NYSEUpDownRatio, and select OK. Add the saved study to the chart and apply it. Check the label during the NYSE cash session, when both input symbols are updating.
A reading above 1 favors advancing volume. Below 1 favors declining volume. At 0.50, advancing volume is half of declining volume. A label using the signed dominant-side convention can display that same reading as −2:1. VOLD in the ShadowTrader Quad expresses a share-volume difference and uses zero for balance.
declare upper;
def advShares = close(symbol = "$UVOL");
def decShares = close(symbol = "$DVOL");
def hasReading = !IsNaN(advShares) and !IsNaN(decShares) and decShares > 0;
def exchangeRatio = if hasReading then advShares / decShares else Double.NaN;
AddLabel(hasReading, "NYSE up/down: " + Round(exchangeRatio, 2),
if exchangeRatio > 1 then Color.GREEN
else if exchangeRatio < 1 then Color.RED
else Color.GRAY);
AddLabel(!hasReading, "NYSE up/down: unavailable", Color.GRAY);