Display time for high of day / low of day on chart


Tags:
Category:
0
0

Hello Pete,

I know it’s easy to have ToS display the high of day and low of day bubbles on the chart (Chart setting/ General/…). But is it also possible to display in the bubble the time of day when that high or low occurs?

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on August 29, 2020 4:34 pm
548 views
0
Private answer

This is extremely difficult to do in Thinkorswim because the language has very limited tools available to parse date/time data. The following link provides the details for the GetTime() function, which would be the tool used for your solution:

https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Date---Time/GetTime

You will find the output is in milliseconds. Which means you would need to add many additional lines of code to parse that output value to individual components such as year, month, day, hour and second. Then you would need to take each of those separate values and concatenate them into a text string within the AddChartBubble() function.

Royal pain in the butt. Well beyond the scope of what I can provide in the brief 15 minutes I allow for free solutions in the Q&A forum.

Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on August 29, 2020 5:19 pm