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.

Help needed: how to edit a weekly 3-clause scan under StockCharts?

Hello,

I'm desperately trying to create a weekly scan which would be ready to be used every week (after Friday close and before Monday opening) on two of my StockCharts lists, and which would include the three following clauses:

1. Last weekly candlestick closed above 52-week Simple Moving Average (on Friday);
2. Last weekly candlestick closed as a completed weekly hammer candlestick pattern (on Friday);
3. Last weekly candlestick's low (on Friday) was lower than the 10 preceding weekly lows.

Is there someone within the s.c.a.n. community who could kindly help me out by providing me with this three-clause script?

In addition, of course, I would then need to know each further step showing me how to proceed in order to save and finally apply the scan to both my weekly StockCharts lists of stocks and of ETFs.

Thank you in advance for the help.

chris2 ([email protected])

Comments

  • You can build most scans from the drop down boxes on the Scan Workbench.

    For no. 1, "close" is under "Price Volume and SCTRs"; SMA is under "Technical Indicators".
    You have to edit both with the word "weekly" in front of SMA, and also in front of "close".

    For no. 2. "Hammer" is under "Candlestick Patterns". It needs "weekly" in front of it, too.

    No. 3 is a little different. It requires using the min( ) function. So, you would say:

    and [weekly low = weekly min(10, weekly low)]

    For help writing scans, follow the links at the bottom of the Scan Workbench page.

    If you get stuck, post what you have.

  • markd,

    Thank you for responding to my request.

    Under the Technical Workbench I wrote the following script whose syntax was acknowledged as correct:

    [type = Vol > 10M Chuck Indic list] AND [Weekly Close > weekly SMA(200)]
    AND [Weekly Close = Weekly Hammer]
    AND [Weekly low = weekly min(10, weekly low)]

    But once I clicked "Run Scan to view the results", I got in response the message "The Scan Engine is taking too long to return your results. Please try again later."

    I tried over, but with no success... What should I do? Keep waiting (for how long)?

    Some help would be much appreciated.

    chris2





  • Unfortunately, the syntax checker doesn't catch everything. (For instance, it should check for more than one non-consecutive operator inside a pair of brackets, but it doesn't).

    So, this line cannot be interpreted:

    [type = Vol > 10M Chuck Indic list]

    It looks like this is several conditions wrapped into one. But, you should have only one condition within one pair of brackets (and only one pair of brackets for each "and" or "or").

    If you comment out that line, it should run:

    //[type = Vol > 10M Chuck Indic list]

    // AND

    [Weekly Close > weekly SMA(200)]
    AND [Weekly Close = Weekly Hammer]
    AND [Weekly low = weekly min(10, weekly low)]

    But, you probably want to edit 200 to something shorter. 200 weeks is about 4 years. 40 weeks would be roughly equivalent to the 200 day moving average.

    If you want to run the scan against a list you have made, select it from the list drop down. If you do that, then you don't need to specify a type.
  • markd,

    Thank you again. Thanks to you, there is some progress.

    I edited the following script on the Technical Scan Workbench (since under the Standard Scan Workbench, I can't find your initial instruction "close" is under "Price Volume and SCTRs" for no. 1):

    ___

    // [type = Vol > 10M Chuck Indic list] // OR [type=list47]

    // AND

    [Weekly Close > weekly SMA(40)]
    AND [Weekly Close = Weekly Hammer]
    AND [Weekly low = weekly min(10, weekly low)]

    ___

    I got zero scan results for my list47 (a 400+ stock-list) but this time at least I got a result (see copy of screenshot below).

    Congratulations to you, markd!

    chris2

    ___




  • If you want to test the scan further, you run it for previous Fridays.

    On the Advanced Workbench, select prior Fridays from the pop up calendar that appears when you click on the zero above the scan window, where it says Starting 0 days before...
Sign In or Register to comment.