筹码峰长(源码,贴图)
网上类似的指标,大部分把筹码分布空间分成100或50等分,求最长峰,虽然精确一下,但计算太慢,等于没用
以下仅仅是把筹码分布空间分成10等分,求最长峰,计算快一些
喜欢就拿去!
{筹码峰长}
HL:=(COST(97)-COST(3))/10;
CM1:=WINNER(COST(3)+HL*1)-WINNER(COST(3)+HL*0);CM2:=WINNER(COST(3)+HL*2)-WINNER(COST(3)+HL*1);
CM3:=WINNER(COST(3)+HL*3)-WINNER(COST(3)+HL*2);CM4:=WINNER(COST(3)+HL*4)-WINNER(COST(3)+HL*3);
CM5:=WINNER(COST(3)+HL*5)-WINNER(COST(3)+HL*4);CM6:=WINNER(COST(3)+HL*6)-WINNER(COST(3)+HL*5);
CM7:=WINNER(COST(3)+HL*7)-WINNER(COST(3)+HL*6);CM8:=WINNER(COST(3)+HL*8)-WINNER(COST(3)+HL*7);
CM9:=WINNER(COST(3)+HL*9)-WINNER(COST(3)+HL*8);CM10:=WINNER(COST(3)+HL*10)-WINNER(COST(3)+HL*9);
MXCM:=MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(CM1,CM2),CM3),CM4),CM5),CM6),CM7),CM8),CM9),CM10);
峰价上:IF(CM10>=MXCM,COST(3)+HL*10,IF(CM9>=MXCM,COST(3)+HL*9,IF(CM8>=MXCM,COST(3)+HL*8,
IF(CM7>=MXCM,COST(3)+HL*7,IF(CM6>=MXCM,COST(3)+HL*6,IF(CM5>=MXCM,COST(3)+HL*5,
IF(CM4>=MXCM,COST(3)+HL*4,IF(CM3>=MXCM,COST(3)+HL*3,IF(CM2>=MXCM,COST(3)+HL*2,
IF(CM1>=MXCM,COST(3)+HL*1,0)))))))))),COLORWHITE;
峰价下:峰价上-HL,COLORWHITE;
峰价中:峰价上-HL*0.5,COLORMAGENTA;
峰量:MXCM*100,NODRAW;