Questions About Bubbles

Waikiki Daddy O

New member
Can anyone edit this script, to improve the visibility of myr Thinkorswim chart?

I think if the buy-sell bubble & price trigger is positioned to the left of the movinging candle, rather than to the right, that will be better.

Why? Because as-is I can't easily see the candles that appear one-after-another as time marches on. And if the bubble and appear to the left then the candle overlap will at least be over historical candles and on the realtime candles.

Here's the script which puts the buy or sell bubble to the right side of the trigger point:

# SuperTrend
# Mobius
# Chat Room Request
# 11.20.2019 tomsk Enhanced and adjusted bubbles with coloring and description tag

input AtrMult = 1.0;
input nATR = 4;
input AvgType = AverageType.HULL;
input PaintBars = yes;
input n = 0;
def n1 = n + 1;
def ATR = MovingAverage(AvgType, TrueRange(high, close, low), nATR);
def UP = HL2 + (AtrMult * ATR);
def DN = HL2 + (-AtrMult * ATR);
def ST = if close < ST[1] then UP else DN;
plot SuperTrend = ST;
SuperTrend.AssignValueColor(if close < ST then Color.RED else Color.GREEN);
AssignPriceColor(if PaintBars and close < ST
then Color.RED
else if PaintBars and close > ST
then Color.GREEN
else Color.CURRENT);

AddChartBubble(close[n] crosses below ST[n], low[n+1] + TickSize() * n, "Sell @ " + low[n1], color.Cyan, yes);
AddChartBubble(close[n] crosses above ST[n], high[n+1] - TickSize() * n, "Buy @ " + high[n1], color.Yellow, no);

# End Code SuperTrend


===== THANK YOU MOBIUS & TOMSK!!! =====

Here's a picture of my Thinkorswim trading window that shows the problem: When a buy or sell bubble appears to the right of the moving price -- it overlaps several new candles that are the most import to watch if you are daytrading. So if the above code can be edited so that these bubbles can appear to the left, that should improve this script:

 
Last edited:
Can anyone edit this script to remove several of the time based scanner bubbles? ...So that I see only two rows.

* I would like to see a 1-minute scan-row of bubbles on top if possible.

* I would like to see a second row of 5-minute scan-row of bubbles on the bottom.

* Please get rid of the 10, 15, 30 and 60 minute bubbles. I don't need or want these for day trading.

Note: Currently there is no 1Min-Scan-Bubble-Row. If this is for technical reasons, please leave it out and only show one row based on a 5Min-Scan-Bubble.

Also, having so many rows make it hard to see a smaller sized chart, because there are too many rows and they get overlapped when you reduce the size of the chart.

Here's the script that Mobius created:

# SuperTrend Multiple Time Frames
# Mobius
# V03.01.2016

# I pulled this study down from MyTrade for a reason. It wasn't
# plotting correctly with the multiple aggregations. And like
# all studies with secondary aggregations it tends to replot the
# higher ones. I decided to think about it some more and this is
# where I am with the ST MTF study now.
#
# It's still squirrely and blinks a lot. Using declare Once_Per_Bar
# does some bad things to it. I was considering making intra
# aggregation higher time frames. A pain to do but it gives more
# control over how it plots.
#
# Row 6 is supposed to be the output for all aggregations and the
# signal line. After hours when data isn't moving it's steady and
# has good signals. But since it's after hours, totally useless
# for any intraday trading.

declare lower;

input agg1 = AggregationPeriod.Five_Min;
input agg2 = AggregationPeriod.Ten_Min;
input agg3 = AggregationPeriod.Fifteen_Min;
input agg4 = AggregationPeriod.Thirty_Min;
input agg5 = AggregationPeriod.Hour;
input AtrMult = .70;
input nATR = 4;
input AvgType = AverageType.HULL;

