上穿均線是發(fā)出2的信號(hào),下穿均線時(shí)發(fā)出1的信號(hào)。當(dāng)1信號(hào)出現(xiàn)時(shí),2大于前低,1小于前高,則過濾1跟2的信號(hào)。
VARIABLE:A=0,B=0;
COND1:CROSS(C,MA2);
COND2:CROSS(MA2,C);
B:=COND1 AND COND2;
IF COND2 THEN COND3:C>REF(L,1);
IF COND1 THEN
BEGIN
COND4:C<REF(H,1);
COND5:COND4 AND COND3;
B:=0;//b為0則表示條件不成立
END