VAR1:=EMA(WINNER(CLOSE)*70,3);
VAR2:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);
VAR8:=VAR2/(VAR1+VAR2)*100;
VAR9:=VAR1/(VAR1+VAR2)*100+1;
散筹:=INTPART(VAR8),COLORGREEN,LINETHICK1;
散均:=EMA(散筹,13),COLORCYAN,LINETHICK2;
主筹:=INTPART(VAR9),COLORYELLOW,LINETHICK1;
主均:=EMA(VAR1,13),COLORMAGENTA,LINETHICK2;
买入:=crOSS(主筹,主均),COLORRED;
买入2:=CROSS(散均,散筹) AND 主筹>REF(主筹,1),COLORYELLOW;
XG:买入 AND 买入2;