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.
Weekly Scan with declining volume
Markd....I have written scans, but am trying to write a wkly scan:[type = stock] AND [Daily SMA(20,Daily Volume) > 40000]
and [Volume >300000]
and [High >10]
and [Low< 40]
and [Williams %R(14)< -80.0]
But, I want these p/b on declining volume! How would I write that please? Please email Markd; [email protected]
You could test each volume bar against the prior bar:
// test for consecutive lower volume bars
and [weekly volume < 1 week ago volume]
and [1 week ago volume < 2 weeks ago volume]
and [2 weeks ago ... etc.
// end volume test
But that is a very specific pattern that will limit hits - but it might be what you want.
Another way is to test max volume over two different periods:
// test for falling highest volume bars over time
and [weekly max(10, weekly volume) < weekly max(21, weekly volume)]
You can play with the max period (10, 21) to see what works better.
And another way would be to use moving averages:
You could compare one moving average to itself some time ago:
// test for a falling volume moving average
and [weekly sma(10, weekly volume) < 5 weeks ago weekly sma(10, weekly volume)]
Or, you could compare two different moving averages:
// test for the falling short volume MA below the longer volume MA
and [weekly sma(5, weekly volume) < weekly sma(21, weekly volume)]
and [weekly sma(5, weekly volume) < 1 week ago sma(5, weekly volume)]
Also, if you are writing a weekly scan, you should modify all the terms you are testing with the word "weekly", like this:
[type = stock]
[exchange is NYSE]
[exchange is NASD]
[exchange is TSE]
and [weekly Volume >300000]
and [weekly High >10]
and [weekly Low< 40]
and [weekly SCTR<50]
and [weekly Williams %R(14)< -80.0]
If you don't use the word "weekly" in front of everything, the scan engine assumes you mean "daily".
Notice I've changed your stock selection lines at the top so you test for volume only once (instead of twice). I'm not sure if you want to update your weekly Volume figure - were you testing for minimum weekly volume or daily? It now tests for weekly. Also, I added the lines to limit exchanges - assuming you don't want India or London, but do want US and Canadian. You can take those lines out if you want.
Scans run as of the most recent update, unless you specify otherwise, so the data used is the data as of that update. So if you say "weekly close" but you run the scan on Wednesday at say 2:13 pm, it uses the close on Wednesday at 2:13 pm as the weekly close. But of course the week isn't done yet.
If you know that, and that is what you want, that's fine. But if you are thinking that "weekly close" always means the close as of the end of last week, you may be wondering why the results don't seem right.
So if you are running a weekly scan, run it after the close of business Friday, -OR- to run the scan during the week as of the end of a prior week, set the calendar tool to a prior Friday.