♥ 0 |
Is there any command (or work around) to put a small text on the lower study? I have an MTF study which plots four lines for four timeframes. I would like to display a small text on each line to indicate the related timeframe (something similar to the way TOS displays % and Price on the Fibonacci level lines)
Thanks ‘Arun
Marked as spam
|
Private answer
Sorry we cannot print “small text” on any plots in Thinkorswim. The only way to print text labels on a chart plot is to use the AddChartBubble() function. You can read about it here: http://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Look—Feel/AddChartBubble.html Since they tend to get in the way of price action and make for a sloppy looking chart, it’s helpful to have a technique for turning them on and off through the user inputs. I think this post will give you the basics to enable you to implement it: https://www.hahn-tech.com/ans/alert-hi-low-v2/ TheAddChartBubble() function takes a true/false variable as it’s first argument. This tells the code on which bar(s) to place the bubbles. If set to ‘yes’, a chart bubble will be placed on every bar. If you want to plot the chart bubble on ONLY the last bar, you can use this:
Marked as spam
|
Please log in to post questions.
Couple things. The AddChartBubble statements always stands alone. It cannot be invoked from within an If/Then statement. All variables in Thinkscript must be in the form of numeric values. They can never be string (text) values.
From what I see you are trying to do I suggest this as the best option:
AddChartBubble(IsNaN(close) and !IsNaN(close[1]), 1, if Period3 == AggregationPeriod.DAY then “D” else “M”, Color.YELLOW, yes);
Thank you.