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(01,0.01,0.40.0,0,CJL),COLOR0099FF;
金牛:=(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;
{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,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 AND TIME>=1430,L,L*9,8,0),COLOR0099FF,LINETHICK9;
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;
V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
V5:=SMA(V2*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(V2,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<金钻趋势 AND TIME<=0935,L*5,'↖金钻起涨金钻起涨金钻起涨金钻起涨金钻起涨金钻起涨金钻起涨金钻起涨金钻起涨'),COLORYELLOW;
{日:=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;
DRAWICON(CROSS(C,LOW2) AND L,L,1);
{STICKLINE(CROSS(C,LOW2),L,L*1.5,1,0),COLORGREEN;}
H11:=EMA(DCLOSE,5);
A1Z:=LLV(DCLOSE,5);
L11:=LLV(L,10);
敢死队操作线:=MA(C,24),LINETHICK2,COLORLIMAGENTA;
操作线2:=MA(C,26),LINETHICK1,COLORLICYAN;
爆发点:=(DCLOSE-REF(C,1))/REF(C,1)*100;
XGG:=CROSS(爆发点,20) OR CROSS(爆发点,18);
L3:=IF(XGG,O,L11*0.999),COLORYELLOW;
STICKLINE(XGG,L3,L3,100,1);
DRAWTEXT(XGG,L3,'爆爆爆爆爆爆爆爆爆爆爆'),COLOR0099FF;
{}
尺子长度:=213;
调控:=30;
A:=CONST(HHV(H,尺子长度));
B:=CONST(LLV(L,尺子长度));
AB:=IF(CURRBARSCOUNT<尺子长度,CONST(((A-B)/2)*(70+调控)/100+B),DRAWNULL),LINETHICK2,COLORRED;
DRAWBAND(AB*1.1,RGB(12,22,32),AB*0.9,RGB(12,22,30));
竖:=MONTH>REF(MONTH,1);
STICKLINE(DAY>0,AB*0.94,AB*0.9,0,-1),COLORLIGREEN;
STICKLINE(BARSLAST(竖)=11,AB*0.9,AB,0,-1),COLORRED;
中:=AB,LINETHICK2,COLORCYAN;
天:=AB*1.2,COLORLIGREEN,DOTLINE;
地:=AB*0.8,COLORLIGREEN,DOTLINE;
高:=AB*1.1,LINETHICK2,COLORYELLOW;
低:=AB*0.9,LINETHICK2,COLORYELLOW;
STICKLINE(竖,AB*1.1,AB*0.9,0,0),COLORWHITE;
{DRAWTEXT_FIX(1,0.1,0.02,0,'直尺判断213个交易日走势,买红线和上黄线以上的强势股,就是只买上行的,红线和下黄线以下下行的弱势股不考虑'),COLORWHITE;
{=======K线=====}
线120:=MA(CLOSE,120)COLORMAGENTA,LINETHICK2;
DRAWKLINE(H,O,L,C);
DRAWICON(CROSS(C,中)AND TIME<=0935 AND L,L*2,23);
{DRAWTEXT(CROSS(C,中)AND TIME<=0935,13,'突破中轨'),COLORYELLOW;}
{};
MTM:=CLOSE-REF(CLOSE,24);
MTMMA:=MA(MTM,24);
XGTJ:=MTM>0 AND MTM>MTMMA;
{IF(XGTJ,50,DRAWNULL),COLORRED,LINETHICK2;
IF(XGTJ<1,50,DRAWNULL),COLORBLUE,LINETHICK2;}
DRAWTEXT(ISLASTBAR,51,'---动能MTM'),COLORGRAY;
MTM金叉:=(XGTJ AND CROSS(MTM,MTMMA));
{DRAWTEXT(CROSS(MTM,MTMMA)AND TIME<=0935,43,'MTM 金叉'),COLORYELLOW;}
DRAWICON(CROSS(MTM,MTMMA)AND TIME<=0935 ,43,30);