AA:=C-REF(C,1);
AB:=100*EMA(EMA(AA,6),6)/EMA(EMA(ABS(AA),6),6);
SHORT:=7; LONG:=19;
RMA:=EMA(CLOSE,SHORT);
NMA:=EMA(CLOSE,LONG);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV(L,BARSLAST(CROSS(NMA,RMA))+1),H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),0);
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV(L,BARSLAST(CROSS(NMA,RMA))+1),0);
买进:=(LLV(AB,2)=LLV(AB,7) AND COUNT(AB<0,2) AND CROSS(AB,MA(AB,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1);
出击:买进=0; |