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:
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.
I tried a bunch of "input" combinations and nothing moved the numbers any direction. I even went back to the Bubble inputs and tried changing all of those to either value or price to see if I could get some kind of change in the Bubbles themselves but luck with that either. Obviously I don't know this code. Are the Bubbles here also boolean values?
 

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

I tried a bunch of "input" combinations and nothing moved the numbers any direction. I even went back to the Bubble inputs and tried changing all of those to either value or price to see if I could get some kind of change in the Bubbles themselves but luck with that either. Obviously I don't know this code. Are the Bubbles here also boolean values?

In the image the upper chart is input offset == 0 and the bottom image is input offset == 1. The numbers have been moved 1 bar to the left in the bottom panel.

Screenshot-2022-10-12-170515.png
 
In the image the upper chart is input offset == 0 and the bottom image is input offset == 1. The numbers have been moved 1 bar to the left in the bottom panel.
Don't know what I am doing wrong but I am keeping the "input offset" at the same line location as from your first reply to me. But adding "= =" gets me a invalid statement and I can't go any further (number amount doesn't matter either)? Taking out one of the "=" signs stops the invalid but doesn't do anything for the numbers over the candle (as before). Again no matter what number I put next to the input offset?
 
Don't know what I am doing wrong but I am keeping the "input offset" at the same line location as from your first reply to me. But adding "= =" gets me a invalid statement and I can't go any further (number amount doesn't matter either)? Taking out one of the "=" signs stops the invalid but doesn't do anything for the numbers over the candle (as before). Again no matter what number I put next to the input offset?

This link has the code set to offset of 1 http://tos.mx/OkPNRoC
 
This link has the code set to offset of 1 http://tos.mx/OkPNRoC
Thank you again Sleep, that works as you say which is odd because when I manually put in the code nothing happens. When I find the time I going to play with this some more to see if I can get rid of the second number and just have the prior to current price candle values. The 1 offset kinda gives me that now so I can at least use this as it is. Again thanks for the help.
 
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

reply to post13 , images

why not allow posting images? probably because it takes a lot of disk space to store them. hardware costs money. backups cost money. it is so much simpler to just host a bunch of text posts.

follow this link. read the post and follow the link within
https://usethinkscript.com/threads/how-to-insert-image-in-a-post-thread.277/page-3#post-98334
ZZqide2.jpg
 
Thank you all.

I signed up for https://imgur.com/ to upload pictures and it looks like you can easly join, upload and image, and copy a plublc url for others to view. However, I must say, that all of these photo book websites take a little trial-and-error work to figure out how to move your uploaded images to an "album" and then you can copy the pubic url into this forum website.

Note: After you publish your thread with the url the forum will display the image. Also, it's helpful if you edit the picture size to something smaller for easy viewing.

For example: Here's how the origional script looks for a group of 5, 10, 15, 30 and 60 minute bubbles:
However, I was only interested in the 5-minute row, so I edited the code to produce this look:
...but as you can see the 5-min-scan row hugs the upper margin (in the bottom window),
...further, if you have 2 windows open in ThinkorSwim then this row will appear to cutoff a portion of the bubbles, but likely it's only because 2 windows open at the same time causes a scaling problem that looks like the top of the bubbles are being cutoff.

In the first picture you can see how the BUY-SELL-BUBBLE-SCRIPT overlaps the candles and interferes with viewing the next realtime candle forming. So this is not good. To solve that problem I moved this script to a "lower window" in TOS and I will share that picture with you the next time I log-in.

Back to the 5-min-scan-row. To my knowledge you can't get a 1-min-scan row of bubbles. However, if someone knows how to edit the code to produce a faster moving, 1-minute sample, please share it with us. Thank you.
 
Last edited:
A) My complaint about using the Buy-Sell Bubble Superscript, overlapping the newly forming stock candles, is solved by moving this script to a lower window. (See below.) This apprach takes up additional chart space, but I don't find that to be a problem.

B) Then I used the single 5min-Scan Row Bubble Superscanner script posted above, but I embedded it several times into the upper ThinkOrSwim window; and I also changed the parameter(s) to use Simple Moving Average on one row, and then I use the Hull parameter on another scan row. (See the Studies parameters in the second picture below.)

What I did not expect is this: The 3 scan rows appear across the whole window and overlap the candle sticks. And I could not figure out how to group them togeter. However, after a while I did not find this to be a problem. And I find it forces my eyes to study the Bollenger Bands more closly. On the other hand, overlapping 3 scan rows does make the chart does make it look a little busy.

I also use it to $DJI chart to help me see that trend more easily.

Other opinions:

* The stark nature of these scan rows keeps me from "fighting the trend." i.e., I wait for all green or all red scan rows to appear.

* Of course, I find almost every signal to be a lagging indicator, but in reality that lag may only be about 30 seconds to 1 or 2 minutes when you get used to comparing all the signals.

* These "signals" flash a bit in both directions when the market is trading sideways. So the solution to that is either to scalp or just don't trade.

* And most of the time I have learned to trust these signals. So, hopefully this chart format will help me become a better trend-trader. (TBD)

* And I like comparing these "signals" to the RSI and momentum graph to know which direction I want to go.

If you want to use this chart format as shown below, I think there is a way I can copy and paste the entire TOS embedded script, if I save it as a "default chart" however I have never done that. So maybe someone can explain that process so I can post it.

Otherwise, to build your own charts to look like (or something like) the chart below, it will take some experimenting to get the format you like.


 
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
181 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