script ST{
input agg = AggregationPeriod.Five_Min;
input AtrMult = .70;
input nATR = 4;
input AvgType = AverageType.HULL;
def Fh = FundamentalType.High;
def Fl = FundamentalType.Low;
def Fc = FundamentalType.Close;
def Fhl2 = FundamentalType.HL2;
def h = Fundamental(Fh, period = agg);
def l = Fundamental(Fl, period = agg);
def c = Fundamental(Fc, period = agg);
def hl = Fundamental(Fhl2, period = agg);
def ATR = MovingAverage(AvgType, TrueRange(h, c, l), nATR);
def UP = hl + (AtrMult * ATR);
def DN = hl + (-AtrMult * ATR);
def S = if c < S[1]
then Round(UP / tickSize(), 0) * tickSize()
else Round(DN / tickSize(), 0) * tickSize();
plot ST = if c > S then 1 else 0;
}
def cl = close;
def x = isNaN(cl[2]) and !isNaN(cl[3]);
def FirstAgg = ST(agg = agg1, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType);
plot FirstAggPlot = if isNaN(cl)
then double.nan
else 1;
FirstAggPlot.SetStyle(Curve.Points);
FirstAggPlot.SetLineWeight(3);
FirstAggPlot.AssignValueColor(if FirstAgg == 1
then color.green
else color.red);
AddChartBubble(x, 1, (agg1/1000/60) + " min", color.white, yes);
def SecondAgg = ST(agg = agg2, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType);
plot SecondAggPlot = if isNaN(cl)
then double.nan
else 2;
SecondAggPlot.SetStyle(Curve.Points);
SecondAggPlot.SetLineWeight(3);
SecondAggPlot.AssignValueColor(if SecondAgg == 1
then color.green
else color.red);
AddChartBubble(x, 2, (agg2/1000/60) + " min", color.white, yes);
def ThirdAgg = ST(agg = agg3, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType);
plot ThirdAggPlot = if isNaN(cl)
then double.nan
else 3;
ThirdAggPlot.SetStyle(Curve.Points);
ThirdAggPlot.SetLineWeight(3);
ThirdAggPlot.AssignValueColor(if ThirdAgg == 1
then color.green
else color.red);
AddChartBubble(x, 3, (agg3/1000/60) + " min", color.white, yes);
def FourthAgg = ST(agg = agg4, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType);
plot FourthAggPlot = if isNaN(cl)
then double.nan
else 4;
FourthAggPlot.SetStyle(Curve.Points);
FourthAggPlot.SetLineWeight(3);
FourthAggPlot.AssignValueColor(if FourthAgg == 1
then color.green
else color.red);
AddChartBubble(x, 4, (agg4/1000/60) + " min", color.white, yes);
def FifthAgg = ST(agg = agg5, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType);
plot FifthAggPlot = if isNaN(cl)
then double.nan
else 5;
FifthAggPlot.SetStyle(Curve.Points);
FifthAggPlot.SetLineWeight(3);
FifthAggPlot.AssignValueColor(if FifthAgg == 1
then color.green
else color.red);
AddChartBubble(x, 5, (agg5/1000/60)+ " min", color.white, yes);
plot Six = if isNaN(cl)
then double.nan
else 6;
Six.SetStyle(Curve.Points);
Six.SetLineWeight(3);
Six.AssignValueColor(if FirstAgg and
SecondAgg and
ThirdAgg and
FourthAgg and
FifthAgg
then color.green
else if !FirstAgg and
!SecondAgg and
!ThirdAgg and
!FourthAgg and
!FifthAgg
then color.red
else color.black);
# End Code ST MTF

 
Last edited:
I don't believe bubbles can be moved and have them appear as you would like, however, the following will allow you to turn them on and off so you can see the chart when necessary.


C++:
# SuperTrend
# Mobius
# Chat Room Request
# 11.20.2019 tomsk Enhanced and adjusted bubbles with coloring and description tag

input AtrMult = 1.0;
input nATR = 4;
input AvgType = AverageType.HULL;
input PaintBars = yes;
input n = 0;
input showBubbles = yes;
def n1 = n + 1;
def ATR = MovingAverage(AvgType, TrueRange(high, close, low), nATR);
def UP = HL2 + (AtrMult * ATR);
def DN = HL2 + (-AtrMult * ATR);
def ST = if close < ST[1] then UP else DN;
plot SuperTrend = ST;
SuperTrend.AssignValueColor(if close < ST then Color.RED else Color.GREEN);
AssignPriceColor(if PaintBars and close < ST
then Color.RED
else if PaintBars and close > ST
then Color.GREEN
else Color.CURRENT);

