{安全建倉區}
RSV1:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100;
K11:=SMA(RSV1,3,1);
D11:=SMA(K11,3,1);
TJ:=:=D11>90;
安上線:IF((TJ),REF(HIGH,(TJ)),),,;
安下線:IF((TJ),REF(LOW,(TJ)),),,;
安全帶:(D11,安上線*0.996,安下線*1.005,8,0),;
TY:=C;
HD:=(((REF(TY,10)=HHV(TY,2*10+1),10),10+1),10);
LD:=(((REF(TY,10)=LLV(TY,2*10+1),10),10+1),10);
A:=REF(C,(HD));
B:=REF(C,(LD));
T1:=(HD)T2:=(HD)>(LD) AND NOT(LD);
浪頂:IF(T1,A,A),,;
前高:REF(H,(HD)),;
{(T1,A,A,9,0),;}
浪底:IF(T2,B,B),;
前低:REF(L,(LD)),,;
(前高,RGB(030,100,030),浪頂,);
(浪底,RGB(100,00,45),前低,);
{周框}
ZD:=DATE#WEEK;
ZH:=H#WEEK;
ZL:=L#WEEK;
K0:=ZD>REF(ZD,1) OR (C)=0;
K1:=REFX(K0,1) OR ;
S1:=MOD(SUM(K0,0),2);
N1:=20;
S2:=(,(K0,N1));
((K0 OR K1) AND S2,ZH,ZL,0,-1),;
(K0 AND S1=1 AND S2,ZH,K1 AND S1=1 AND S2,ZH,0),;
(K0 AND S1=1 AND S2,ZL,K1 AND S1=1 AND S2,ZL,0),;
(K0 AND S1=0 AND S2,ZH,K1 AND S1=0 AND S2,ZH,0),;
(K0 AND S1=0 AND S2,ZL,K1 AND S1=0 AND S2,ZL,0),;
{趨勢+趨勢K}
SJTJ:=:=(H*18+REF(H,1)*17+REF(H,2)*16+REF(H,3)*15+REF(H,4)*14+REF(H,5)*13+REF(H,6)*12+REF(H,7)*11+REF(H,8)*10+REF(H,9)*9+REF(H,10)*8+REF(H,11)*7+REF(H,12)*6+REF(H,13)*5+REF(H,14)*4+REF(H,15)*3+REF(H,16)*2+REF(H,17)*1)/171;
MAL:=(L*18+REF(L,1)*17+REF(L,2)*16+REF(L,3)*15+REF(L,4)*14+REF(L,5)*13+REF(L,6)*12+REF(L,7)*11+REF(L,8)*10+REF(L,9)*9+REF(L,10)*8+REF(L,11)*7+REF(L,12)*6+REF(L,13)*5+REF(L,14)*4+REF(L,15)*3+REF(L,16)*2+REF(L,17)*1)/171;
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA60:=MA(CLOSE,60);
DK:= SJTJ AND( CLOSE>=MAH OR (C>MA5 AND C>MA10 AND C>MA20 AND C>MA60));
KK:= SJTJ AND( MAL>CLOSE OR (CDK1:=(DK);
KK1:=(KK);
DK2:=(CROSS(KK1,DK1));
KK2:=(CROSS(DK1,KK1));
HS:=DK2LS:=KK2W2:=OPEN-CLOSE;
HT:=IF(OPEN>CLOSE,OPEN,CLOSE);
LT:=IF(OPEN{趨升K}
(W2>0 AND HS,OPEN,CLOSE,2,0),;
(W2>0 AND HS,OPEN,H,0.0,0),;
(W2>0 AND HS,C,L,0.0,0),;
(W20 AND LS,C,L,0.0,0);
(W270,H+0.05,'←抛'),;
VAR9:=CLOSE-REF(CLOSE,5);
VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5);
VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20);
賣出:=IF(VARA>0 AND CROSS(VARC,VARA),90,100);
{(賣出買線:=EMA(CLOSE,2);
賣線:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);
底1:IF(CROSS(買線,賣線),L-0.02,),,,;
(CROSS(買線,賣線)AND V/REF(V,1)>=2.0,L*0.98,'起爆'),;
頂:IF(CROSS(80,RSI)*30,H+0.02,),,,;
VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA (CLOSE,32))/MA(CLOSE,32)*100)/3;
頂1:IF(VC>20 AND (VC< REF(VC,1),5),H+0.02,),,,;
A0:=(L+H+C*2)/4;
A1B:EMA(A0,14),,;
A2B:=EMA(A0,25),,;
A1X:=(A1B-REF(A1B,1))/REF(A1B,1)*100,;
A2X:=(A2B-REF(A2B,1))/REF(A2B,1)*100,;
看多:IF(A1X>=0 AND (CROSS(A1X,0))>0,REF((C+O)/2,(CROSS(A1X,0))),),,;
逃頂:IF(A1X0,REF((C+O)/2,(CROSS(0,A1X))),),,;
持股:IF(A1X>=0,A1B,),;
空倉:IF((CROSS(A1X,0),H,L,0,0 ),;
(CROSS(A1X,0),C,O,2,0 ),;
(CROSS(A1X,0),C,O,1,0 ),;
(CROSS(0,A1X),L,H,0,0 ),;
{金底背離}
DIFF:=EMA(CLOSE,7) - EMA(CLOSE,13);
DEA:= EMA(DIFF,3);
A1:=(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)RSV:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
A2:=(REF(CROSS(K,D),1));
B2:=REF(C,A2+1)>C AND REF(K,A2+1)LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),7,1)/SMA(ABS(CLOSE-LC),7,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;
A3:=(REF(CROSS(RSI1,RSI2),1));
B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1)TYB:=(HIGH + LOW + 2*CLOSE)/4;
CCI4:=(TYB-MA(TYB,28))/(0.015*(TYB,28));
B4:=(NOT(MA(C,5)REF(CCI4,1) AND CROSS(CCI4,-100));
底背離:=((B1 AND B2) OR (B2 AND B3) OR (B1 AND B3) OR ( B4 AND (底背離,(LOW * 0.98),1);
(底背離,(LOW * 0.97),'金底背離'),;
{絕頂 }
日:=150;昨前:=3;
高1:=REF(HHV(H,日),昨前);
頂3:(高1,DATE),;
絕頂:=(頂3,DATE),;
跑:=絕頂=H AND ((C-L)
有話要說...