below is my gallery of thinkscripts many of which are open source and free. that is, free for copy 'n pasting, but they only work on the thinkdesktop platform (also free from td ameritrade.) all that i ask is that you show me the courtesy of keeping the comments and notices of origin in the source code and by not reselling this software in part or whole.

if you don't want to hassle with copying and pasting the source code, which can be error-prone, then throw me a bone and i will email you the import files for all of these studies, plus a bonus study or two. 
strategies, chart studies, labels, custom columns

bonus studies sourced from elsewhere: 

  1. distanceFromMean - this is open source from, this script is used in their pairs trading setup.
  2. bbubbas - breadth bubbles - more open source via, this script displays advance/decline ratio in a chart label

bonus studies written by me:
sdi_avatod - average volume at time of day

bonus strategies written by me:
sdi_psarstgy_nq100 - the psar strategy preconfigured with optimized parameters for the nasdaq 100 stocks.

 my open source strategies:

aiSpy - artificial intelligence strategy for bullish trading on spy

sdi_altucher - altucher's strategy

sdi_halloween - seasonal strategy to buy in october and sell in may

sdi_hullmastrat - strategy to trade the hull moving average


sdi_seasonalstgy - p&l on $10k invested same trading day of the year

open source chart studies:

sdi_altbuy - altucher buy signal study suitable for custom scan.

sdi_autofib - displays fib retracements between chart high/low

(note: this image demonstrates my sideline option which is available on all my chew toys that display price levels, such as sdi_open, sdi_yesterclose, etc.)

sdi_hivdelta - plots the difference between historical and implied volatility

sdi_hivol - highlight high volume days

sdi_itsig - lower composite study of investool arrow signals

sdi_impvol - implied volatility plot with improvements.

sdi_ma - moving average + additional indicators

sdi_mfc - marketForecast with overbought/sold lines

sdi_open - shows open price level of cash market.
(with sideline option)

sdi_openrange - display opening range levels
(with sideline option)

sdi_passive - growth of 10K investment

(deprecated) sdi_seapro5 - Five Season Projection Of Price

sdi_seaproj - seasonal projection of price from user specified number of seasons

sdi_yearClose - Display Last Year's Closing Price
(with sideline option)

sdi_yesterClose - Yesterday's closing price on today's intraday chart.
(with sideline option)

sdi_yesterrange - overlay yesterdays price range on today's intraday chart
(with sideline option)

open source chart labels:

sdi_atr - average true range in a chart label

sdi_csl_label - shadow trader core sector list up/down count

 sdi_flow - money flow index in a chart label

sdi_ivp - iv percentile in a chart label

sdi_yield_label - show a stocks yield in a chart label

open source custom watchlist columns and scans

sdi_lastpps - study that latches last pps signal for multiple timeframe scans

sdi_pctChgFromOpen - custom column that displays the percentage change from the opening price

sdi_tde - display trading days before earnings in a custom column


  1. Do you do any custom thinksscript?

    1. yes, email me at

  2. How can I add your Percent Change since Open to a TOS scan? I need a scan to show the top 10 Stocks (by percent gain or loss) since the open ( within price and volume parameters of course.

  3. Add a custom filter with the sdi_pctChgFromOpen(). You will need a funded account to add a study filter.

  4. This is SO awesome! Thank you so much for sharing all this. I found your site through a search that returned your aiSpy indicator, and the rest... well, there's so much to explore!!! Thank you.


Note: Only a member of this blog may post a comment.