A1:=MA5 > MA10;
A2:=MA10>MA20;
A3:=A1 AND A2;{均线多头排列}
B1:=(OPEN-MA20)/MA20>-0.01 AND (OPEN-MA20)/MA20<0.01;{开盘价与20均线在+-0.01内}
B2:=MIN(OPEN,CLOSE );
B3:=(B2-MA20)/MA20>-0.01 AND (B2-MA20)/MA20<0.01;
B4:=(LOW-MA20)/MA20>-0.01 AND (LOW-MA20)/MA20<0.01;
B5:=B3 AND B4;
B6:=B1 OR B5;{股价开盘或下引线在20日线的正负1%得范围}
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
买进LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))),COLORRED;
DRAWTEXT(买进,0.5,'↖买进'),COLORYELLOW;