Looking for a solution to the problem of stocks hovering right around my minimum liquidity rule.

I have a minimum liquidity buy rule that seems to work well. I removed the corresponding liquidity sell rule to prevent from getting whiplashed by stocks that trade often above and below my minimum liquidity threshold. Now I’m looking for help to come up with a rule that prevents a stock from entering as a buy (on a rebalance) for the sole reason that it now meets the minimum liquidity. For example, I’d like a rule to prevent the following from happening: a month ago small stock xyz met all my buy criteria except the liquidity rule and so I did not buy it. Fast forward to today and it now meets all of the criteria (and I buy xyz), but only because it had a spike in price and/or volume (possibly because of the good news that made it a buy candidate a month ago).

I think this might help prevent buying stale stocks. Stocks where the good news is priced in. (I do want to avoid a separate rule that eliminates all stocks that have had a price spike.)

I hope this question makes sense–I’m still new at this. Thanks, Doug

MedianDailyTot function looks like it has an offset, so I think you could check both current $ volume as well as volume back in time. For example to require minimum $200,000 median 50 day dollar volume both today as well as 20 days ago of at least 200000 a rule like this might work.

MedianDailyTot(50) > 200000 and MedianDailyTot(50,20) > 200000

Sometimes trading will just dry up after a burst of activity, so watching several windows of trading volume might make sense in illiquid stuff. Maybe try something like checking 30 day median dollar volume every 30 days going back through 4 windows of time. this would cover not quite 6 months of median volumes.

MedianDailyTot(30) > 200000 and MedianDailyTot(30,30) > 200000 and MedianDailyTot(30,60) > 200000 and MedianDailyTot(30,90) > 200000

If you’re more concerned about price surges influencing dollar totals, you can also use MedianVol() function that keys off of share volume instead of $ volume.

I hate liquidity based on AVERAGE daily activity. I’ve seen too many cases where stocks can pass that, yet have days in the month before or after the trade with a zero volume. So, instead, I use a MINIMUM daily activity. For example:

LoopMin(“Vol(CTR) * Close(CTR)”, 50) > 2000000 // Liquidity check

If something was “hovering” on that threshold, it wouldn’t bother me.

How does that loopmin loop work? If a stock has zero volume in one of the 50 days then it doesn’t pass the test?

It’s looking for the minimum traded amount (based on closing price and volume) over the past 50 days, so the test would fail if that minimum traded amount on any given day is not greater than $2,000,000…