StockFetcher Forums · Filter Exchange · New Filter: AvgVol Blocks<< >>Post Follow-up
RoyPope
12 posts
msg #122912
Ignore RoyPope
2/24/2015 2:13:23 AM

I've been stuck with a temporarily illiquid stock for the past week, or so. Share price at the time of purchase was 1.25 and Average Volume(90) was 500000. Other criteria were also included in my filter, but not relevant to this post.

So, where did I go wrong in my filter?

While the Average Volume(90) returns the average volume from the last 90 days, it does not take into consideration the fact that the bulk of the volume used in computing the average volume may have occurred more recently, or during only a handful of days during a pump-n-dump.

I don't know how "pretty" this code is to others, or if there is a better way of writing this, but here's the beginnings of a new filter I am working on to resolve the issue that I had with the average volume while also trying to return stocks that make huge positive price moves over the span of only a fee short days. Of course, this is a work in progress, but I figured that if I post it here then maybe some good-hearted person might contribute ideas and code to improve upon what I already have.

I put the "Sort Column 13 descending" line in there so if you use date offset then the results will be ordered by %Since.

Because every filter should have a name, I'm calling this one "AvgVol Blocks" since it resolves my primary concern by evaluating Average Volume in blocks.

Fetcher[
Market is not OTCBB
Price between 3 and 20

set{myvol, 250000}

Average Volume(20) greater than myvol
Average Volume(20) 20 days ago greater than myvol
Average Volume(20) 40 days ago greater than myvol
Average Volume(20) 60 days ago greater than myvol
Average Volume(20) 80 days ago greater than myvol
Average Volume(20) 100 days ago greater than myvol

Add Column Average Volume(20){AVol20}
Add Column Average Volume(20) 20 days ago{AVol2020}
Add Column Average Volume(20) 40 days ago{AVol2040}
Add Column Average Volume(20) 60 days ago{AVol2060}
Add Column Average Volume(20) 80 days ago{AVol2080}
Add Column Average Volume(20) 100 days ago{AVol20100}

Close greater than Close 1 day ago

10 day slope of CMA(OBV, 5) above 0.5
5 day slope of OBV above 0

MACD Fast Line(12,26,9) above MACD Slow Line(12,26,9)

set{dif1, MACD Fast Line(12,26,9) minus MACD Slow Line(12,26,9)}
set{dif2, MACD Fast Line(12,26,9) 1 day ago minus MACD Slow Line(12,26,9) 1 day ago}
dif1 greater than dif2

Williams %R(14) greater than -20

sector is above 3
add column sector description

Draw RSI(2)
Draw MACD Fast Line(12,26,9) on Plot MACD
Draw MACD Slow Line(12,26,9) on Plot MACD

Do not draw dif1
Do not draw dif2

Sort Column 13 descending
]



mahkoh
890 posts
msg #122918
Ignore mahkoh
2/24/2015 1:38:37 PM

With regard to your average volume issue you could try

count(volume above 250000,100) above 95



RoyPope
12 posts
msg #122931
Ignore RoyPope
2/25/2015 12:21:32 AM

Thanks mahkoh. That's exactly what I'm looking for... input that will help me to improve my coding skills on StockFetcher.

RoyPope
12 posts
msg #122932
Ignore RoyPope
2/25/2015 12:36:54 AM

Gives me a more narrowed-down list of stocks to work with than does my original code.

Original code 1 day ago gives -
31 stocks, 12 (38.7%) with gains and 19 (61.29%) with losses.

Revised code 1 day ago gives -
21 stocks, 7 (33.33%) with gains and 14 (66.66%) with losses.

Guess I now need to work on the section of code that actually does the stock selections.

Fetcher[
Market is not OTCBB
Price between 3 and 20

set{myvol, 250000}

count(volume above myvol,100) above 95

Close greater than Close 1 day ago

10 day slope of CMA(OBV, 5) above 0.5
5 day slope of OBV above 0

MACD Fast Line(12,26,9) above MACD Slow Line(12,26,9)

set{dif1, MACD Fast Line(12,26,9) minus MACD Slow Line(12,26,9)}
set{dif2, MACD Fast Line(12,26,9) 1 day ago minus MACD Slow Line(12,26,9) 1 day ago}
dif1 greater than dif2

Williams %R(14) greater than -20

sector is above 3
add column sector description

Draw RSI(2)
Draw MACD Fast Line(12,26,9) on Plot MACD
Draw MACD Slow Line(12,26,9) on Plot MACD

Do not draw dif1
Do not draw dif2

Sort Column 7 descending
]



miketranz
715 posts
msg #122963
Ignore miketranz
2/27/2015 9:23:13 AM

Roy,when looking at a chart,90 day for example,just take the high volume days out of the equation,see what the average volume was prior to the run up.It's true that the numbers are misleading due to the high volume days being thrown into the mix.If a stocks avg volume is below 100000 prior to any high volume days,I would be cautious buying any kind of size.Also one thing a lot of people don't realize when buying any stock,is the bid/ask spread.That's a major factor in liquidity.If a stock trades a wide spread,stay away from it.If you're buying "at market" or selling "at market",you just lost more money than you should have.If you take the option of placing a "limit order" to buy,you'll be sitting there all day waiting to be filled and most of the time it will only be a partial.The only ones making money are the market makers.Another point concerning liquidity is that a stock can trade higher volumes,lets say 1 million plus,and still have a wide bid/ask spread.These kind of situations make it difficult to move in and out of a stock,without losing excessive money to the spread.In extreme low volume/low liquidity cases,sometimes the only way to get out is to "piece it out" with multiple orders.Good luck....

StockFetcher Forums · Filter Exchange · New Filter: AvgVol Blocks<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus