Market Internals: All in 1 Chart For ThinkOrSwim

Carl-not-Karl

Member
VIP
Summary: A visual dynamic comparing another symbol(s) with value on your main chart.
Each study has a Chart Bubble, Cloud, Label and Line with on/off display and each will change color: up = green, down = red.
The Lines act as reference lines with Chart Bubbles as absolute values.
1min. | 3 min. | 5 min. time frames shown:

shared link: https://tos.mx/f0xTaFt
i4LdTtz.png


There are a total of 35 studies per Index (30 are shown, 5 in lower chart with display off):
Emini, Emicro, 6 long/short ETFs, Top 10 stock holdings per Morningstar, 2 similar-in-size indices and the 9 market internals.​
DJX does not have a volatility symbol so $DXY Inverse is used.​
In the image all Labels are on and the Index Cloud is on, all Chart Bubbles and Lines are off.
Each study may be placed on its own chart.
https://tos.mx/pyLQtQJ

l402OUu.png


Example: various studies and settings displayed:

7TPnHzU.png


All studies have a prefix with the Index coming first so they are grouped/listed together:

VZ0QtjE.png


Here are 3 other Indices showing various studies displayed and the 5 studies in the Lower Study.
The grey horizontal line is the zero line on the <TICK>_Line study.
The included <TICKs> study in the Lower pane would have a green/red line, explained later).
https://tos.mx/5VLgEH8

PlSClfr.png


2 studies are not inverted (declining issues and volume).
The 3 studies that cross the 0 line behave 'differently' than the 30.
All 5 are included for a complete Market Internals package.
When the 3 are placed on their own chart they have a zero horizontal line that changes green/red when the symbol crosses 0.
The declare lower; affects this and thus has been removed for the 5.
(ex.: TICKs, Advance-Decline Difference and Volume Difference).
Note: In Chart Settings > Price Axis > Fit Studies must be off:

wor3ndx.png


The key to using reference lines is having declare lower; placed in the scripts of the 30 studies .
Once the study is added to a new chart it must be dragged into the upper study in the Edit Studies and Strategies window.
A Left Axis warning ( ! ) will appear to the left of the Label. To remove it uncheck the Left Axis:

qveODZO.png


Studies with just the Cloud on in the Lower pane is a nice way to perform historical analysis to see what internals/symbols move in correlation.

Note: Any changes to the settings in the studies you will need to name/rename the study otherwise the order will become random.
Name example: RUT Composite and then reload the study to your chart.

Wish list: ability to move the Chart Bubbles horizontally and vertically w/o losing the red/green function, possibly with a line that acts correspondingly.
 
Last edited by a moderator:
The code below can act as a template: duplicate it and use any symbol you want and then change the 4 symbols "/ES" in this example to your desired symbol.
Modify colors, length of label, etc. as needed.

Code:
Code:
# Carl_K | December, 2023 | ver 1.0

declare lower;

input AddChartBubble = no;
input AddLabel       = yes;
input AddCloud       = no;

def symbol = close("/ES");

plot S = symbol;
S.DefineColor("Up", GetColor(6));
S.DefineColor("Down", GetColor(5));
S.AssignValueColor(if S > S[1] then S.Color("Up") else S.Color("Down"));
S.SetLineWeight(1);
S.SetStyle(1);
S.HideBubble();
S.HideTitle();

def data = if !isNaN(S) then S else double.NaN;

AddChartBubble(AddChartBubble and isNaN(close[-1]) and !isNaN(close),
 data, "ES " + Round(S,2),
 if S > S[1] then color.green else color.red,
 if S > S[1] then yes else no);

AddLabel(AddLabel, if S > S[1] then
 " ES                                                                                                   "
 else
 "                                                                                                   ES ",
 if S > S[1] then color.green else color.red);

def hiLevel = if S >= S[-1] then double.positive_infinity else double.negative_infinity;
AddCloud(if AddCloud and -hiLevel then -hiLevel else double.NaN, hiLevel, color.green, color.red);

Code for symbols that use a zero line:
Code:
# Carl_K | December, 2023 | ver 1.0

input AddChartBubble = no;
input AddLabel       = yes;
input AddCloud       = no;

def Symbol = close("$TICKC");

plot S = Symbol;
S.DefineColor("Up", GetColor(6));
S.DefineColor("Down", GetColor(5));
S.AssignValueColor(if S > S[1] then S.Color("Up") else S.Color("Down"));
S.SetLineWeight(1);
S.SetStyle(1);
S.HideBubble();
S.HideTitle();

def data = if !isNaN(S) then S else double.NaN;

AddChartBubble(AddChartBubble and isNaN(close[-1]) and !isNaN(close),
 data, "TICKC " + Round(S,2),
 if S > S[1] then color.green else color.red,
 if S > S[1] then yes else no);

AddLabel(AddLabel, if S > S[1] then
 " TICKC                                                                                             "
 else
 "                                                                                             TICKC ",
 if S > S[1] then color.green else color.red);

def hiLevel = if S >= S[-1] then double.positive_infinity else double.negative_infinity;
AddCloud(if AddCloud and -hiLevel then -hiLevel else double.NaN, hiLevel, color.green, color.red);

# zeroLine
plot zeroLine = 0;
zeroLine.AssignValueColor(if close > 0 then color.green else color.red);
zeroLine.SetLineWeight(1);
zeroLine.HideBubble();
zeroLine.HideTitle();
 
