CJL1:=IF(DYNAINFO(10)>99999999,STRCAT(CON2STR(DYNAINFO(10)/100000000,2)<10,''),STRCAT(CON2STR(DYNAINFO(10)/10000,0),'万'));

DRAWTEXT_FIX(01,0.01,0.01.0,0,CJL1),COLOR0099FF;

{STICKLINE(CJL1,L,L*9,3,0),COLOR0099FF,LINETHICK9;}

{外盘:=SUM(BUYVOL,0),COLORRED;

内盘:=SUM(SELLVOL,0),COLORGREEN;

主动率:=((外盘-内盘)/(内盘+外盘))*100;

XXX:=外盘>内盘;

DRAWNUMBER_FIX(ISLASTBAR,0.5,0.2,0,V*100/CAPITAL>0.03 AND XXX),COLORYELLOW;}

高点:=50;

低点:=30;

GD:=CONST(FINDHIGH(H,0,高点*10,1));

DD:=CONST(FINDLOW(L,0,低点*10,1));

GT:=CONST(BARSLAST(GD=H))+1;

DT:=CONST(BARSLAST(DD=L))+1;

SH:=CONST(IF(GT=1,H,REF(H,GT-1)));

SL:=CONST(IF(DT=1,L,REF(L,DT-1)));

CC:=IF(DT>GT,DT,GT);

CD:=INTPART(CC-(DT+GT)/2);

CG:=IF(高点>CD,CD/2,高点);

下跌周期:BARSLAST(GD=H),COLORWHITE,NODRAW;

下跌幅:IF(CURRBARSCOUNT<=GT,C/SH*100-100,DRAWNULL),NODRAW,COLORGREEN;

下跌均价:IF(CURRBARSCOUNT<=GT,SUM(AMOUNT,GT)/SUM(V,GT)/100,DRAWNULL),NODRAW,COLORLIGRAY;

跌换手%:IF(CURRBARSCOUNT<=GT,SUM(HSL.HSL,GT),DRAWNULL),COLORCYAN,NODRAW;

上涨周期:IF(CURRBARSCOUNT<=DT,BARSLAST(DD=L),DRAWNULL),COLORWHITE,NODRAW;

上涨幅:IF(CURRBARSCOUNT<=DT,C/SL*100-100,DRAWNULL),NODRAW,COLORRED;

上涨均价:IF(CURRBARSCOUNT<=DT,SUM(AMOUNT,DT)/SUM(V,DT)/100,DRAWNULL),NODRAW,COLORLIGRAY;

涨换手%:IF(CURRBARSCOUNT<=DT,SUM(HSL.HSL,DT),DRAWNULL),COLORLIMAGENTA,NODRAW;

