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.

Question on Scan Bug? (ADX)

Hello, wonderful group. I have been trying to get a scanning script going that is causing frustration. I am trying to scan for stocks with Chaikin money flow that's higher today than 4 days ago, with an ADX line (the black line) that's risen over the past three days.

[group is SP500] and // all S&P 5000
[today's CMF(20) > 4 days ago CMF(20) ] and // was 2
[today's daily ADX Line(9) > yesterday's adx line(9) ] and
[yesterday's daily adx line(9) > 2 days ago daily adx line(9)]

Running this script gives me a bunch of results that don't follow the logic, for example these

https://stockcharts.com/sc3/ui/?s=EL
https://stockcharts.com/sc3/ui/?s=FMC
https://stockcharts.com/sc3/ui/?s=PHM

All of these have an ADX line that's flat or rising.

Am I making erroneous assumptions about how to do a scan for rising ADX?

Comments

  • markdmarkd mod
    edited September 10
    The logic seems to be OK, except I think you are asking for two days increasing ADX Line, even though you are looking at three days - today, 1 day ago and 2 days ago

    So, if today is 0 days ago, you're saying

    0 > 1 -> [today's daily ADX Line(9) > yesterday's adx line(9) ]
    1 > 2 -> [yesterday's daily adx line(9) > 2 days ago daily adx line(9)]

    but what about 2 days ago? It could have been lower than the day before, but you're not testing for that.

    You can test the actual values of ADX Line in the results using "Start/End" for chart duration, and advance the chart one bar at a time. The ADX Line value (and any other indicator value) will change for each bar. Sometimes a line that looks unchanged has moved fractionally and so fits the scan condition.



  • Also, you have a line looking at "today's" CMF. If you run this scan during trading hours, it can produce unexpected results. You need to run the "volume-based indicators" using a prior close date.

    Something I mentioned last year:

    I was getting no results whenever I'd put the CMF indicator into a scan. I flipped over to the Predefined Scans page as they have a scan for Improving Chaikin Money Flow. There is zero results showing for the stock indexes when I checked as well. I sent a message to support and they responded


    "Thank you for contacting us. You cannot scan for volume-based indicators, like CMF, during trading hours. Their data isn't available for charting nor scanning at that time. There's more information on why posted here:
    https://support.stockcharts.com/doku.php?id=faqs:why_arent_my_volume_based_indicators_updating

    Please let me know if you have any other questions or comments about our website."

    I then followed the link, which talks about the chart updating. Not much help there but then I went to the CMF in ChartSchool and at the bottom of the page there is a note.

    "Note: For the purposes of scanning, daily volume data is incomplete during the trading day. When running scans with volume-based indicators like CMF, be sure to base the scan on the “Last Market Close.” Examples of other volume-based indicators include Accumulation/Distribution, On Balance Volume, and the PVO."

    I had never noticed this before. Of course, I don't use any of those other 'volume based' indicators in my scans but word to the wise, if you run a scan during the trading day, and you get zero results, check for a 'volume Based Indicator' in your scan. You would need to use a prior date on the scan if running it intraday.
Sign In or Register to comment.