VAR1:=(((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9)))*100);
VAR2:=SMA(VAR1,3,1);
VAR3:=SMA(VAR2,3,1);
VAR4:=3*VAR2-2*VAR3;
VAR5:=(2*C+H+L)/4;
VAR6:=LLV(L,5);
VAR7:=HHV(H,5);
大户买入:IF(CROSS(VAR4,3),65,0),COLORFF00FF,LINETHICK3;
散户买:EMA((VAR5-VAR6)/(VAR7-VAR6)*100,5),COLORRED;
散户卖:EMA(散户买,3),COLORFFFF00;
趋向:3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),COLOR00FFFF;
VAR8:=CROSS(趋向,散户卖);
VAR9:=CROSS(散户卖,趋向);
主力建仓:IF(趋向<5,40,0),COLORFFFFFF,LINETHICK3;
主力加仓:IF(趋向<=3,20,0),COLOR00FF00,LINETHICK3;
VAR10:=REF(主力加仓,1) AND REF(大户买入,1) AND REF(CROSS(散户买,散户卖),1) AND 趋向>5;
VAR11:=REF(主力加仓,1) AND REF(大户买入,1) AND CROSS(散户买,散户卖) AND 趋向>5;
VAR12:=散户买<20 AND 散户卖<20 AND 趋向<10;
VAR13:=C/REF(C,1)>1.095 AND C=L;
VAR14:=(REF(VAR12,1) AND CROSS(VAR4,3) AND C>O AND C>REF(MIN(C,O),1)) AND MA(C,7)<MA(C,22) AND MA(C,22)<MA(C,55) AND PPART(100)*100>20 AND NOT(REF(VAR13,1));
VAR15:=EMA(CLOSE,180)-EMA(CLOSE,520);
VAR18:=EMA(VAR15,240);
VAR19:=(VAR15-VAR18)*2;
趋势比:ABS(趋向-散户买)/ABS(散户买-散户卖),NODRAW;
DRAWTEXT(VAR14,大户买入*1.5,'大底来临'),COLORRED;
DRAWICON(VAR14,大户买入*1.3,9);
DRAWTEXT(主力建仓=40,45,''),COLORWHITE;
DRAWTEXT_FIX(C>O,0,0.2,0,',公式源码 '),COLOR333333;
DRAWTEXT(CROSS(散户买,散户卖),散户买,' B'),COLORRED;
DRAWTEXT(CROSS(散户卖,散户买),散户卖,' S'),COLORGREEN;
DRAWICON(CROSS(散户买,散户卖),散户买*1,1);
DRAWICON(CROSS(散户卖,散户买),散户卖*1,2);
DRAWICON(VAR8,趋向*1,11);
DRAWICON(VAR9,趋向*1,12);
DRAWTEXT(VAR10,散户买*1.05,'有底基因');
DRAWTEXT(VAR11,散户买*1.05,'有底基因');
STICKLINE(VAR19>REF(VAR19,1) AND REF(VAR19,1)<REF(VAR19,2) AND VAR19<0 AND REF(WINNER(C)*100<10,1),0,20,2,0),COLORRED;
STICKLINE(VAR19<REF(VAR19,1) AND REF(VAR19,1)>REF(VAR19,2) AND VAR19>0,0,20,2,0),COLORGREEN;
STICKLINE(VAR19>REF(VAR19,1) AND REF(VAR19,1)<REF(VAR19,2) AND VAR19>0 AND REF(WINNER(C)*100<10,1),0,20,2,0),COLORRED;