Here is a binary version that plots triangles along with the labels
Code:
# Market Breath Ratios
# Paris (based on an earlier idea from ESP) = 3;
# 11.02.2015
# One Note Download
Declare Lower;
input Dotsize = 3;
def UVOL = close(“$UVOL”);
def DVOL = close(“$DVOL”);
def UVOLD = close(“$UVOLI”);
def DVOLD = close(“$DVOLI”);
def UVOLS = close(“$UVOLSP”);
def DVOLS = close(“$DVOLSP”);
def UVOLN = close(“$UVOL/Q”);
def DVOLN = close(“$DVOL/Q”);
def UVOLR = close(“$UVOLRL”);
def DVOLR = close(“$DVOLRL”);
def SPYRatio = if (UVOLS >= DVOLS) then (UVOLS / DVOLS) else -(DVOLS / UVOLS);
AddLabel(yes, "S&P500: " + Concat(Round(SPYRatio, 2), ” :1”), if SPYRatio >= 0 then Color.UPTICK else Color.DOWNTICK);
def DJIRatio = if (UVOLD >= DVOLD) then (UVOLD / DVOLD) else -(DVOLD / UVOLD);
AddLabel(yes, "DJI: " + Concat(Round(DJIRatio, 2), ” :1”), if DJIRatio >= 0 then Color.UPTICK else Color.DOWNTICK);
def NDXRatio = if (UVOLN >= DVOLN) then (UVOLN / DVOLN) else -(DVOLN / UVOLN);
AddLabel(yes, "QQQ: " + Concat(Round(NDXRatio, 2), ” :1”), if NDXRatio >= 0 then Color.UPTICK else Color.DOWNTICK);
def RUTRatio = if (UVOLR >= DVOLR) then (UVOLR / DVOLR) else -(DVOLR / UVOLR);
AddLabel(yes, "R2000: " + Concat(Round(RUTRatio, 2), ” :1”), if RUTRatio >= 0 then Color.UPTICK else Color.DOWNTICK);
def NYSERatio = if (UVOL >= DVOL) then (UVOL / DVOL) else -(DVOL / UVOL);
AddLabel(yes, "NYSE: " + Concat(Round(NYSERatio, 2), ” :1”), if NYSERatio >= 0 then Color.UPTICK else Color.DOWNTICK);
plot R1_Dot = if IsNaN(close) then Double.NaN else 1;
R1_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
R1_Dot.SetLineWeight(DotSize);
R1_Dot.AssignValueColor(if SPYRatio < 0 then Color.DownTICK else Color.UpTICK);
R1_Dot.HideBubble();
plot R2_Dot = if IsNaN(close) then Double.NaN else 2;
R2_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
R2_Dot.SetLineWeight(DotSize);
R2_Dot.AssignValueColor(if DJIRatio < 0 then Color.DownTICK else Color.UpTICK);
R2_Dot.HideBubble();
plot R3_Dot = if IsNaN(close) then Double.NaN else 3;
R3_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
R3_Dot.SetLineWeight(DotSize);
R3_Dot.AssignValueColor(if NDXRatio < 0 then Color.DownTICK else Color.UpTICK);
R3_Dot.HideBubble();
plot R4_Dot = if IsNaN(close) then Double.NaN else 4;
R4_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
R4_Dot.SetLineWeight(DotSize);
R4_Dot.AssignValueColor(if RutRatio < 0 then Color.DownTICK else Color.UpTICK);
R4_Dot.HideBubble();
plot R5_Dot = if IsNaN(close) then Double.NaN else 5;
R5_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
R5_Dot.SetLineWeight(DotSize);
R5_Dot.AssignValueColor(if NYSERatio < 0 then Color.DownTICK else Color.UpTICK);
R5_Dot.HideBubble();