AddChartBubble(showBubbles and close[n] crosses below ST[n], low[n+1] + TickSize() * n, "Sell @ " + low[n1], color.Cyan, yes);
AddChartBubble(showBubbles and close[n] crosses above ST[n], high[n+1] - TickSize() * n, "Buy @ " + high[n1], color.Yellow, no);

# End Code SuperTrend
 
Thanks JoeDV.

I have not yet tested your script, but to your answer: "I don't believe bubbles can be moved and have them appear as you would like..." on the left...

However, I have to believe there is a way, because nothing happens by default; or the code has some "organic forman," then I would think there should be a way to manipulte or add code that forces a left-justified bubble.

Note: I don't code; not since I took a Fortran class back in '78. I'm just thinking logically.

For example, might a line be added like this...

if x=bubble then display_left

So with all respect, and appreciation, I hope you think of a way to accomplish this code improvement or that someone else can come up with a solution.
 
Last edited:
So with all respect, and appreciation, I hope you think of a way to accomplish this code improvement or that someone else can come up with a solution.

I choose my words for a reason, can you move the bubbles, yes.. Will it look the way you want, in my opinion, no. If you search the forum you will find several posts on how to shift the bubbles around. It's not as simple as you're explaining however. Thinkscript is just that, a scripting language not a full-blown development language as many of us wish.

For the record, I started off with Fortran as well.
 
I have to believe there is a way, because nothing happens by default; or the code has some "organic forman," then I would think there should be a way to manipulte or add code that forces a left-justified bubble.

As @JoeDV stated, the ToS app does not provide for custom placement of chart bubbles.
As @JoeDV stated there is a bubble mover work-around however it might not yield the results you are looking for.
read more about bubble mover script:
https://usethinkscript.com/threads/bubblemover-code-snippet-for-thinkorswim.9392/
read more about how to search the forum for more examples:
https://usethinkscript.com/threads/search-the-forum.12626/
 
Thanks to you both! I can now see this subject has been discussed recentely, but I'm not smart enough to piece the code together to deliver a working result.

I did find few examples of what I (we) are talking about, but I have not added these edits, but I will play around with these snippets taken from the threads mentioned by MerryDay in other threads and by other forum members. For example:

