

This function defines what kind of simulated order should be added on what condition.

Strategies can be created the same way as studies, however, they must contain the AddOrder function. Strategies are technical analysis tools that, in addition to analyzing data, add simulated orders to the chart so you can backtest your strategy. Go to Charts -> Studies -> Edit Studies… -> Create… This will open thinkScript® Editor more information here. There are several ways you can use thinkScript® in thinkorswim: If you already know how to create a script but are unsure what function or constant to use, you can find descriptions of all the thinkScript® building blocks: functions, constants, declarations, operators, and reserved words. Each tutorial comes with a quiz so you can check your knowledge. We suggest you start with a set of tutorials we’ve prepared for you.

You are even able to combine many technical indicators in one by referencing them in your code or just using functions that represent the most popular studies such as simple or exponential moving average. Functions present in this programming language are capable of retrieving both market and fiscal data and provide you with numerous techniques to process it. In thinkScript®, you decide which kind of data to analyze with which methods. ThinkScript® is a built-in programming language that gives you the capability of creating your own analysis tools such as studies, strategies, watchlist columns, etc.
