WebTOS & ThinkScript Collection - Jim Shingler Blog WebOct 5, 2024 · 2 Answers Sorted by: 1 As noted by @Gary, thinkScript has no debugger tool. You can use chart bubbles, as Gary suggested, and chart labels. Chart bubbles appear at a specified bar when a condition is met. Chart labels appear at the upper left of the chart when a condition is met. Syntax Notes:
thinkScript AddChartBubble Function (With Examples)
WebHere is an example: def data1 = Ceil (Double.E); def data2 = Floor (Double.E); def data3 = RoundUp (Double.E, 3); def data4 = RoundDown (Double.E, 3); def data5 = Round (Double.E, 3); In this script, Euler's number is rounded using five different algorithms, thus the results will be different. WebNov 25, 2015 · Example 2 input price = close; input length = 9; plot SMA = (fold n = 0 to length with s do s + getValue(price, n, length - 1)) / length; Calculates the simple moving average using fold. Example 3 plot NextHigh = fold i = 0 to 100 with price = Double.NaN while IsNaN(price) do if getValue(high, -i) > 40 then getValue(high, -i) else Double.NaN ... streaming tv with insp
thinkScript plot() Function (With Examples) - thinkScript101
thinkScript Fold Function (With Examples) October 12, 2024 The Fold function in thinkScript can be used to iterate over a list of data points and perform a calculation on each point. Contents show thinkScript Fold Syntax def = fold = to [ with [ = ] ] [ while ] … See more def = fold = to [ with [ = ] ] [ while ] do ; The indexvariable operates as a loop counter. See more Several knowledgeable developers in the thinkScript community have written about the Fold function. If you’re interested in learning more, check … See more The following examples and snippets are helpful for anyone who wish to experiment with the thinkScript fold function. All credit goes to its respective … See more WebApr 3, 2024 · Thinkscript fundamentals can be seen as your basic building blocks. For example, in the opened script screen you can change the green “close” into an “open” to … WebJan 23, 2024 · I've tried that but the language, ThinkScript, doesn't allow it. It believes every time it goes through the fold (a type of loop) the then statement is executed as 0 + 1. Not uppercount = uppercount + 1. This leads to it displaying 1 and 0 not a compounded number. streaming tv with food network