Saturday, August 10, 2013

thinkscript included: sdi_altbuy - altucher buy signal scanner.

i see that my altucher strategy posts are at the top of my best bones. the best bones are elected by pageviews thus i owe it to my readers to do more of that. so what i've decided to share with you today is a chart script that displays altucher buy signals (i.e. when 4 or more consecutively down days have occurred.)

here's an image of this study on a chart:
chart with sdi_altbuy

here is the study:
# sdi_altbuy:
#hint:Display a buy signal when the threshold number of consecutive down days has occurred. rev:1.0.0
# author: allen everhart
# date: 10aug2013
# copylefts reserved. This is free software. That means you are free
# to use or modify it for your own usage but not for resale.
# Help me get the word out about my blog by keeping this header
# in place.
input threshold = 4 ;
#hint threshold: Altucher's criterion for the buy signal is 4.
def dncnt = if close < close[1] then dncnt[1] + 1 else 0;
plot buy = dncnt >= threshold;


the real benefit of such a script is that it can be used in the scan tab to create a custom scan for altucher signals. this is because it has only one plot. studies with more than one plot statement are not permitted for custom study scans.

instructions for the custom scan for thinkorswim (note: you must have a funded account to create custom scans):
1. install the above chart script by the copy and paste method (or click on my how to tab to find out how to purchase the import files for my suite of scripts.)
2. click the scan tab
3. click the stock hacker button.
4. click the reset button.
5. delete the three fundamental criteria buy clicking on the x's on the right side of the screen.
6. click add study filter.
7. click the triangle to drop down the selection list and select custom. this should look like: the scanner custom filter dialogue click the edit button. the edit condition dialogue click the blue triangle and select the study category from the drop down list.
10. scroll the dropdown list of studies and select sdi_altbuy. this should look like:

11. click save then ok and then ok on the warning then scan. this should look something like:


  1. I installed and saves the chart script "adi_altbuy in TOS chart (studies/edit studies). Then I try to "custom" in custom scan but cannot see
    "adi_altbuy" in Lookup a study... dropdown list. Please advise how to fix it. (I have a funded account and am able to create custom scans)

    1. hi j, might you have saved the script as "sdi_altbuy" instead of "adi_altbuy" ?

  2. This comment has been removed by the author.