A2:=BARSLAST(REF(CROSS(K,D),1));
B2:=REF(C,A2+1)>C AND REF(K,A2+1)<K AND CROSS(K,D);
DRAWTEXT(IF(B2>0,1,0),L-0.25,'KDJ底背'),COLORYELLOW;
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));
B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1)<RSI1 AND CROSS(RSI1,RSI2);
DRAWTEXT(IF(B3>0,1,0),L-0.1,'RSI底背'),COLORCYAN;
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
DRAWTEXT(IF(D1>0,1,0),H+0.05,'MACD顶背'),COLORWHITE;
C2:=BARSLAST(REF(CROSS(D,K),1));
D2:=REF(C,C2+1)<C AND REF(K,C2+1)>K AND CROSS(D,K);
DRAWTEXT(IF(D2>0,1,0),H+0.20,'KDJ顶背'),COLORWHITE;
C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));
D3:=REF(C,C3+1)<C AND REF(RSI1,C3+1)>RSI1 AND CROSS(RSI2,RSI1);
DRAWTEXT(IF(D3>0,1,0),H+0.2,'RSI顶背'),COLORWHITE;
DRAWTEXT(CROSS(ZIG(3,8),REF(ZIG(3,8),1)),LOW*1.06,'【绝佳】') ,LINETHICK3,COLORYELLOW;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.03,'卖'),COLORCYAN,LINETHICK2;
gj:=if(c=INDEXC,(INDEXC+INDEXh+INDEXl+INDEXO)/4,AMOUNT/(v+0.01)/100);
明日阻力:=l+(gj-l)+(c-l);
明日支撑:=l+(c-gj);
明日阻力:=l+(gj-l)+(c-l);
明日支撑:=l+(c-gj);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);
STICKLINE(DISPSTATUS=2 and c>=今日阻力,今日阻力,今日阻力,30,0),Color0000FF;
STICKLINE(DISPSTATUS=2 and c<今日阻力,今日阻力,今日阻力,30,0),Color00FF00;
STICKLINE(DISPSTATUS=2 and c>=今日支撑,今日支撑,今日支撑,30,0),ColorFF00FF;
STICKLINE(DISPSTATUS=2 and c<今日支撑,今日支撑,今日支撑,30,0),ColorFF0000;
DRAWTEXTREL(10,10,'------------------------------------'),ColorFFFFFF;
IF BARSTATUS=2 and c>=今日支撑 THEN
DRAWTEXTREL(10,50,'今日支撑:'+NUMTOSTRN(今日支撑 ,2 )),ColorFF00FF;
IF BARSTATUS=2 and c<今日支撑 THEN
DRAWTEXTREL(10,50,'今日支撑:'+NUMTOSTRN(今日支撑 ,2 )),ColorFFFFFF;
IF BARSTATUS=2 and c>=今日阻力 THEN
DRAWTEXTREL(10,120,'今日阻力:'+NUMTOSTRN(今日阻力 ,2 )),Color0000FF;
IF BARSTATUS=2 and c<今日阻力 THEN
DRAWTEXTREL(10,120,'今日阻力:'+NUMTOSTRN(今日阻力 ,2 )),Color00FF00;
IF BARSTATUS=2 and c>=明日支撑 THEN
DRAWTEXTREL(100,50,'明日支撑:'+NUMTOSTRN(明日支撑 ,2 )),Color00FFFF;
IF BARSTATUS=2 and c<明日阻力 THEN
DRAWTEXTREL(100,120,'明日阻力:'+NUMTOSTRN(明日阻力 ,2 )),Color00FFFF;
DRAWTEXTREL(10,160,'------------------------------------'),ColorFFFFFF;