Attach Bubble to Specific Bar


Category:
0
0

I want to be able to attach a chart bubble or arrow to a specific bar.  For example,  I want to attach a bubble to the highest high in the last 21 bars.  I use recursion to find the highest high which gives me the bar count back.  I try to drop that into the AddChartBubble function for the Price Location as such, addchartBubble ( yes,high [Barcount], “H21”, color.green, yes); but the error message says, ‘Only constants expected here: Barcount CL function indexer of high at 19:28.’

Is there a way to convert this value to an integer and will that work?

Is there a way to identify a specific bar and attach an object like a bubble or arrow?

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on November 13, 2019 4:37 pm
492 views
0
Private answer

Without the rest of your code I can't do anything at all.

Try using this:

https://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Tech-Analysis/GetMaxValueOffset.html

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on November 13, 2019 4:51 pm