# Thinkscript for IBD stuff

**URL:** <https://discussion.fool.com/t/thinkscript-for-ibd-stuff/111912>\
**Category:** Technical Trader's Sanctuary\
**Created:** [January 3, 2025, 5:28pm UTC](https://discussion.fool.com/t/thinkscript-for-ibd-stuff/111912 "2025-01-03T17:28:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lakedog](https://sea2.discourse-cdn.com/motleyfoolfree/user_avatar/discussion.fool.com/lakedog/32/10058_2.png) [@Lakedog](https://discussion.fool.com/u/Lakedog)\
**Post date:** [January 3, 2025, 5:28pm UTC](https://discussion.fool.com/t/thinkscript-for-ibd-stuff/111912/1 "2025-01-03T17:28:48Z")

</div>

I know I’ve commented on it before, but there is a great website for those who use TOS and fool-around with thinkscript called [Usethinkscript.com](http://Usethinkscript.com). I was looking through some code the other day and ran across some coding for Market Schools approach to the markets. Let me be clear, I am not a market school graduate nor have I studied it in depth. But it’s been around for more than a decade or so and if you hang around enough street corners, you get flashed enough with comments and descriptions to gain a bit of an understanding.

UT2Pro1689 started a conversation sharing a code to determine and label market school days (Rally day, distribution days, buy and sell signals, etc). It’s in the non-VIP member section, so I do believe it’s fair game to post here. It’s a longer thread with multiple other references and comments on using IBD criteria in TOS so worth the read.

> **[IBD Distribution Days Study for ThinkOrSwim - useThinkScript Community](https://usethinkscript.com/threads/ibd-distribution-days-study-for-thinkorswim.748/)**
>
> Anyone have a study that counts / calcs IBD distribution days for an index? Looking for something like:
> ((If todays close \< (yesterdays close \* .98) and (todays volume \> yesterdays volume) (then distribution day)))
> And if index rises 5%...

The main script gives you this graph.

 ![image](https://us1.discourse-cdn.com/motleyfoolfree/original/3X/3/2/328c0e23e07bdf15651a6d7e0dc8cf2ccaf04740.png)

I can not attest to any accuracy nor true utility of such, but find it interesting. My understanding of the market school approach is to define market conditions and uses a point system to recommend position exposure levels. Therefore, the intended use is on indices such as NASDAQ, S&P, NY exchange, etc, not individual stocks. However, not sure why this couldn’t be used on individual stocks and it provides a simple means to do so. Also, the overall script can be parsed and used to create scans or watchlist columns for specific days like Rally days or Follow-through days, etc.

Just putting this out there for anyone to explore. Love to hear if anyone uses it or finds/adapts it for similar coding.

Happy hunting in 2025,  
Lakedog

PS If using it on candles bothers you, you can always make it more IBD like:

 ![image](https://us1.discourse-cdn.com/motleyfoolfree/original/3X/9/5/95ad832918507e11b8001a7dd830ae5d983ddaf9.png)

PPS Meant to add, I would encourage anyone interested in understanding market school approach better to actually read through the script as it is full of coding comments (lines that start with #) that discuss and describe a lot of the details. I typically copy the script and paste in a Word document to read and understand the coding better but in this case, the discussion is worth it.

---

<div class="post-metadata">

**Author:** ![PuddinHead42](https://sea2.discourse-cdn.com/motleyfoolfree/user_avatar/discussion.fool.com/puddinhead42/32/3272_2.png) [@PuddinHead42](https://discussion.fool.com/u/PuddinHead42)\
**Post date:** [January 6, 2025, 2:59am UTC](https://discussion.fool.com/t/thinkscript-for-ibd-stuff/111912/2 "2025-01-06T02:59:08Z")

</div>

> [@Lakedog](#):
>
> However, not sure why this couldn’t be used on individual stocks and it provides a simple means to do so.

Lake, great find, thanks. One day I might really learn TOS and use it!

Re: individual stocks. I think they are too easily manipulated and Bill wants to know what the overall market sentiment, then look at individual stocks with different criteria, like bases, and trend lines. Someone with time might test it against last year’s top 10 winners and see if there is a pattern that gets you in early 😉

---

<div class="post-metadata">

**Author:** ![PuddinHead42](https://sea2.discourse-cdn.com/motleyfoolfree/user_avatar/discussion.fool.com/puddinhead42/32/3272_2.png) [@PuddinHead42](https://discussion.fool.com/u/PuddinHead42)\
**Post date:** [January 6, 2025, 3:02am UTC](https://discussion.fool.com/t/thinkscript-for-ibd-stuff/111912/3 "2025-01-06T03:02:02Z")

</div>

> [@Lakedog](#):
>
> if you hang around enough street corners, you get flashed enough with comments and descriptions to gain a bit of an understanding.

I have collected 5 off street corners so far. You can search on [Investors.com](http://Investors.com) and find a couple, then Webby or Justin mention the rules on occasion.

 ![image](https://us1.discourse-cdn.com/motleyfoolfree/original/3X/0/e/0e7aa7ec784f675887a3483b906e758838057b91.png)

I have probably posted a few, but maybe I will start a thread, or maybe I vaguely remember starting a thread. Hmmm.
