Market Breadth Labels for ThinkorSwim

J007RMC

J007RMC

Well-known member
2019 Donor
VIP
Used these labels today seemed to work fine.

Code:
# Market Breath Ratios
# Paris (based on an earlier idea from ESP)
# 11.02.2015
# One Note Download

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);
 
Last edited by a moderator:
D

dhruvchauhan11

New member
Hey how do you interpret this if bullish or bearish?
 
J007RMC

J007RMC

Well-known member
2019 Donor
VIP
I look for the indexes to be green/red gives a good signal of market health.
 
J007RMC

J007RMC

Well-known member
2019 Donor
VIP
Well Im jusying I may not enter a trade if the advance decline levels are red so I look for the market index strength
 
T

Tanp82

New member
2019 Donor
Gm, can you share the other labels shown above please?
 
BenTen

BenTen

Administrative
Staff
VIP
@alexR Please be as specific as possible when reporting an issue. What is not working? Can you post a screenshot of the chart?
 
A

alexR

New member
VIP
@alexR Please be as specific as possible when reporting an issue. What is not working? Can you post a screenshot of the chart?
Hi bem I am sorry, I will next time, I had an typo error my self, I corrected. Thanks
 

Similar threads

Top