This is a bubble mover code that should help by replacing your bubble code with the following. The input bubblemover will move the bubble sideways right/left (+/-) the number of bars/spaces input. This portion of the code (IsNaN(RRBub[b1]) and !IsNaN(RRBub) limits the bubbles to just one bubble.
Ruby:

input bubblemover = 5;
def b = bubblemover;
def b1 = b + 1;

DefineGlobalColor("D”, CreateColor(133, 163, 104));
AddChartBubble(IsNaN(RRBub[b1]) and !IsNaN(RRBub), RR, "RR", GlobalColor("D"));

and/or

You can move the bubble in this code sideways to where you want it. ...Hi, This is the code and have and it works:

plot rsi = reference RSI (14);

and another member said: You can add an offset to your location. IE: 1% higher then the high of bar or 1% lower then the low of bar
written as: low - (low*.01) or high + (high*.01)

So this script:
Rich (BB code):
AddChartBubble(Low, low-(low*.01), close, color.light_gray);

Of course, the odds I will be successful editigin and adding code successfully are 1 in a 1000. Maybe 1M. So if you guys want to play around with it, please keep us posted of your triumpths!
 
Last edited:
Personally, I'd change your sells to be at the high and buys at the low, then move them up and down by a set amount. That should push them out of the way as long as your signal is in the correct direction. The bubble's "arrow" will always point to the left so moving them sideways just makes them look like they're related to the wrong candle.
 
...or since the the lables alternate (for exameple Buy-Sell-Buy or Sell-Buy-Sell etc.)
...and I don't care if I see a labled, because I know if I want go go long or short;
...maybe I can reduce the with of the bubble just a little/enough and go with an "x" or "checkmark" in place or nothing at all but the price. Ihink the changing bubble color will be enough. TBD.

Note: The bubble has a little pointer the candle, so idealy I would like to see it populate to the left of the real-time candle, but beggars can't be chooses when you don't speak Java or whatever this stuff is called.

So I'm still hoping for something better. Many thanks!

REGARDING THE SCANNER BUBBLES SCRIPT

I edited a Scanner Script another member posted to tanke out the 10, 15, 30, and 60 minute rows so that I only see one 5min row... and it ran an is stable. However, it positions the bubbles will appear at the very top row or bottom row when add a Thinkorswim RSI study and in this position the scanner bubble gets cut in half on my monitor.

The link below will show you a picture of what I'm talking about.

https://www.flickr.com/gp/196664859@N04/Q7L4oj2E12

Can anyone explain how I can add a blank row above the bubble... like a empty margin-row... and then I bet we will be able to see a full circle row of scanned bubbles, which will be more noticable.

Here's the edited code I am using with only shows one row based on 5min data.

Code:

# Superscript Scanner Script_5min_Hull

declare lower;

input agg1 = AggregationPeriod.Five_Min;


input AtrMult = .70;
input nATR = 4;
input AvgType = AverageType.HULL;

script ST{
input agg = AggregationPeriod.Five_Min;
input AtrMult = .70;
input nATR = 4;
input AvgType = AverageType.HULL;


def Fh = FundamentalType.High;
def Fl = FundamentalType.Low;
def Fc = FundamentalType.Close;
def Fhl2 = FundamentalType.HL2;
def h = Fundamental(Fh, period = agg);
def l = Fundamental(Fl, period = agg);
def c = Fundamental(Fc, period = agg);
def hl = Fundamental(Fhl2, period = agg);
def ATR = MovingAverage(AvgType, TrueRange(h, c, l), nATR);
def UP = hl + (AtrMult * ATR);
def DN = hl + (-AtrMult * ATR);
def S = if c < S[1]
then Round(UP / tickSize(), 0) * tickSize()
else Round(DN / tickSize(), 0) * tickSize();
plot ST = if c > S then 1 else 0;
}
def cl = close;
def x = isNaN(cl[2]) and !isNaN(cl[3]);
def FirstAgg = ST(agg = agg1, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType);
plot FirstAggPlot = if isNaN(cl)
then double.nan
else 1;

FirstAggPlot.SetStyle(Curve.Points);
FirstAggPlot.SetLineWeight(3);
FirstAggPlot.AssignValueColor(if FirstAgg == 1
then color.green
else color.red);

AddChartBubble(x, 1, (agg1/1000/60) + " min", color.white, yes);
def SecondAgg = ST(agg = agg1, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType);
# End Code ST MTF
 
Last edited:
Thank you.

Yes, I'm looking for a way to expand the size of the scanner bubble or a way to insert a line above the scanner bubble... so it becomes more visible.

And I found the link you provided to adjust the "expansion" space (up or down) only affects the way a stock price is displayed on your screen. So that will not apply here unless I'm missing something?

The scanner bubble row can be moved into the price window pane on Thinkorswim, but no matter how I manipulate the scanner bubble 5minute scrite in Thinkorswim I always get a half-bubble, because it's too close to the margin.

I also don't think there is a way to increase the size of "just" the bubble so I can see more of it in the chart, but if there is then that might work. Can anyone tell me how to do that in the code provided above?

PS
Since this thread is now talking aobut "Bubbles" I would like ot point out there are two types of bubbles I am trying to format differently:

#1) The Superscript Bubble in post #1 deals with the positon of the larger bubble that overlaps the moving price candles of a stock minute-by-minute.

#2) The Superscript Scanner Bubble-Row in the script posted in #9 above is a 5min row of bubbles that represents the market trend (showing red or green bubbles in a single row) and these bubbles get cut in half when I paste the scripe into Thinkorswim. So I am asking for an edit to wither print out an empty row above the bubble or option B might be this script gets edited to product larger bubbles, which will no doubt get cut in half, but I'm thinking I will then see more of the bubble. (Maybe???)

So if anyone can help me format these bubbles better I think this will improve the functionality of these scripts very much!

I'm having troubles uploading a html picture but...

The link below will show you a picture of what I'm talking about.

https://www.flickr.com/gp/196664859@N04/Q7L4oj2E12
 
Last edited:
@Waikiki Daddy O


It is not clear what you are asking for in the rest of your post. Your image has no bubbles.
  1. Please provide a written detailed explanation and an image that you have marked up with exactly what you are trying to do.
  2. Please provide a chart link so members can properly adjust your chart axis settings .
Unsure of how to upload screenshots to the forum, Here are directions.
 
That was a good tip... to expand the window, but with my 27" monitor I like to have 2 charts visible, and that is causing the row of scanner bubble to get "clipped". I can still see them BTW, but I wanted to make them more noticable.

Also, this 5-min scan row of bubbles has the option to select either Hall or Simple or Expodential or Wilders. So what I did is to put on 5min row of scan bubbles based on Hall in one subwindow below my price chart; and then I put a second row of 5min scan bubbles based on Simple (averages) in a lower pain; and I noticed there than the 2 rows flash the same color (red or greee) at the same time that looks like a conformation of the trend; and validates the entry or exit points when the RSI is above 80 or below 20.

Next: I'm still having problems creating html files from captured .jpg images. I use to just upload a picture to a photo book like Flickr or photobucket and then select the option to download the html pointer (url), but now you have pay for a subscription.

Why can't this forum, like other forum sites, upload a .jpg? ...Or be able to drag and drop a .jpg directly in to the body of a post instead of uploading it as an attachment? (No disrespects. I have no idea if this costs a lot of money to buy a license or if there are other good reasons. However, I have given up on trying to upload html file locations in this forum.

I was able to produce this url, but I don't know if other forum members can see it? If so, you can see what I mean by "clipped" scan row bubbles showing either red or green trends, by clicking on this url? https://www.flickr.com/gp/196664859@N04/Q7L4oj2E12
 
That was a good tip... to expand the window, but with my 27" monitor I like to have 2 charts visible, and that is causing the row of scanner bubble to get "clipped". I can still see them BTW, but I wanted to make them more noticable.

Also, this 5-min scan row of bubbles has the option to select either Hall or Simple or Expodential or Wilders. So what I did is to put on 5min row of scan bubbles based on Hall in one subwindow below my price chart; and then I put a second row of 5min scan bubbles based on Simple (averages) in a lower pain; and I noticed there than the 2 rows flash the same color (red or greee) at the same time that looks like a conformation of the trend; and validates the entry or exit points when the RSI is above 80 or below 20.

Next: I'm still having problems creating html files from captured .jpg images. I use to just upload a picture to a photo book like Flickr or photobucket and then select the option to download the html pointer (url), but now you have pay for a subscription.

Why can't this forum, like other forum sites, upload a .jpg? ...Or be able to drag and drop a .jpg directly in to the body of a post instead of uploading it as an attachment? (No disrespects. I have no idea if this costs a lot of money to buy a license or if there are other good reasons. However, I have given up on trying to upload html file locations in this forum.

I was able to produce this url, but I don't know if other forum members can see it? If so, you can see what I mean by "clipped" scan row bubbles showing either red or green trends, by clicking on this url? https://www.flickr.com/gp/196664859@N04/Q7L4oj2E12

This combines both aggs and avgtypes into one script. You have options to show plots and bubbles, as well, as an optional summary line that will show where the 2 agg's avgtypes are in agreement. All 3 are shown in the image below with the lower pane as small as TOS allows.

Screenshot-2022-10-11-164242.png
Ruby:
# Superscript Scanner Script_5min_Hull

declare lower;

script ST{
input agg = AggregationPeriod.Five_Min;
input AtrMult = .70;
input nATR = 4;
input AvgType = AverageType.HULL;


def Fh = FundamentalType.High;
def Fl = FundamentalType.Low;
def Fc = FundamentalType.Close;
def Fhl2 = FundamentalType.HL2;
def h = Fundamental(Fh, period = agg);
def l = Fundamental(Fl, period = agg);
def c = Fundamental(Fc, period = agg);
def hl = Fundamental(Fhl2, period = agg);
def ATR = MovingAverage(AvgType, TrueRange(h, c, l), nATR);
def UP = hl + (AtrMult * ATR);
def DN = hl + (-AtrMult * ATR);
def S = if c < S[1]
then Round(UP / tickSize(), 0) * tickSize()
else Round(DN / tickSize(), 0) * tickSize();
plot ST = if c > S then 1 else 0;
}

input show_bubbles_first_second = yes;
input show_plots_first_second  = yes;
input show_bubble_summary = no;
input show_plot_summary   = yes;

def cl = close;
def x = show_bubbles_first_second and isNaN(cl[2]) and !isNaN(cl[3]);
input agg1 = AggregationPeriod.Five_Min;
input AtrMult = .70;
input nATR = 4;
input AvgType1 = AverageType.Simple;
def FirstAgg = ST(agg = agg1, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType1);
plot FirstAggPlot = if isNaN(cl)
then double.nan
else .5;

FirstAggPlot.SetStyle(Curve.Points);
FirstAggPlot.SetLineWeight(3);
FirstAggPlot.AssignValueColor(if FirstAgg == 1
then color.green
else color.red);
firstaggplot.sethiding(!show_plots_first_second);
AddChartBubble(x, .5, "S: "+(agg1/1000/60) + " min", color.white, yes);

input agg2 = aggregationPeriod.FIVE_MIN;
input avgtype2 = averageType.Hull;
def SecondAgg = ST(agg = agg2, AtrMult = AtrMult, nATR = nATR, AvgType = AvgType2);
plot SecondAggPlot = if isNaN(cl)
then double.nan
else 1;

SecondAggPlot.SetStyle(Curve.Points);
SecondAggPlot.SetLineWeight(3);
SecondAggPlot.AssignValueColor(if SecondAgg == 1
then color.green
else color.red);
secondAggPlot.sethiding(!show_plots_first_second);

AddChartBubble(x, 1, "H: "+(agg2/1000/60) + " min", color.white, yes);


plot summary = if isnan(cl) then double.nan else 1.5;
summary.SetStyle(Curve.Points);
summary.setlineWeight(3);
summary.assignvalueColor(if firstagg+secondagg==2 then color.green else if firstagg+secondagg==0 then color.red else color.black);
summary.sethiding(!show_plot_summary);

AddChartBubble(show_bubble_summary and isNaN(cl[2]) and !isNaN(cl[3]), 1, "Summary" +(agg1/1000/60) + " min", color.white, yes);

# End Code ST MTF
 
SleepyZ: Thank you very much for sharing your code. It ran very well, and I like the name: yes_no_yes.

I can also understand the Hull Scan Row and the Simple Scan Row, but I need your help to explain the 3rd scan row?

a) What is that unmark row (label) based on?
b) And what does gap in this 5-min scan row imply? ...Maybe indecision on the yes_no_yes_no level signaling the trend can go either way?

