(1)買入條件是短期RSI上穿長期RSI
LC := REF(CLOSE,1);
RSI$1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
RSI$2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
RSI$3:=SMA(MAX(CLOSE-LC,0),24,1)/SMA(ABS(CLOSE-LC),24,1)*100;
CROSS(RSI$1,RSI$3);
(2)賣出條件是短期RSI下穿長期RSI
CROSS(RSI$3,RSI$1);
(1)買入條件是短期RSI上穿長期RSI
LC := REF(CLOSE,1);
RSI$1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
RSI$2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
RSI$3:=SMA(MAX(CLOSE-LC,0),24,1)/SMA(ABS(CLOSE-LC),24,1)*100;
CROSS(RSI$1,RSI$3);
(2)賣出條件是短期RSI下穿長期RSI
LC := REF(CLOSE,1);
RSI$1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
RSI$2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
RSI$3:=SMA(MAX(CLOSE-LC,0),24,1)/SMA(ABS(CLOSE-LC),24,1)*100;
CROSS(RSI$3,RSI$1);