New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

Turtle Soup tech scan from MW 5/22

on the 5/21 & 5/22 Market Watchers Live, Julius presented a deep technical scan for 'Turtle Soup' from the book Street_Smarts by Connors, Larry and Raschke, Linda
I was hoping that @Julius_RRG was able to post the long scan code.
thanks

Comments

  • edited May 2018
    Hi Roy, I will post the scan here asap. When I was cleaning up the code after the show I ran into some unforeseen issues/error which I am tweaking/debugging atm. When it is ready I will post here and in the RRG blog as well.

    In such a long scan it is easy to misplace a few brackets and also I found out that {2-day ago} is something different than {2-dayS ago} ... :blush:

    Bear with me i am still an amateur SCANner :smiley:
  • Here is the scan code for the Turtle Soup BUY-setup which I discussed on MWL Monday and Tuesday of this week. I will write about it a bit more in an upcoming blog and then also use this scan in combination with RRGs.

    Let me know what you think.

    I am (still) an amateur scan coder so no warranties. Happy to hear your ideas and comments on any improvements or bugs that you may run into.

    ===================================

    [group is SP500]

    AND

    //this bracket encloses all the OR statements checking for 20-lows made 4 to 17 days prior to TODAY
    [

    // 20-days low 4 bars ago
    [[4 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)]] OR

    // 20-days low 5 bars ago
    [[5 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)] AND [4 days ago low > 1 day ago min(20,low)]] OR

    //20-days low 6 bars ago
    [[6 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)] AND [4 days ago low > 1 day ago min(20,low)] AND [5 days ago low > 1 day ago min(20,low)]] OR
    //20-days low 7 bars ago

    [[7 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)] AND [4 days ago low > 1 day ago min(20,low)] AND [5 days ago low > 1 day ago min(20,low)] AND [6 days ago low > 1 day ago min(20,low)] ] OR

    //20-days low 8 bars ago
    [[8 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)] AND [4 days ago low > 1 day ago min(20,low)] AND [5 days ago low > 1 day ago min(20,low)] AND [6 days ago low > 1 day ago min(20,low)] AND [7 days ago low > 1 day ago min(20,low)] ] OR

    //20-days low 9 bars ago
    [[9 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)] AND [4 days ago low > 1 day ago min(20,low)] AND [5 days ago low > 1 day ago min(20,low)] AND [6 days ago low > 1 day ago min(20,low)] AND [7 days ago low > 1 day ago min(20,low)] AND [8 days ago low > 1 day ago min(20,low)] ] OR

    //20-days low 10 bars ago
    [[10 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)] AND [4 days ago low > 1 day ago min(20,low)] AND [5 days ago low > 1 day ago min(20,low)] AND [6 days ago low > 1 day ago min(20,low)] AND [7 days ago low > 1 day ago min(20,low)] AND [8 days ago low > 1 day ago min(20,low)] AND [9 days ago low > 1 day ago min(20,low)] ] OR

    //20-days low 11 bars ago
    [[11 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)] AND [4 days ago low > 1 day ago min(20,low)] AND [5 days ago low > 1 day ago min(20,low)] AND [6 days ago low > 1 day ago min(20,low)] AND [7 days ago low > 1 day ago min(20,low)] AND [8 days ago low > 1 day ago min(20,low)] AND [9 days ago low > 1 day ago min(20,low)] AND [10 days ago low > 1 day ago min(20,low)] ] OR

    //20-days low 12 bars ago
    [[12 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)] AND [4 days ago low > 1 day ago min(20,low)] AND [5 days ago low > 1 day ago min(20,low)] AND [6 days ago low > 1 day ago min(20,low)] AND [7 days ago low > 1 day ago min(20,low)] AND [8 days ago low > 1 day ago min(20,low)] AND [9 days ago low > 1 day ago min(20,low)] AND [10 days ago low > 1 day ago min(20,low)] AND [11 days ago low > 1 day ago min(20,low)] ] OR

    //20-days low 13 bars ago
    [[13 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)] AND [4 days ago low > 1 day ago min(20,low)] AND [5 days ago low > 1 day ago min(20,low)] AND [6 days ago low > 1 day ago min(20,low)] AND [7 days ago low > 1 day ago min(20,low)] AND [8 days ago low > 1 day ago min(20,low)] AND [9 days ago low > 1 day ago min(20,low)] AND [10 days ago low > 1 day ago min(20,low)] AND [11 days ago low > 1 day ago min(20,low)] AND [12 days ago low > 1 day ago min(20,low)] ] OR

    //20-days low 14 bars ago
    [[14 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)] AND [4 days ago low > 1 day ago min(20,low)] AND [5 days ago low > 1 day ago min(20,low)] AND [6 days ago low > 1 day ago min(20,low)] AND [7 days ago low > 1 day ago min(20,low)] AND [8 days ago low > 1 day ago min(20,low)] AND [9 days ago low > 1 day ago min(20,low)] AND [10 days ago low > 1 day ago min(20,low)] AND [11 days ago low > 1 day ago min(20,low)] AND [12 days ago low > 1 day ago min(20,low)] AND [13 days ago low > 1 day ago min(20,low)] ] OR

    //20-days low 15 bars ago
    [[15 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)] AND [4 days ago low > 1 day ago min(20,low)] AND [5 days ago low > 1 day ago min(20,low)] AND [6 days ago low > 1 day ago min(20,low)] AND [7 days ago low > 1 day ago min(20,low)] AND [8 days ago low > 1 day ago min(20,low)] AND [9 days ago low > 1 day ago min(20,low)] AND [10 days ago low > 1 day ago min(20,low)] AND [11 days ago low > 1 day ago min(20,low)] AND [12 days ago low > 1 day ago min(20,low)] AND [13 days ago low > 1 day ago min(20,low)] AND [14 days ago low > 1 day ago min(20,low)] ] OR

    //20-days low 16 bars ago
    [[16 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)] AND [4 days ago low > 1 day ago min(20,low)] AND [5 days ago low > 1 day ago min(20,low)] AND [6 days ago low > 1 day ago min(20,low)] AND [7 days ago low > 1 day ago min(20,low)] AND [8 days ago low > 1 day ago min(20,low)] AND [9 days ago low > 1 day ago min(20,low)] AND [10 days ago low > 1 day ago min(20,low)] AND [11 days ago low > 1 day ago min(20,low)] AND [12 days ago low > 1 day ago min(20,low)] AND [13 days ago low > 1 day ago min(20,low)] AND [14 days ago low > 1 day ago min(20,low)] AND [15 days ago low > 1 day ago min(20,low)] ] OR

    //20-days low 17 bars ago
    [[17 days ago low = 1 day ago min(20,low)] AND [1 day ago low > 1 day ago min(20,low)] AND [2 days ago low > 1 day ago min(20,low)] AND [3 days ago low > 1 day ago min(20,low)] AND [4 days ago low > 1 day ago min(20,low)] AND [5 days ago low > 1 day ago min(20,low)] AND [6 days ago low > 1 day ago min(20,low)] AND [7 days ago low > 1 day ago min(20,low)] AND [8 days ago low > 1 day ago min(20,low)] AND [9 days ago low > 1 day ago min(20,low)] AND [10 days ago low > 1 day ago min(20,low)] AND [11 days ago low > 1 day ago min(20,low)] AND [12 days ago low > 1 day ago min(20,low)] AND [13 days ago low > 1 day ago min(20,low)] AND [14 days ago low > 1 day ago min(20,low)] AND [15 days ago low > 1 day ago min(20,low)] AND [16 days ago low > 1 day ago min(20,low)] ]

    // this bracket closes the OR statements
    ]

    AND

    [close <= 1 day ago min(20,low) * 1.01] // un-comment if you want to search for stocks that are close to their 20-day low and potentially ready for a TS setup

    //[low < 1 day ago min(20,low) ] // un-comment if you want to scan for stocks that set a 20-day low TODAY
  • markdmarkd mod
    edited May 2018
    If I read this correctly, I think you can shorten up the code with the min( ) function. The min length parameter is one less than the number of days ago for the tested low.


    and

    [

    [ //20 day low 4 days ago
    [ 4 days ago low = 1 day ago min(20, low)]
    and [ min(3, low) > 1 day ago min(20, low)]
    ]

    or

    [ // 20 day low 5 days ago
    [ 5 days ago low = 1 day ago min(20, low)]
    and [ min(4, low) > 1 day ago min(20, low)]
    ]

    etc.
  • Hi @markd smart thinking, I tried it and it works but you need to add 1 day ago for the min(3,20) as well otherwise it will exclude stocks that dropped to a new 20-day low today. Otherwise B)
    thx, Julius
  • markdmarkd mod
    edited May 2018
    @Julius_RRG I see it. Tx.

    Just to expand on this idea a little -

    many stocks taking a breather in a an up trend will resume the trend somewhere around the monthly Lower Price Chan(21).

    One way to catch stocks that maybe setting up for reversal in this area (whether turtle soup or not) is to scan for 20 x Fast Stoch %K(21,1) - in other words, Fast K crosses below 20.

    Sometimes this is the actual entry, other times the hit deserves to go into a watch list for possible entry in a few days.

    I've found that less restrictive scan conditions normally get more hits without necessarily sacrificing quality. For instance, stocks that don't quite make it to the Lower Price Channel, or cross below Fast K 20 only intraday (don't close low enough in the day's range to cause a crossover), often resume the trend more strongly than stock with a more severe reaction. Also, provided the prior up leg has been solid, the longer and flatter the reaction the better (i.e., the lower price channel seems to move up to meet price, rather than price dropping to seek out the lower channel).

    The scan for the intraday low crossing into the lower 20 % of the most recent 21 day range would be

    and [1 day ago min(21,low) +[[1 day ago max(21, high) - 1 day ago min(21, low)] *.2 ] x low]

    Something to play with in your free time...
  • thanks and yes that works i tried to do that using this snippet [close <= 1 day ago min(20,low) * 1.01] and then play with the 1.01 value.
  • To Julius:
    First, thanks for all your groundbreaking work on the RRG and sharing your scan and work on "Turtle Soup". Using your scan, I believe I followed all the rules, I have success story to share. Check out ES Eversource and follow the chart for the last ten day.

    Regards

    Bernie Gdowski
  • baxter007baxter007
    edited July 2018
    To Julius, @Julius_RRG

    I have been using the scan you published in your blog on "Turtle Soup for the S&P 500".

    The results I have been getting are not what you describe in you blog article. The actual scan code is listed below. Any adjustments you see are highly appreciated.

    Trade Well,

    Randy Kelsey

    [group is SP500]
    AND
    [
    // 20-days low 4 bars ago
    [[4 days ago low = 1 day ago min(20,low)] AND [1 day ago min(3,low)>1 day ago min(20,low)]] OR
    // 20-days low 5 bars ago
    [[5 days ago low = 1 day ago min(20,low)] AND [1 day ago min(4,low)>1 day ago min(20,low)]] OR
    //20-days low 6 bars ago
    [[6 days ago low = 1 day ago min(20,low)] AND [1 day ago min(5,low)>1 day ago min(20,low)]] OR
    //20-days low 7 bars ago
    [[7 days ago low = 1 day ago min(20,low)] AND [1 day ago min(6,low)>1 day ago min(20,low)]] OR
    //20-days low 8 bars ago
    [[8 days ago low = 1 day ago min(20,low)] AND [1 day ago min(7,low)>1 day ago min(20,low)]] OR
    //20-days low 9 bars ago
    [[9 days ago low = 1 day ago min(20,low)] AND [1 day ago min(8,low)>1 day ago min(20,low)]] OR
    //20-days low 10 bars ago
    [[10 days ago low = 1 day ago min(20,low)] AND [1 day ago min(9,low)>1 day ago min(20,low)]] OR
    //20-days low 11 bars ago
    [[11 days ago low = 1 day ago min(20,low)] AND [1 day ago min(10,low)>1 day ago min(20,low)]] OR
    //20-days low 12 bars ago
    [[12 days ago low = 1 day ago min(20,low)] AND [1 day ago min(11,low)>1 day ago min(20,low)]] OR
    //20-days low 13 bars ago
    [[13 days ago low = 1 day ago min(20,low)] AND [1 day ago min(12,low)>1 day ago min(20,low)]] OR
    //20-days low 14 bars ago
    [[14 days ago low = 1 day ago min(20,low)] AND [1 day ago min(13,low)>1 day ago min(20,low)]] OR
    //20-days low 15 bars ago
    [[15 days ago low = 1 day ago min(20,low)] AND [1 day ago min(14,low)>1 day ago min(20,low)]] OR
    //20-days low 16 bars ago
    [[16 days ago low = 1 day ago min(20,low)] AND [1 day ago min(15,low)>1 day ago min(20,low)]] OR
    //20-days low 17 bars ago
    [[17 days ago low = 1 day ago min(20,low)] AND [1 day ago min(16,low)>1 day ago min(20,low)]]
    ]
    AND
    [close <= 1 day ago min(20,low) * 1.01] // un-comment if you want to search for stocks that are close to their 20-day low and potentially ready for a TS setup
    //[low < 1 day ago min(20,low) ] // un-comment if you want to scan for stocks that set a 20-day low TODAY
  • edited July 2018
    I ran the Turtle Soup scan on June 1 and I only got for (4) stocks (ANTN, CPB, ES, XRX) compared to 10 stocks that Julius showed on his June 2 blog.
  • Different results for Turtle Soup scans can occur because of a few reasons.
    1. scanning at last close or at last price, that's a general setting for SCANs
    2. scanning for stocks close to a setup at last close or scanning for stocks that made a new low TODAY. That depends on which rule you are using at the end of the code
    3. if you are scanning for lows set TODAY the results can differ at different times of the day as a stock may have made a new low after you had scanned the universe earlier when it had not set its new low yet
    4. if you are scanning for stocks close to their 20-day low the percentage used (1.0n) can cause differences

    Hope this helps
    Julius
  • to match the stocks on the June 2 blog article set percentage difference to 2% so 1.02
    I play around with the %difference to try to get a decent number of stocks on the RRG for inspection. I think that at the time of writing I thought that 4 names was a bit minimal ;)
  • Mr. de Kempenaer is there a Turtle Soup sell scan available ? Thanks in advance
  • markdmarkd mod
    edited July 2021
    Assuming it would have the same rules, but in reverse, you could search and replace the buy version with "high" for "low" and "max" for "min".

    It would probably work better on a stock turning down or trending down (in other words, also test for the 50 or the 200 day moving average less than, say, a month ago)

    and [sma(200,close < 21 days ago sma(200, close)]

    The last two optional lines could be:

    [close >= 1 day ago max(20,high) * .99] // un-comment if you want to search for stocks that are close to their 20-day high and potentially ready for a TS setup
    //[high = max(20, high) ] // un-comment if you want to scan for stocks that set a 20-day high TODAY


    Note:

    To get a member's attention, use an "@" symbol in front of their s.c.a.n. name - for instance @Julius_RRG . That sets a flag when they open their account. I think it also sends an email.
  • Thanks markd !
  • @Julius_RRG You mentioned the Turtle Soup scan can also be used to find the end of a trend, is there a scan for sell signals ? Thanks in advance
  • edited August 2021
    I think most traders settle on a few indicators that over time work for them. From what I've seen, markd has become a master of using Stochastics in creative and useful ways. My main indicators are RSI, and EMA envelopes (as well as EMAs of course). Each of these took a lot of trial and error work to get from the basic indicator to something that finds something useful. Obviously crossovers are important, but so are ways of finding tops and bottoms. I include 5 other indicators which occasionally become significant. Incidentally, I work primarily with weekly charts on all my scans. I sometimes need to look at daily or even 5 minute bars, but all searching is done with weekly charts.

    It took me many years to be able to find stocks that are likely to move in a certain direction with a useful and increasing amount of reliability, and of course, often enough they don't move as expected. Money management may be more important than stock selection.

    The Inspect feature is very important to see historically how well your indicators have worked in the past, and to see if your search has reliably found reversals or reliable trends from the point they are found.

    Don't forget the PerfCharts. I have Perfcharts for every stock above $4 in every industry (sometimes requiring more than 4 charts)/industry (8 in one industry group), and every sector. Attached is an example of 1 of 2 charts I have of the companies in the Heavy Construction industry - in 3 different time spans. If you wanted to get into this industry, you can see how this could provide a quick overview of the performance and volatility of the various stocks.

    I hope this is not too basic, and that it may be useful to at least some people. StockCharts is a really powerful program with an exceptional education opportunity, and an unbelievable help team on this forum. Use it.

  • @candidcactus , thanks for the kind words and the contributions.
Sign In or Register to comment.