Indicator details / description block

KingsOp

New member
VIP
When you build an indicator is there a bit in the coding that would allow you to include a description of the indicator, its functions, and options as you designed them to work? The default indicators in TOS all have a description of that sort and I'd like to be able to write one and code it into the settings area where changes to parameters can be made. Thank you in advance for your assistance.
 

halcyonguy

Active member
VIP
you can add comments in the code by using # as the first character of a code line, followed by your words to describe the code.

------------

you can use #hint to add a clickable '?' , that will open a message window. some html formatting is allowed.

if #hint is not followed by a variable name , then the ? Will appear next to the study name when looking at a list of studies.

if #hint is followed by a variable name AND a : the ? will appear in the edit studies input screen.

ex.
input startTime = 820;
#hint startTime: start time in EST 24-hour time

#hint can be placed after a code line. i put the example above on a new line to make it easier to read.

https://tlc.thinkorswim.com/center/...pendices/Appendix-C---Customizing-Study-Hints

https://jshingler.github.io/TOS-and-Thinkscript-Snippet-Collection/TOS & Thinkscript Collection.html#add-info-bubbles-to-a-study-or-a-study-s-inputs

-------------

assert
display the ! in top left corner of a chart, when assert() checks a condition that is false.

clicking on ! will display one or more error messages. I tend to overlook and miss these, so I never use it. If I check a condition, then I would have a label display a message in a bright color.

https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Others/Assert
 
Last edited:

KingsOp

New member
VIP
you can add comments in the code by using # as the first character of a code line, followed by your words to describe the code.

------------

you can use #hint to add a clickable '?' , that will open a message window. some html formatting is allowed.

if #hint is not followed by a variable name , then the ? Will appear next to the study name when looking at a list of studies.

if #hint is followed by a variable name AND a : the ? will appear in the edit studies input screen.

ex.
input startTime = 820;
#hint startTime: start time in EST 24-hour time

#hint can be placed after a code line. i put the example above on a new line to make it easier to read.

https://tlc.thinkorswim.com/center/...pendices/Appendix-C---Customizing-Study-Hints

https://jshingler.github.io/TOS-and-Thinkscript-Snippet-Collection/TOS & Thinkscript Collection.html#add-info-bubbles-to-a-study-or-a-study-s-inputs

-------------

assert
display the ! in top left corner of a chart, when assert() checks a condition that is false.

clicking on ! will display one or more error messages. I tend to overlook and miss these, so I never use it. If I check a condition, then I would have a label display a message in a bright color.

https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Others/Assert
Thank you. Exactly what I was looking for.
 

Similar threads

Top