Every algorithmic trader has to invent an indicator sooner or later, so here's now my contribution, the Market Meanness Index :). Here's the algorithm in C, applied to a data series:
double MMI(double *Data, int TimePeriod)
{
double m = Median(Data,TimePeriod);
int i, nh=0, nl=0;
for(i=1; i...