K1:=SMA(RSV,10,1);
D1:=SMA(K1,5,1);
KK:=INTPART(K1);
DD0:=INTPART(D1);
TFXXS:=KK+DD0;
TGLD:=MOD(TFXXS,10);
TGLXS:=(TFXXS-REF(TFXXS,1))*10;
TYCFX:=TFXXS+TGLXS;
乖离系数:TGLXS,LINETHICK0,COLORGREEN,NODRAW;
安全线: EMA(CLOSE,55),COLORLIGREEN,DOTLINE;
EMA30:EMA(CLOSE,30),NODRAW;
EMA5:=EMA(CLOSE,5);
X2:=EMA5;
X3:=EMA30;
主升:=C>X2 AND C>X3;
主跌:=C>X3;
回调:=C>X2 AND C>X3;
反弹:=C>X2 AND C>X3;
均价线:=AMOUNT/V/100;
C2:=REF(C,1);
AA1:MA(C,4),COLORRED,LINETHICK4;
卖出:IF(AA1>=REF(AA1,1),AA1,DRAWNULL),LINETHICK4,COLORGREEN;
LC:=REF(CLOSE,1);
理想通:=EMA((C-LLV(L,5))/(HHV(H,6)-LLV(L,6)),2)*100,COLORYELLOW,LINETHICK1;
VARB1:=SMA(SMA(理想通,2,1),2,1);
VARB2:=(VARB1/2+36.8)*1;
VARB3:=SMA(VARB2,2,1)+2.2,COLORFFFF00;
VARB4:=SMA(VARB2,2,1)-35.08,COLOR00FF00,LINETHICK1;
卖出1:DRAWTEXT(CROSS(VARB3,理想通*0.9998+0.0018) AND VARB3>67 ,H*1.0012,'--卖出 '),COLOR00FF00;
卖出2:DRAWTEXT(CROSS(VARB3,理想通*0.9998+0.0018) AND VARB3>67 ,H*1.0112,' '),COLOR00FF00;
加仓:DRAWTEXT(CROSS(理想通,VARB4*0.9998+0.0018),L*0.988,'★--加仓 '),COLOR0000FF;
{做空}
VAR6S:=REF(C,1);
VAR7S:=SMA(MAX(C-VAR6S,0),6,1)/SMA(ABS(C-VAR6S),6,1)*100;
DRAWTEXT(CROSS(82,VAR7S),H*1.02568,'