Separately, I'm having trouble uploading .jpg images to this forum; so I'm wondering if you have some quick tips on where I can store a .jpg image for free, presumably in a website photo book, which then allows me to copy the html file location (url) I can uplod to this forum... to product visible pictures like you did above? Thanks!
 
This combines both aggs and avgtypes into one script. You have options to show plots and bubbles, as well, as an optional summary line that will show where the 2 agg's avgtypes are in agreement. All 3 are shown in the image below with the lower pane as small as TOS allows.
SleepZ, you replied to MLlalala on the Zig Zag High Low Stats thread last month regarding removing the bubbles for highs and lows on the ZZ indicator. You replied with a new code that took away the bubbles and left the price and this is where I need your help. I have a prior candle high low indicator which posts the prior candle's high and low price with a bubble to the right of the current candle. My question/request from you is would it be possible to remove the bubbles like you did with the ZZ and just have the high low price posted in the same position? I really like this indicator however the bubbles are large and distracting. I posted this request on the original Zig Zag thread but it was moved over to the Previous Candle High Low Bubbles thread: https://usethinkscript.com/threads/previous-candle-high-low-labels-bubbles-for-thinkorswim.10422/
I can repost the code here for you to look at or where ever is convenient for you. Any help with this from you would be greatly appreciated.
Thanks again


