DIFF:-1*(EMA(A1,26) - EMA(A1,12))/200;
DEA:-1*(EMA(DIFF,9))/200,COLORRED;
MACD:2000*(DIFF-DEA),COLORSTICK,LINETHICK2;
{柱线颜色}
S1:=MACD REF(MACD,1)AND MACD
S2:=MACD REF(MACD,1)/2 AND MACD
STICKLINE(MACD =0,MACD,0,3,1),COLORRED;
STICKLINE(S1,0,MACD,3,1),COLOR00FFFF;
STICKLINE(S2,0,MACD,2,0),COLORFFFFFF;
STICKLINE(MACD REF(MACD,1)AND MACD 0,0,MACD,3,1),COLORFFFF00;
{老龍股}
VAR4:=(2*CLOSE+HIGH+LOW)/4;
VAR5:=LLV(LOW,34);
VAR6:=HHV(HIGH,34);
持股: EMA((VAR4-VAR5)/(VAR6-VAR5)*100,11),COLORFF00FF,LINETHICK2;
必卖: EMA(0.667*REF(持股,1)+0.333*持股,4),COLORFFFF00,LINETHICK2;
{分界线:30,CROSSDOT,COLORWHITE;}
DRAWTEXT(CROSS(持股,必卖) AND 持股 22,7,'▓'),COLORCCCCFF,LINETHICK2;
DRAWTEXT(CROSS(持股,必卖) AND 持股 25,18,'●'),COLORRED;
DRAWTEXT(CROSS(持股,30) AND 必卖 持股,30,'□'),COLORWHITE,LINETHICK2;
DRAWICON(CROSS(持股,30) AND 必卖 持股,35,8);
DRAWTEXT(CROSS(持股,65) AND 必卖 持股,50,'◆'),COLORFF00FF;
DRAWICON(CROSS(持股,65) AND 必卖 持股,70,7);
DRAWTEXT(CROSS(持股,75) AND 必卖 持股,67,'○'),COLORRED,LINETHICK2;
DRAWICON(CROSS(持股,75) AND 必卖 持股,75,12);
DRAWICON(CROSS(必卖,持股) AND 必卖 75,85,11);
逢低吸纳: IF(CROSS(持股,必卖) AND 持股 40,9,0),STICK,COLORGREEN,LINETHICK4;
逢高减磅: IF(CROSS(必卖,持股) AND 必卖 75,75,90),COLORRED,LINETHICK2;
资金:=3*SMA((C-LLV(L,89))/(HHV(H,89)-LLV(L,89))*100,5,1)
-2*SMA(SMA((C-LLV(L,89))/(HHV(H,89)-LLV(L,89))*100,5,1),3,1);
见顶线:=EMA(资金,2);
股票:=(见顶线-REF(见顶线,1))/REF(见顶线,1)*100;
减仓:STICKLINE(REF(见顶线,1) 91.2 AND 股票 0,92,80,3,0),COLORYELLOW,LINETHICK2;
清仓: DRAWTEXT(CROSS(必卖,持股) AND 必卖 85,92,'●'),COLOR00FF00,LINETHICK4;
{多空}
RSVP:=(C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100-50;
KV:=SMA(RSVP,3,1);
DV:=SMA(KV,3,1);
JV:=3*KV-2*DV;
ZDZK1:=EMA(JV,6);
ZDZK2:=REF(ZDZK1,1);
做多:IF(ZDZK1 =ZDZK2,ZDZK1+2,ZDZK2),COLORRED;
做空:IF(ZDZK2-ZDZK1,ZDZK2,ZDZK1),COLORGREEN;
XW1:=IF(O =REF(O,1),0,MAX((H-O),(O-REF(O,1))));
XW2:=IF(O =REF(O,1),0,MAX((O-L),(O-REF(O,1))));
XW3:=SUM(XW1,21);
XW4:=SUM(XW2,21);
XW5:=IF(XW3 XW4,(XW3-XW4)/XW3,IF(XW3=XW4,0,(XW3-XW4)/XW4));