星期:=VARCAT(VARCAT('(',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五','')))))),')');

日期:=VARCAT('-',VARCAT(VARCAT(VARCAT(VARCAT(VARCAT(VARCAT(VAR2STR(YEAR,0),'年'),VAR2STR(MONTH,0)),'月'),VAR2STR(DAY,0)),'日'),星期));

{自动黄金分割 普通等系坐标}

STICKLINE(CURRBARSCOUNT=DT AND TIME<=0935,SL*20 ,SL,1,0),COLORMAGENTA;

{STICKLINE(CURRBARSCOUNT=GT,SH,SH-SH*0.9,0,-1),COLORGREEN;}

{DRAWTEXT(CURRBARSCOUNT=DT ,(SL+SL*1.2)/2,日期),COLORYELLOW;

DRAWTEXT(CURRBARSCOUNT=GT ,GD*0.97,日期),COLORYELLOW;}

金牛:=(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),LINETHICK2,COLORCYAN;

金钻趋势:=XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,COLORCYAN;

金牛2:=EMA(金钻趋势,25)COLORCYAN;

{STICKLINE(金钻趋势>LOW AND 金钻趋势<HIGH,金钻趋势,MIN(MIN(OPEN,CLOSE),金钻趋势),2,0),COLORYELLOW;

STICKLINE(金钻趋势>MIN(C,O) AND 金钻趋势<MAX(C,O),金钻趋势,MIN(OPEN,CLOSE),2,0),COLORYELLOW;

STICKLINE(金钻趋势>HIGH,OPEN,CLOSE,2,0),COLORYELLOW;

STICKLINE(金钻趋势>HIGH,HIGH,LOW,2,0),COLORYELLOW;}

VAR23:=100*XMA(XMA((C-REF(C,1)),6),6)/XMA(XMA(ABS((C-REF(C,1))),6),6);

回调买:=LLV(VAR23,2)=LLV(VAR23,7) AND COUNT(VAR23<0,2) AND CROSS(VAR23,MA(VAR23,2));

XG:=金钻趋势>HIGH AND 回调买 AND L<=金钻趋势;

{DRAWTEXT(XG,L+0.04,'▲买入'),COLORMAGENTA;}

{STICKLINE(XG,L,L*9,3,0),COLOR0099FF,LINETHICK9;}

N:=CURRBARSCOUNT;

B:=C<REF(C,4);

T1:= BARSLASTCOUNT(B);

A_B1:=(T1>9) AND MOD(T1,9)=1;

A_B2:=(T1>9) AND MOD(T1,9)=2;

A_B8:=(T1>9) AND MOD(T1,9)=8;

A_B9:=(T1>9) AND MOD(T1,9)=0;

B1:=(N=6 AND REFXV(COUNT(B,6),5)=6) OR (N=7 AND REFXV(COUNT(B,7),6)=7) OR (N=8 AND REFXV(COUNT(B,8),7)=8) OR (N>=9 AND REFXV(COUNT(B,9),8)=9);

DRAWNUMBER(B1 AND (REF(B,1)=0 OR A_B1),L,1),COLORMAGENTA;

B2:=(N=5 AND REFXV(COUNT(B,6),4)=6) OR (N=6 AND REFXV(COUNT(B,7),5)=7) OR (N=7 AND REFXV(COUNT(B,8),6)=8) OR (N>=8 AND REFXV(COUNT(B,9),7)=9);

DRAWNUMBER(B2 AND(REF(B,2)=0 OR A_B2),L,2),COLORMAGENTA;

B8:=(N=1 AND COUNT(B,8)=8) OR (N>=2 AND REFXV(COUNT(B,9),1)=9);

DRAWNUMBER(B8 AND (REF(B,8)=0 OR A_B8),L,8),COLORMAGENTA;

B9:=(N>=1 AND COUNT(B,9)=9);

DRAWNUMBER(B9 AND (REF(B,9)=0 OR A_B9),L,9),COLORRED;

S:=C>REF(C,4);

T2:= BARSLASTCOUNT(S);

A_S1:=(T2>9) AND MOD(T2,9)=1;

A_S2:=(T2>9) AND MOD(T2,9)=2;

A_S9:=(T2>9) AND MOD(T2,9)=0;

S1:=(N=6 AND REFXV(COUNT(S,6),5)=6) OR (N=7 AND REFXV(COUNT(S,7),6)=7) OR (N=8 AND REFXV(COUNT(S,8),7)=8) OR (N>=9 AND REFXV(COUNT(S,9),8)=9);

DRAWNUMBER(S1 AND (REF(S,1)=0 OR A_S1) AND TIME<=0935,H*7,1),COLORRED,DRAWABOVE;

S2:=(N=5 AND REFXV(COUNT(S,6),4)=6) OR (N=6 AND REFXV(COUNT(S,7),5)=7) OR (N=7 AND REFXV(COUNT(S,8),6)=8) OR (N>=8 AND REFXV(COUNT(S,9),7)=9);

DRAWNUMBER(S2 AND (REF(S,2)=0 OR A_S2) AND TIME<=0935 ,H*9,2),COLORRED,DRAWABOVE;

S8:=(N=1 AND COUNT(S,8)=8) OR (N>=2 AND REFXV(COUNT(S,9),1)=9);

YY:=DRAWNUMBER(S1 AND (REF(S,1)=0 OR A_S1) AND TIME<=0935,H,1),COLORGREEN,DRAWABOVE;

ZZ:=DRAWNUMBER(S2 AND (REF(S,2)=0 OR A_S2) AND TIME<=0935 ,H*9,2),COLORGREEN,DRAWABOVE;

{STICKLINE((YY) AND (CJL1) AND TIME<=0935,L,L*6,1000,0)COLORYELLOW;

STICKLINE((ZZ) AND (CJL1) AND TIME<=0935,L,L*6,1000,0)COLORYELLOW;

}

DIF:=EMA(CLOSE,9)-EMA(CLOSE,21);

DEA:=EMA(DIF,7);

MACD:=(DIF-DEA)*2;

死叉:=CROSS(DEA,DIF) AND DEA>0;

卖压:=REF(H,BARSLAST(死叉));

突破:=CROSS(C,卖压) AND (C-REF(C,1))/REF(C,1)*100>3;

STICKLINE((突破)AND TIME<=0935,L,L*6,2,0)COLORGREEN;

VAB0:=13;

VAB1:=1500000;

VAB2:=VAB0 + VAB1;

VAB3:=IF(DATE > VAB2,0,1);

LC:=REF(CLOSE,1);

SG:=EMA(HHV(HIGH,1),8);

X1:=EMA(CLOSE,8);

X30:=((X1 < REF(X1,1)) AND (CLOSE < X1));

X31:=IF(((SG < REF(SG,1)) OR X30),1,0);

操作线:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100,COLORRED,LINETHICK2;

震仓:=45,COLORMAGENTA;

底线:=20,COLORGREEN;

PP:=操作线< 震仓 AND REF(操作线,1)>震仓 ;

PP3:=操作线< 底线 AND REF(操作线,1)>底线*VAB3;

抓牛:(((((COUNT((X31 = 1),4) = 3) AND (X31 = 0))AND O< C AND (((C-REF(C,1))/REF(C,1))>0.04))*10) >=10)OR((C-REF(C,1))/REF(C,1)>0.065 AND (REF(PP3,1) OR REF(PP,1))) AND VAB3=1,STICK,COLORMAGENTA,LINETHICK4;

DRAWTEXT(抓牛,抓牛*91,' ←反转'),COLORYELLOW;

强反转:(H-REF(C,1))/REF(C,1)*100,NODRAW;