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 24
    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 24
    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 25
    @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 14
    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 16
    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 ;)
Sign In or Register to comment.