{訊號同時滿足}
{公式一 }
DIFF:=EMA(CLOSE,8)-EMA(CLOSE,13);
DEA:=EMA(DIFF,5);
A1:=DIFF>DEA;
RSV1:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
K:=SMA(RSV1,3,1);
D:=SMA(K,3,1);
A2:=K>D;
LC:=REF(CLOSE,1);
RSI1:=(SMA(MAX(CLOSE-LC,0),5,1))/(SMA(ABS(CLOSE-LC),5,1))*100;
RSI2:=(SMA(MAX(CLOSE-LC,0),13,1))/(SMA(ABS(CLOSE-LC),13,1))*100;
A3:=RSI1>RSI2;
RSV:=-(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*100;
LWR1:=SMA(RSV,3,1);
LWR2:=SMA(LWR1,3,1);
A4:=LWR1>LWR2;
BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
A5:=CLOSE>BBI;
MTM:=CLOSE-REF(CLOSE,1);
MMS:=100*EMA(EMA(MTM,5),3)/EMA(EMA(ABS(MTM),5),3);
MMM:=100*EMA(EMA(MTM,13),8)/EMA(EMA(ABS(MTM),13),8);
A6:=MMS>MMM;
漲買入:=IF((A1 AND A2 AND A3 AND A4 AND A5 AND A6) AND REF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,1)=0,7,0);
{公式二}
丁丁1:=EMA(C,3);
丁丁2:=EMA(C,5);
丁丁3:=EMA(C,7);
丁丁4:=EMA(C,12);
丁丁5:=EMA(C,20);
SS:=CROSS(丁丁1,丁丁2) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁1,丁丁4) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁2,丁丁3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁1,丁丁3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 AND CROSS(丁丁1,丁丁4);
DD:=CROSS(丁丁2,丁丁3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁2,丁丁5) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁3,丁丁4) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁2,丁丁4) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 AND CROSS(丁丁1,丁丁5);
XG:漲買入 AND SS AND DD;
=======================
{滿足其中一個訊號}
XG:漲買入 OR SS OR DD;
{訊號同時滿足}
{公式一 }
DIFF:=EMA(CLOSE,8)-EMA(CLOSE,13);
DEA:=EMA(DIFF,5);
A1:=DIFF>DEA;
RSV1:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
K:=SMA(RSV1,3,1);
D:=SMA(K,3,1);
A2:=K>D;
LC:=REF(CLOSE,1);
RSI1:=(SMA(MAX(CLOSE-LC,0),5,1))/(SMA(ABS(CLOSE-LC),5,1))*100;
RSI2:=(SMA(MAX(CLOSE-LC,0),13,1))/(SMA(ABS(CLOSE-LC),13,1))*100;
A3:=RSI1>RSI2;
RSV:=-(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*100;
LWR1:=SMA(RSV,3,1);
LWR2:=SMA(LWR1,3,1);
A4:=LWR1>LWR2;
BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
A5:=CLOSE>BBI;
MTM:=CLOSE-REF(CLOSE,1);
MMS:=100*EMA(EMA(MTM,5),3)/EMA(EMA(ABS(MTM),5),3);
MMM:=100*EMA(EMA(MTM,13),8)/EMA(EMA(ABS(MTM),13),8);
A6:=MMS>MMM;
漲買入:=IF((A1 AND A2 AND A3 AND A4 AND A5 AND A6) AND REF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,1)=0,7,0);
{公式二}
丁丁1:=EMA(C,3);
丁丁2:=EMA(C,5);
丁丁3:=EMA(C,7);
丁丁4:=EMA(C,12);
丁丁5:=EMA(C,20);
SS:=CROSS(丁丁1,丁丁2) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁1,丁丁4) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁2,丁丁3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁1,丁丁3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 AND CROSS(丁丁1,丁丁4);
DD:=CROSS(丁丁2,丁丁3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁2,丁丁5) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁3,丁丁4) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁2,丁丁4) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 AND CROSS(丁丁1,丁丁5);
XG:漲買入 AND SS AND DD;
=======================
{滿足其中一個訊號}
{公式一 }
DIFF:=EMA(CLOSE,8)-EMA(CLOSE,13);
DEA:=EMA(DIFF,5);
A1:=DIFF>DEA;
RSV1:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
K:=SMA(RSV1,3,1);
D:=SMA(K,3,1);
A2:=K>D;
LC:=REF(CLOSE,1);
RSI1:=(SMA(MAX(CLOSE-LC,0),5,1))/(SMA(ABS(CLOSE-LC),5,1))*100;
RSI2:=(SMA(MAX(CLOSE-LC,0),13,1))/(SMA(ABS(CLOSE-LC),13,1))*100;
A3:=RSI1>RSI2;
RSV:=-(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*100;
LWR1:=SMA(RSV,3,1);
LWR2:=SMA(LWR1,3,1);
A4:=LWR1>LWR2;
BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
A5:=CLOSE>BBI;
MTM:=CLOSE-REF(CLOSE,1);
MMS:=100*EMA(EMA(MTM,5),3)/EMA(EMA(ABS(MTM),5),3);
MMM:=100*EMA(EMA(MTM,13),8)/EMA(EMA(ABS(MTM),13),8);
A6:=MMS>MMM;
漲買入:=IF((A1 AND A2 AND A3 AND A4 AND A5 AND A6) AND REF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,1)=0,7,0);
{公式二}
丁丁1:=EMA(C,3);
丁丁2:=EMA(C,5);
丁丁3:=EMA(C,7);
丁丁4:=EMA(C,12);
丁丁5:=EMA(C,20);
SS:=CROSS(丁丁1,丁丁2) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁1,丁丁4) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁2,丁丁3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁1,丁丁3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 AND CROSS(丁丁1,丁丁4);
DD:=CROSS(丁丁2,丁丁3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁2,丁丁5) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁3,丁丁4) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(丁丁2,丁丁4) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 AND CROSS(丁丁1,丁丁5);
XG:漲買入 OR SS OR DD;