"MLlalala said:
is it possible to modify the presentation, instead of showing bubbles, can make it just numbers like the presentation of sequencial indicator in TOS?"
 
SleepyZ: Thank you very much for sharing your code. It ran very well, and I like the name: yes_no_yes.

I can also understand the Hull Scan Row and the Simple Scan Row, but I need your help to explain the 3rd scan row?

a) What is that unmark row (label) based on?
b) And what does gap in this 5-min scan row imply? ...Maybe indecision on the yes_no_yes_no level signaling the trend can go either way?

Separately, I'm having trouble uploading .jpg images to this forum; so I'm wondering if you have some quick tips on where I can store a .jpg image for free, presumably in a website photo book, which then allows me to copy the html file location (url) I can uplod to this forum... to product visible pictures like you did above? Thanks!
The 3rd line is a Summary of the 2 lines below it. When the colors of the 2 lines are in agreement the 3rd line will plot that color. If they are not in agreement then the color is black (meant to designate a blank). This was provided as you indicated above how you use the 2 colors " and I noticed there than the 2 rows flash the same color (red or greee) at the same time that looks like a conformation of the trend; and validates the entry or exit points when the RSI is above 80 or below 20.'
 
SleepZ, you replied to MLlalala on the Zig Zag High Low Stats thread last month regarding removing the bubbles for highs and lows on the ZZ indicator. You replied with a new code that took away the bubbles and left the price and this is where I need your help. I have a prior candle high low indicator which posts the prior candle's high and low price with a bubble to the right of the current candle. My question/request from you is would it be possible to remove the bubbles like you did with the ZZ and just have the high low price posted in the same position? I really like this indicator however the bubbles are large and distracting. I posted this request on the original Zig Zag thread but it was moved over to the Previous Candle High Low Bubbles thread: https://usethinkscript.com/threads/previous-candle-high-low-labels-bubbles-for-thinkorswim.10422/
I can repost the code here for you to look at or where ever is convenient for you. Any help with this from you would be greatly appreciated.
Thanks again


