Well then you might change your order size depending on how liquid the stock is so that when you do get bad fills on relatively illiquid stocks, you won't be hurt as much.
Thats difficult to backtest/ program because previous day's liquidity doesnt usually reflect the current days. So I could say only trade stocks that did x yesterday at x volume but the next day that stock's volume could be 1/10th of the previous day's.
