The following arithmetic opeators are available in thinkscript®:

Operator Description
+ addition, string concatenation
- subtraction
* multiplication
/ division
% remainder

All arithmetic operators are binary. Note that "+" operator is used for string concatenation, see Example 2 for details.

Example 1

declare hide_on_intraday;
AddChartBubble(getDay() % 20 == 5, high, concat("Day ", getDay()));

Draws a cloud near the 5th, 25th, 45th, etc., day of the year.

Example 2

addchartBubble(yes, 0, "hello" + "world");

This example string will add a chart bubble with specified text composed of two strings concatenated.