"MLlalala said:
is it possible to modify the presentation, instead of showing bubbles, can make it just numbers like the presentation of sequencial indicator in TOS?"

See if this helps

Screenshot-2022-10-11-164242.png
Ruby:
#Previous Candle High/Low Labels & Bubbles ALL IN ONE
#By Wiinii: https://usethinkscript.com/threads/previous-candle-high-low-labels-bubbles-for-thinkorswim.10422/
#(change color/transparency under Globals)

#Previous Candle High/Low Labels
Input ShowPreviousCandleHighLabel = yes;
Input ShowPreviousCandleLowLabel = yes;
DefineGlobalColor("PCH_Label", Color.LIGHT_GREEN);
DefineGlobalColor("PCL_Label", Color.PINK);
AddLabel(ShowPreviousCandleLowLabel, Concat ("PCL=", Round(low[1])), GlobalColor("PCL_Label"));
AddLabel(ShowPreviousCandleHighLabel, Concat ("PCH=", Round(high[1])), GlobalColor("PCH_Label"));

#Current Candle High/Low Labels
Input ShowCurrentCandleHighLabel = yes;
Input ShowCurrentCandleLowLabel = yes;
DefineGlobalColor("CCH_Label", Color.LIGHT_GREEN);
DefineGlobalColor("CCL_Label", Color.PINK);
AddLabel(ShowCurrentCandleHighLabel, Concat ("CCL=", Round(low)), GlobalColor("CCL_Label"));
AddLabel(ShowCurrentCandleLowLabel, Concat ("CCH=", Round(high)), GlobalColor("CCH_Label"));

#Previous Candle High/Low Bubbles
Input ShowPreviousCandleHighBubble = yes;
Input ShowPreviousCandleLowBubble = yes;
input bubblemoversideways = -2;
def b = bubblemoversideways;
def b1 = b + 1;
input bubblemoverupdown = 3;
DefineGlobalColor("PCH_Bubble", Color.LIGHT_GREEN);
DefineGlobalColor("PCL_Bubble", Color.PINK);
Addchartbubble(ShowPreviousCandleHighBubble and !isnan(close[b1]) and isnan(close), high[b1+1], "" +round(high[b1+1]) + "", GlobalColor("PCH_Bubble"));
Addchartbubble(ShowPreviousCandleLowBubble and !isnan(close[b1]) and isnan(close), low[b1+1], "" +round(low[b1+1]) + "", GlobalColor("PCL_Bubble"));

