HL:=(COST(95)-COST(5))/(COST(95)+COST(5))*100;
{ 计算95%到5%成本区间的筹码分布宽度,即筹码集中度 }
CM1:=WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9)*100;
{ 计算收盘价上下10%的筹码分布比例 }
CM2:=WINNER(MA(CLOSE,5))-WINNER(MA(CLOSE,5)*0.9)*100;
{ 计算5日均线上下10%的筹码分布比例 }
CM3:=WINNER(MA(CLOSE,13))-WINNER(MA(CLOSE,13)*0.9)*100;
{ 计算13日均线上下10%的筹码分布比例 }
CM4:=WINNER(MA(CLOSE,34))-WINNER(MA(CLOSE,34)*0.9)*100;
{ 计算34日均线上下10%的筹码分布比例 }
CM5:=WINNER(MA(CLOSE,55))-WINNER(MA(CLOSE,55)*0.9)*100;
{ 计算55日均线上下10%的筹码分布比例 }
CM6:=WINNER(MA(CLOSE,89))-WINNER(MA(CLOSE,89)*0.9)*100;
{ 计算89日均线上下10%的筹码分布比例 }
CM7:=WINNER(MA(CLOSE,144))-WINNER(MA(CLOSE,144)*0.9)*100;
{ 计算144日均线上下10%的筹码分布比例 }
{ 计算最大筹码峰值 }
MXCM:=MAX(MAX(MAX(MAX(MAX(MAX(CM1,CM2),CM3),CM4),CM5),CM6),CM7);
{ 计算区间重合度,即最大筹码峰值占总筹码峰的比例 }
区间重合度:=MAX(MXCM/(CM1+CM2+CM3+CM4+CM5+CM6+CM7)*100,CM1*100);
{ 选股条件:筹码峰重合度大于50% }
选股:区间重合度>50;