日:=120; 昨前:=3;
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
H1:=高1-(高1-低1)*0.191;
H2:=高1-(高1-低1)*0.382;
H3:=高1-(高1-低1)*0.5;
H4:=高1-(高1-低1)*0.618;
H5:=高1-(高1-低1)*0.809;
LOW2:REFDATE(H5,DATE),COLORYELLOW,LINETHICK3;
LOW1:REFDATE(低1,DATE),COLORGREEN,LINETHICK3;
开盘第一笔主买:REF(V,BARSSINCE(TIME2>=093000)),NODRAW;
{第一次V不为0到现在的周期数}
A3:=CON2STR(开盘第一笔主买,0);
DRAWTEXT_FIX(1,0,0.65,0,''),COLORWHITE,LINETHICK2;
DRAWTEXT_FIX(1,0.60,0.05,1,A3),COLORWHITE,LINETHICK2;
开盘第一笔量:REF(V,BARSSINCE(TIME2>=093000)),NODRAW;
涨停:REF(C,1)*1.1,NODRAW,COLORRED;
跌停:REF(C,1)*0.9,NODRAW,COLORGREEN;
DRAWTEXT_FIX(1,0.073,0,0,HYBLOCK),COLORRED; {行业}
CJL:=IF(DYNAINFO(10)>99999999,STRCAT(CON2STR(DYNAINFO(10)/100000000,2)<10,''),STRCAT(CON2STR(DYNAINFO(10)/10000,0),'万'));
DRAWTEXT_FIX(1,0.75,0.25,0,CJL),COLORYELLOW;
金牛:(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),DOTLINE,COLORYELLOW;
金钻趋势:XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,LINETHICK2,COLORRED;
金牛2:EMA(金钻趋势,25)COLORCYAN,LINETHICK2;
DRAWBAND(金钻趋势,RGB(55,0,0),金牛2,RGB(0,91,0));
{DRAWKLINE(H,O,L,C);}
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,0,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,'▲买入'),COLORRED;
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
DDX:=((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,10000,10000),COLOR00AAAA,LINETHICK;
V2Z:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
V5:=SMA(V2Z*120/FROMOPEN*5,2,1);
V10:=SMA(V5,5,1);
V20:=SMA(V10,5,1);
DY:=CURRBARSCOUNT=1 AND C<REF(C,1);
DY2:=REF(V2Z,1)-DY;
XG2:=C>O AND DY2<0.02 AND MA(C,5)>MA(C,60) AND C/REF(C,1)>=1.02 AND H<金牛;
{DRAWTEXT(XG2,L,'▲抓牛'),COLORYELLOW;}
DRAWTEXT(XG2 AND L<金钻趋势,L,'↖金钻起涨'),COLORMAGENTA;
下降压力线:DRAWLINE(HIGH>=HHV(HIGH,100),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),10),LINETHICK2,COLORWHITE;
DRAWICON(CROSS(金牛,下降压力线) AND TIME>=1430 AND L,L,23);
VAR1:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;
VAR2:=SMA(VAR1,9,1)+100;
VAR3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR4:=SMA(VAR3,3,1); VAR5:=SMA(VAR4,3,1)+100;
VAR6:=VAR5-VAR2; 趋势:=IF(VAR6>45,VAR6-45,0);
{STICKLINE(REF(趋势,1)< 趋势, 趋势,REF(趋势,1),5,0),COLORFF00FF;
STICKLINE(REF(趋势,1)> 趋势, 趋势,REF(趋势,1),5,0),COLOR00FF00; }
强弱分界:=50,POINTDOT,COLORFFFFCC; 0,COLOR00FFFF; 20,POINTDOT,COLORFFAA66,LINETHICK1;
80,POINTDOT,COLORFFAA66,LINETHICK1; 100,COLORFFFF33;
V1:=LLV(LOW,10); V2:=HHV(H,25);
价位线:=EMA((C-V1)/(V2-V1)*4,4);
DRAWTEXT(CROSS(价位线,0.3),7,'●'),COLORFFFFFF;
DRAWTEXT(CROSS(3.5,价位线),102,'●'),COLORFFFFFF;
VAR2Q:=REF(LOW,1);
VAR3Q:=SMA(ABS(LOW-VAR2Q),3,1)/SMA(MAX(LOW-VAR2Q,0),3,1)*100;
VAR4Q:=EMA(IF(CLOSE*1.3,VAR3Q*10,VAR3Q/10),3); VAR5Q:=LLV(LOW,30);
VAR6Q:=HHV(VAR4Q,30); VAR7Q:=IF(MA(CLOSE,58),1,0);
VAR8Q:=EMA(IF(LOW<=VAR5Q,(VAR4Q+VAR6Q*2)/2,0),3)/618*VAR7Q;
VAR9Q:=IF(VAR8Q>100,100,VAR8Q); 吸筹:STICKLINE(VAR9Q>-120 AND TIME>1430,0,VAR9Q*999,6,1),COLORYELLOW;
AA3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;
AA4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
AA5:=SMA(AA4,13,8); 走势:=CEILING(SMA(AA5,13,8));
AA6:=SMA(AA3,21,8); 卖临界:=STICKLINE(走势-AA6>85,103,100,15,1),COLOR0000FF,LINETHICK2;
X1:=(C+L+H)/3;
BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);
DRAWTEXT(FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10),
EMA8*3333,'∠45'),COLORYELLOW;
MA5:MA(C,5);
MA10:MA(C,10);
MA20:=MA(C,20);
MA60:MA(C,60);
多头排列:=CROSS(MA5,MA10) AND CROSS(MA10,MA20);
DRAWICON(多头排列,L*5555,18);
SR11:=REF(HIGH,10)=HHV(HIGH,2*10+1);
SR21:=FILTER(SR11,10);
SR31:=BACKSET(SR21,10+1);
HDH:=FILTER(SR31,10);
前高G:=REF(H,BARSLAST(HDH));
倍量G:=VOL/REF(VOL,1)>=1.9;
突破前高G:=CROSS(C,前高G);
DRAWICON(CROSS(C,前高G)AND TIME<=0932,L,34),COLORYELLOW;