Using 1 Line of Code to Scan for Multiple Breakouts Signs | thinkScript Studies on thinkorswim
Education
Introduction
Welcome everyone! It's great to have you here today with us on Thanks Scripting. We've seen some markets recently break higher, above highs this week. I want to talk about the concept of using thinkScript to help us spot recent breakouts, which could normally be comprised of complex strategies. However, I'll show you ways to simplify it and make it easier to build that code by using an indicator. Let's dive into that in just a moment.
Introduction to Breakout Strategies
Here's a look at the Russell. We saw the Russell break out along that long-term range over here. When the Russell breaks out folks, with 2000 companies, there are likely a fair number of stocks you might want to look at. However, sorting through 2000 stocks can be quite a task. Therefore, using thinkScript can help make this easier for us and bridge that gap.
Every time we try to create a goal or something we want to see on a chart, such as spotting breakouts, we take structured steps. For example, with the NASDAQ 100, there have been stocks recently breaking above highs, matching our objective.
The Initial Complex Strategy
Initially, my approach was more complex. Here’s the first script I built this week, highlighting its longer lines of code. However after going through it and analyzing various parts, I realized it could be drastically simplified.
The initial script aimed at identifying the highest highs between a month to two months back, marking breakouts precisely. It encompassed multiple parameters and references, ensuring that any breakout was higher than previous highs, thus ensuring a strong breakout momentum.