Last edited:
Summary: A visual dynamic comparing another symbol(s) with value on your main chart.
Each study has a Chart Bubble, Cloud, Label and Line with on/off display and each will change color: up = green, down = red.
The Lines act as reference lines with Chart Bubbles as absolute values.
1min. | 3 min. | 5 min. time frames shown:

i4LdTtz.png


There are a total of 35 studies per Index (30 are shown, 5 in lower chart with display off):
Emini, Emicro, 6 long/short ETFs, Top 10 stock holdings per Morningstar, 2 similar-in-size indices and the 9 market internals.​
DJX does not have a volatility symbol so $DXY Inverse is used.​
In the image all Labels are on and the Index Cloud is on, all Chart Bubbles and Lines are off.
Each study may be placed on its own chart.
https://tos.mx/pyLQtQJ

l402OUu.png


Example: various studies and settings displayed:

7TPnHzU.png


All studies have a prefix with the Index coming first so they are grouped/listed together:

VZ0QtjE.png


Here are 3 other Indices showing various studies displayed and the 5 studies in the Lower Study.
The grey horizontal line is the zero line on the <TICK>_Line study.
The included <TICKs> study in the Lower pane would have a green/red line, explained later).
https://tos.mx/5VLgEH8

PlSClfr.png


2 studies are not inverted (declining issues and volume).
The 3 studies that cross the 0 line behave 'differently' than the 30.
All 5 are included for a complete Market Internals package.
When the 3 are placed on their own chart they have a zero horizontal line that changes green/red when the symbol crosses 0.
The declare lower; affects this and thus has been removed for the 5.
(ex.: TICKs, Advance-Decline Difference and Volume Difference).
Note: In Chart Settings > Price Axis > Fit Studies must be off:

wor3ndx.png


The key to using reference lines is having declare lower; placed in the scripts of the 30 studies .
Once the study is added to a new chart it must be dragged into the upper study in the Edit Studies and Strategies window.
A Left Axis warning ( ! ) will appear to the left of the Label. To remove it uncheck the Left Axis:

qveODZO.png


Studies with just the Cloud on in the Lower pane is a nice way to perform historical analysis to see what internals/symbols move in correlation.

Note: Any changes to the settings in the studies you will need to name/rename the study otherwise the order will become random.
Name example: RUT Composite and then reload the study to your chart.

Wish list: ability to move the Chart Bubbles horizontally and vertically w/o losing the red/green function, possibly with a line that acts correspondingly.
This is interesting, I would like to just have SPY, ADSPD,ADD and VOLD bubbles to see divergences on the 5 minute. i.e. ADD is red and the SPY is green. Is that possible with this script?
 
This is interesting, I would like to just have SPY, ADSPD,ADD and VOLD bubbles to see divergences on the 5 minute. i.e. ADD is red and the SPY is green. Is that possible with this script?
Notes:
I use the Composite symbol "C" extension on all technical indicators as ToS states: " traded anywhere".
Source: https://tlc.thinkorswim.com/center/release/rel-07-20-2013
These can be deleted from any script.
My reasoning: more data and leaving no stone unturned.
Side note: I personally use the ALLUSA stocks vs. NYSE as again, more data.

On your request I have add $VOLSPDC to compare with $VOLDC.
The 2 thicker lines are associated with SPY (SPX), 2 thinner are with NYA (NYSE).

Hm0VLdp.png
 
Notes:
I use the Composite symbol "C" extension on all technical indicators as ToS states: " traded anywhere".
Source: https://tlc.thinkorswim.com/center/release/rel-07-20-2013
These can be deleted from any script.
My reasoning: more data and leaving no stone unturned.
Side note: I personally use the ALLUSA stocks vs. NYSE as again, more data.

On your request I have add $VOLSPDC to compare with $VOLDC.
The 2 thicker lines are associated with SPY (SPX), 2 thinner are with NYA (NYSE).

Hm0VLdp.png
This looks great, but don't find the ADSPD in your scripts? I down loaded it and am just using the ADD and it looks great, but no ADSPD to be found...
 
Last edited by a moderator:
The 7 Indices with their associated Market Internals, ETFs and Top Ten Stocks have been updated to include modified thinkscripts.
The major change being able to move the AddChartBubble both horizontally and vertically (if moved into the future the bubble will turn ToS default color of cyan.).

Tags: AddChartBubble AddCloud AddLabel Comparison Symbol

Think of the chart layouts as a Library or depository of all Market Internals, ETFs and top stocks where any script can be added (or copied and modified) as a comparison study on your other charts.

All scripts are grouped with Index identifier: SPX_ , NDX_ , etc.

1703972772393.png


The scripts (36 total per Index) are turned off in the images/attachments below:

https://tos.mx/lQOQ2Ms

BEoUubA.png


https://tos.mx/qEERDm0

Kp3FHXB.png


See previous posts above for additional info.

SPY sample with various settings turned on:

Snirp2p.png
 
1xETFs on 3 minute Aggregation period (they all tend to move in synch):

svU5T7w.png
Can you share a link for this setup (in this post)? I cant seem to replicate it, lots of studies to weed through. Really appreciate you taking the time to post this, extremely comprehensive! I wanted to toy around to make it useful for my style of trading. Thanks!
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
305 Online
Create Post

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top