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.

SCTR scan code needed for score results 90 - 100

I want to create a scan that will create a watch file of small cap stocks with an SCTR score of 90 to 100. Can anyone tell me what the scan code language would be to generate that scan? And also what drop down selections?

Thanks

Eric

«1

Comments

  • markdmarkd mod
    edited November 2019
    In the Price, Volume and SCTRs drop down, just select SCTR.small and click Add. That puts the appropriate code in the scan writing window. Then change the "90" to 89.
  • Thanks for your message. That works. I am now running a scan for SCTR scores on the short side from 0 to 10 which is easy now too. But I only want stocks that are 2 million or higher in trade volume from 0 to 10 SCTR. I have tried to program for greater than 2 million in volume and tried to find readings on this but still not successful. Can you help on this please?

    Thanks

    Eric

  • Volume is also an option you can select in the Price, Volume and SCTRs drop down, and then edit for your requirements (change 9,999,999 to 2,000,000.

    You may want to use average volume instead. If so, select "SMA" from the Technical Indicators drop down and edit for length (maybe 21 instead of 50), and then 2,000,000 again for volume.

    You will find many useful scans you can copy from here:

    https://support.stockcharts.com/doku.php?id=scans:library

    Scanning documentation and tutorials are here:

    https://support.stockcharts.com/doku.php?id=scans

    Learning takes a little time, but well worth it.
  • Markd, I don't know if you got this message or not. If you did I apologize for the duplicate. I am trying to write a scan or alert that says the following: search for only those symbols that have a 90 - 100 sctr and where the ema 20 has crossed above the 55 ema. Both of these indicator conditions are to be within 5 trade days of each other.

    Can you help me to write that?

    And should this be written into a scan or as an alert?

    Thanks

    Eric

  • I don't see a reason to do this as an alert, unless you want to use it as a trigger to enter a trade right away. Otherwise a nightly scan should be sufficient.

    Also, I'm assuming you would run this scan daily. If so, you don't need the "within 5 days" condition. If you run the scan daily, you will catch the crossover and can save the scan results for review. If you use the within 5 days condition, you will get alot of duplicate results from one scan to the next.

    So the crossover operator is "x" and it means the term on the left crosses above the term on the right. For instance,

    and [ema(20, close) x ema(55, close)]

    If you want to scan for the 20 crossing BELOW the 55, you would reverse the terms:

    and [ema(55,close) x ema(20,close)]

    So you have to think of it as the 55 crossing above the 20, even though the 20 is moving faster so really it is the one doing the crossing.

    If you want to run the scan only once a week, you could test for ema 20 greater than ema55 today and 5 days ago ema 20 less than 5 days ago ema 55. That allows for a crossover occurring on any of those 5 days.
  • Hi markd,

    I need help for advanced scan please. I cannot figure it out after I have tried. Here it is. My scan must include: SCTR must be greater than 90. Price must be above ema(250). Slow STO K(5) & D(1) must have closed on or above 20 on that day. Also what would i change in the formula if I'm looking for sell orders to short the market. These scans would be run once per day.

    Thank you. Eric

  • Paste what you have so far.

    You should be able to get most of it from the drop downs on the scan workbench with some editing. Price is called "close", not price.
  • lmkwinlmkwin ✭✭
    edited April 2020
    @fz3501oq , sounds like you are looking for a Above the Green Line scan. Type

    above the green line in the search box on this forum to see other threads that discussed this. Some of the threads have scan code in them, for this.

    The Search box is in the upper Right corner.
  • Thanks for the info. What is the difference between slow stoch k and slow stoch d ?

    In what situation would I use one over the other? Or do I have to use both of them?

    Eric

  • Also I am trying to do a search under the ETF list. However when I run the scan it says 'invalid expression Type is ETF'. So I tested ETF, Stock ETF, and ETF Stock. The same error appeared for all 3 scans. Any suggestions?

    Eric

  • Search chart school for stochastics. All is explained.

    To limit the search to etfs, [group is ETF]

    Lots of documentation on Stockcharts. Very helpful.
  • lmkwinlmkwin ✭✭
    edited April 2020
    @fz3501oq

    Your question on Stochastics:
    The K line is the "fast" line and the D line is the MA of the K line. When you select the Fast or Slow Stoch there are 2 numbers. The K is the 1st number, the D is the second number.

    You can learn more about Stochastics using the StockCharts ChartSchool:
    https://school.stockcharts.com/doku.php?id=technical_indicators:stochastic_oscillator_fast_slow_and_full

    The ChartSchool is an amazing resource for learning both how the various elements are created, and how to use them in scans.

    Your question on ETFs or selecting things:
    In the workbench there are a number of sections below called Scan Components



    These are dropdowns for you to select various options. You may note that Indexes and ETF's is one of the dropdowns. Click on the drop down and then click on the option you would like. Then click on the ADD button. This will put the option into the Scan Editor window. You can modify the expression there if you want or leave it as is.

    This is the best way to build a scan. Using the dropdowns, selecting the option and adding them to the scan. If you look through ALL of the dropdowns to get comfortable with what is there, you will be well on your way to getting scans to meet your needs.

    https://support.stockcharts.com/doku.php?id=scans:reference:predefined_patterns

    If you run into a problem with the scan, copy the code from your editor and post what you have here, using the copy and paste function, for review or assistance.



  • Thanks. I am writing this scan with the 'above the green line' settings. I am using their stochastics settings that above the green line provided me. The settings i see on the charts for stochastics say k(5) and d(1). I want to write the code that will reflect exactly the settings that I see on the chart. Now, I want to write a scan that will tell me what stocks have had the slow stochastics cross above 20 for that day. So far I can't get it right. This is what I have so far.

    [Daily slow stoch %k(5) %d(1) x 20]

    This is not working. Where is my error?

    Thanks

    Eric

  • When you SELECT and Add the option from the Technical Attributes dropdown, it shows like this in the editor:

    and [Slow Stoch %K(14,3) > 80.0]


    You can change the numbers to match your 5,1 requirement. Of course you'd need to change the > 80.0 to meet your requirement.

    When you are working inside the Scan Editor, add your code. Then click on the Check Syntax button. It should tell you where your issue is.

    The reason that your [Daily slow stoch %k(5) %d(1) x 20] isn't working is a syntax issue. The K and the D are two different animals and must be treated as such. To get a crossover of the K over the D you'd put and Slow Stoch %K(5,1) x Slow Stoch %D(5.1) You can even mix and match like you want the K(5.1) to cross the K(20,10). The stoch lines represent levels of where the price is in relation to the high and low of the K period.

    I personally like Williams %R better for a visual reason, but pretty much all price oscillators provide a similar picture.
  • markdmarkd mod
    edited April 2020
    Since she is using 5,1, there is no %D line. %D is a moving average of %K. If a moving average length is one, then the average equals the value being averaged. Her reason for using "1" is to eliminate the %D line from being visible on the plot because she doesn't use it.

    So you only need to worry about Slow %K.

    So select Slow Stochastics %K from the Technical Indicators drop down, click Add, and you get

    and [Slow Stoch %K(14,3) > 80.0]

    up in the scan window.

    Now you have to edit that - first for her parameters, which are 5,1, so change the 14,3 to 5,1:

    and [Slow Stoch %K(5,1) > 80.0]

    Now you want %K crossing above 20, not greater than 80; the cross above operator is "x", not ">", so replace ">" with "x" and 80 with 20.

    P.S. although her method can be very productive, it is not foolproof. You can get caught on the wrong side. When you get this programmed, run it with some back dates - make sure you have an accurate chart style to match the scan criteria (Slow %K (5,1) ).


  • I want to write a scan to run daily when the market is open. Is the following correct to extract the last market data during the moment of the scan?

    [Close<5] or do I use open instead of close?

    Or if not correct what would I use?

    Secondly what does this mean: today 10%+.

    I have read that it means '10% up or more on the day'. What does this mean? What would be the programming for this for stock charts?

    Thanks for your help

    Eric

  • I am doing a scan for us stocks. However I'm getting a lot of symbols mixed in with endings such as .to or .l. I can't pull those symbols up with my broker. And I think they are for other countries. What programming do I use to get US stocks?

    Thanks

    Eric

  • " lot of symbols mixed in with endings such as .to or .l."

    In the Scan Workbench you can select your exchange(s) or country under the Ticker Properties dropdown. Put this line(s) at or near the top of your scan. The Stoch stuff AFTER it. Basically you are telling the Scan Engine to look at these exchanges or countries or market caps or.... then filter/ pull the ones that meet the rest of my criteria


  • What does this mean: today 10%+.

    I have read that it means '10% up or more on the day'. What does this mean? What would be the programming for this for stock charts?

    Thanks for your help

    Eric

  • lmkwinlmkwin ✭✭
    edited October 2020
    I don't know what you are looking at in regards to your question, but if someone said to me "today 10%+" I would take it to mean a move of 10% or more today.

    If you are looking for a price change, or any change, of 10% or more, you could use the PctChange function in the Technical Indicators dropdown.

    https://support.stockcharts.com/doku.php?id=scans:advanced_scan_syntax:pctchange_scans

  • Ok. Thanks. One more question:

    If I use this [volume>400,000], it means only for the day correct? Or do I need to include the word daily in my programming if i only want results for the day? Please clarify.

    Thanks

    Eric

  • lmkwinlmkwin ✭✭
    edited October 2020
    All the indicators and scan language assumes Daily, so you don't need to specify it. You may, for clarity, but it's not necessary.


    "The Scan Engine allows users to create scans based on Daily, Weekly and Monthly bars. It does not support scans based on intraday (1-minute, 5-minute, etc.) bars."
  • I need confirmation on this please: If I am running an advanced scan with an average volume SMA calculation, do I have to have SMA lines on the chart in order for the numbers to be correct. In other words, right now I have EMA lines on my chart, but my scan includes the average SMA calculation to give me SMA volume. I want to make sure my average calculation is figured accurately and separately from the lines on the charts. Please confirm. Thanks.

    Eric

  • The Scan engine doesn't know anything about charts. It deals in data. If you are asking for the volume in relation to a SMA that it what the Scan engine looks for. How you set up your charts has no bearing on the scans.

    Now, if you want to "verify or check" the stocks returned, it is often helpful to show the indicators that match the scan language, but that's if you want to make sure that what you think you asked for is what you are getting.

    So confirmation given.
  • Thanks for your help. From your experience are scan results pretty accurate? Also do you see any language below that could conflict with each other? Or does it look good to you? This is all part of one scan file. Thank you. Eric

    [type is stock]

    And [sma(90,volume)>399,999]

    And [close<5]

    And [volume>399,999]

    And [country is US]

    And [PctChange(1,close)>10]

  • It looks fine.

    I would suggest instead of [country is US], use [[exchange is NYSE] or [exchange is NASD]], unless you want to see bulletin board and penny stocks.

    Scans are accurate. Very, very rarely data in the scan database may not correspond to data in the chart database. Also rarely, end of day data updates may yield different scan results if you run the same scan before and after the updates. Vendors or exchanges sometimes make mistakes during the market day that are reconciled after market close. Final updates are usually done by 6 pm eastern time, sometimes sooner, very occasionally later. Occasionally stocks are grouped by Stockcharts in the wrong industry/sector, or no industry/sector at all, so if you scan by industry or sector some stocks that should come up don't, while some that do come up should not have.

    All that said, if you are not getting the results you expect, it is very, VERY likely you have something in your code that does not say what you think it does. Even experienced coders make that mistake. You can track things down by commenting out one line at a time, or a group of lines, and see how the results change, or by changing one line at a time. Remember, to verify your results, your chart style must display the same indicators/overlays you use in your scan - with the SAME parameters.
  • Your scan looks fine. I would just change up the order.

    Think of the scan as filters.

    StockCharts defines a scan this way.

    A scan is a series of tests that are performed by the Scan Engine to see which securities meet all your technical requirements. Securities that meet your first requirement are passed along to see if they meet your second requirement, etc. until the last of the tests has been conducted. Those securities that passed all the tests are thus determined to meet all your technical requirements and are subsequently included in your scan results.


    So your scan should be better formatted as:

    You ask for a stock, and there are over many thousand stocks. Then you want to narrow by Country. This narrows the many thousands to several thousands. Then you have a couple volume requirements. This narrows the many thousands to a smaller number. Then you have a Price Close requirement, further narrowing the results and knocking out the low price with higher volume stocks from the US. Then you have a PctChange requirement that only a select few of the remaining will pass.

    So you start the scan wide and then narrow it down. And wide can be narrow, like an industry group or a chartlist that is the holdings of a favorite mutual fund.

    Your scan may work in the format you have, but it will work better in proper order and be easier to troubleshoot should that situation arise.

    https://support.stockcharts.com/doku.php?id=scans:advanced_scan_syntax

    And... don't be afraid to use Comment lines. These are lines in your scan that the scan engine ignores but allow you to put in common language what the line is supposed to do.

    Any line, or part of a line, that you put double backslashes in from of is ignored.

    [type is stock]

    And [country is US]

    // this is the daily volume limit
    And [volume>399,999]

    // this is to make sure that the longer term volume is also above the daily limit
    And [sma(90,volume)>399,999]

    And [close<5]

    And [PctChange(1,close)>10]

    If you add a chartlist to your scan you may note it adds the chartlist as

    and [favorites list is 81] // 7xx PnF Timeliness Picks SmlMidQQQ

    So the scan engine will look at my chartlist #81 symbols and it automatically commented out what that chartlist is in common language, or what I call that chartlist.

    By the way, that chartlist is also my Public ChartList.
    https://stockcharts.com/def/servlet/Favorites.CServlet?obj=1175948,81&cmd=show&disp=e
  • Thank you very much for helping me. I understand that the scan language must match the overlays on the charts for a verification. However if due to my strategy plan I want to use sma on the scan but use ema on the charts, that would be ok correct? .....knowing that I'm intentionally doing that.

    Let me know please.

    Thanks

    Eric

  • you can put anything you want on the chart. The scan has nothing to do with the chart.

    I prefer Point and Figure charts. Many scans I use don't have any PnF criteria. Or I'll review the PreDefined Scans for Gaps and view the listing in Point and Figure Charts. Gaps do not exist on Point and Figure charts but I can still see the scan results.
  • How do I get my language to appear as an indicator on my charts? I want the following to show on my charts as a volume indicator:

    [Sma(90,volume)>600,000]

    Let me know.

    Thanks.

    Eric

Sign In or Register to comment.