def lastbar = highestall(if isnan(close[-1]) and !isnan(close) then barnumber() else double.nan);
plot h= if between(barnumber(), lastbar-1,lastbar) then high else double.nan;
h.setpaintingStrategy(paintingStrategy.VALUES_ABOVE);
plot l= if between(barnumber(), lastbar-1,lastbar) then low else double.nan;
l.setpaintingStrategy(paintingStrategy.VALUES_bELOW);
 
See if this helps
Outstanding SleepZ, that's almost exactly what I need. Would it be possible to move the numbers right of current and past candles? Or maybe move them each higher and lower than their current positions on the top and bottom of each candle? I tried playing with the paintingStrategy scripts by taking out the VALUES and replacing them with ".horizontal" but that only gave me lines across the top and bottom of prior and current candles. Also I really do not need the current candle's High, Low values displayed, but anyway to make that an on/off option? Again thank you very much for the help with this.
 
Outstanding SleepZ, that's almost exactly what I need. Would it be possible to move the numbers right of current and past candles? Or maybe move them each higher and lower than their current positions on the top and bottom of each candle? I tried playing with the paintingStrategy scripts by taking out the VALUES and replacing them with ".horizontal" but that only gave me lines across the top and bottom of prior and current candles. Also I really do not need the current candle's High, Low values displayed, but anyway to make that an on/off option? Again thank you very much for the help with this.
You can use the input offset to move the prices to other candles, but it may not provide the values you want. Otherwise, I do not know of any way to move them as they are boolean values.
Ruby:
#Previous Candle High/Low Labels & Bubbles ALL IN ONE
#By Wiinii: https://usethinkscript.com/threads/previous-candle-high-low-labels-bubbles-for-thinkorswim.10422/
#(change color/transparency under Globals)

#Previous Candle High/Low Labels
Input ShowPreviousCandleHighLabel = yes;
Input ShowPreviousCandleLowLabel = yes;
DefineGlobalColor("PCH_Label", Color.LIGHT_GREEN);
DefineGlobalColor("PCL_Label", Color.PINK);
AddLabel(ShowPreviousCandleLowLabel, Concat ("PCL=", Round(low[1])), GlobalColor("PCL_Label"));
AddLabel(ShowPreviousCandleHighLabel, Concat ("PCH=", Round(high[1])), GlobalColor("PCH_Label"));

#Current Candle High/Low Labels
Input ShowCurrentCandleHighLabel = yes;
Input ShowCurrentCandleLowLabel = yes;
DefineGlobalColor("CCH_Label", Color.LIGHT_GREEN);
DefineGlobalColor("CCL_Label", Color.PINK);
AddLabel(ShowCurrentCandleHighLabel, Concat ("CCL=", Round(low)), GlobalColor("CCL_Label"));
AddLabel(ShowCurrentCandleLowLabel, Concat ("CCH=", Round(high)), GlobalColor("CCH_Label"));

#Previous Candle High/Low Bubbles
Input ShowPreviousCandleHighBubble = yes;
Input ShowPreviousCandleLowBubble = yes;
input bubblemoversideways = -2;
def b = bubblemoversideways;
def b1 = b + 1;
input bubblemoverupdown = 3;
DefineGlobalColor("PCH_Bubble", Color.LIGHT_GREEN);
DefineGlobalColor("PCL_Bubble", Color.PINK);
Addchartbubble(ShowPreviousCandleHighBubble and !isnan(close[b1]) and isnan(close), high[b1+1], "" +round(high[b1+1]) + "", GlobalColor("PCH_Bubble"));
Addchartbubble(ShowPreviousCandleLowBubble and !isnan(close[b1]) and isnan(close), low[b1+1], "" +round(low[b1+1]) + "", GlobalColor("PCL_Bubble"));

def lastbar = highestall(if isnan(close[-1]) and !isnan(close) then barnumber() else double.nan);
input offset = 1;
plot h= if between(barnumber(), lastbar-1-offset,lastbar) then high[-offset] else double.nan;
h.setpaintingStrategy(paintingStrategy.VALUES_ABOVE);
plot l= if between(barnumber(), lastbar-1-offset,lastbar) then low[-offset] else double.nan;
l.setpaintingStrategy(paintingStrategy.VALUES_bELOW);
 
Last edited:

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
246 Online
Create Post

Similar threads

Similar threads

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