In stock selection using position score (see position score in documents) I use the correlation function which is supposed to rank stocks correlated to the All Ordinaries. Notice how I have incorporated a linear regression slope above 0 for 20 periods on the All Ords. to rank stocks accordingly. These parameters can be altered and ultimately when testing history, the period look back has a significant bearing. Also I have a shorter period on the liquidity filter so those initial rushes for less traded stocks have a chance at selection.
Index = LinRegSlope(Foreign("^AORD", "C", True), 20) > 0;
PositionScore = Correlation(Index, C, 10);
Turnover = MA(C*V, 10) > 50000;