支撑价:LLV(LOW,19),linethick2 , color00ff00;
阻力价:HHV(HIGH,19),colorblue, linethick2;
Var1:=EMA(CLOSE,12)-EMA(CLOSE,26);
Var2:=EMA(Var1,9);
Var3:=(CLOSE*2.5/100+CLOSE);
Var4:EMA(C,3);
Var5:=LLV(HIGH,240);
Var6:=100*(CLOSE-Var5)/Var5;
Var7:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),5)/4;
Var8:=SLOPE(CLOSE,10);
DRAWTEXT(FILTER(Var7>23,8),H,'别贪'), COLOR00FF00;
DRAWICON(COUNT(REF(Var4,1)<REF(Var4,2),5)=5 AND Var4>REF(Var4,1),L*0.98,4);
DRAWICON(FILTER(COUNT(Var6<0,5)AND crOSS(Var6,0)AND Var7>REF(Var7,1)AND Var8>REF(Var8,1)AND C>O,3),L,1);
DRAWICON(FILTER(REF(Var4,1)>REF(Var4,2)AND Var4<REF(Var4,1)AND Var7>17 AND Var1>Var2,5),H,2);
DRAWICON(阻力价>ref(阻力价,1)AND CROSS(阻力价,Var3)AND C<O,H*1.02,5);
yyzq:=(sysparam(3)-sysparam(2))/1.6;
FILL:=barscount(c)>SYSPARAM(2) and barscount(c)<if(sysparam(3)-sysparam(2)>10,SYSPARAM(2)+INTPART(yyzq/2),10);
pich:=refx(hhv(sysparam(4),yyzq),yyzq);
picl:=refx(llv(sysparam(5),yyzq),yyzq);
fillrgn(ref(fill,1) and refx(fill,1),refx(pich,yyzq),refx(picl,yyzq)),Color3A630E;
ZHH:=H;
ZGF1 := ZHH/1.0809; ZGF2 := ZHH/1.1618;
ZGF3 := ZHH/1.0809/1.1618; ZGF4 := ZHH/1.1618/1.1618;
DRAWTEXTEX(sysparam(3)=BARPOS,0,2,106,' 【第一回调位】:'+NUMTOSTR(ZGF1[SYSPARAM(1)],2)+'- '+NUMTOSTR(ZGF2[SYSPARAM(1)],2)+''),LINETHICK2,ColorFF00FF;
DRAWTEXTEX(sysparam(3)=BARPOS,0,2,124,' 【第二回调位】:'+NUMTOSTR(ZGF3[SYSPARAM(1)],2)+'- '+NUMTOSTR(ZGF4[SYSPARAM(1)],2)+''),LINETHICK2,ColorFF00FF;
ZLL:=L;
ZGFB1:=ZLL*1.0809; ZGFB2 := ZLL*1.1618; ZGFB3 := ZLL*1.0809*1.1618; ZGFB4 := ZLL*1.1618*1.1618;
DRAWTEXTEX(sysparam(3)=BARPOS,0,2,148,' 【第一压力位】:'+NUMTOSTR(ZGFB1[SYSPARAM(1)],2)+''+'-- '+NUMTOSTR(ZGFB2[SYSPARAM(1)],2)+''),LINETHICK2,ColorFF00FF;
DRAWTEXTEX(sysparam(3)=BARPOS,0,2,166,' 【第二压力位】:'+NUMTOSTR(ZGFB3[SYSPARAM(1)],2)+''+'-- '+NUMTOSTR(ZGFB4[SYSPARAM(1)],2)+''),LINETHICK2,ColorFF00FF;
DRAWTEXTEX(sysparam(3)=BARPOS,0,2,190,' 【起点价:'+NUMTOSTR(ZLL[SYSPARAM(1)],2)+'】'),ColorFF00FF;
DRAWTEXTEX(sysparam(3)=BARPOS,0,80,190,' 【回点价:'+NUMTOSTR(ZHH[SYSPARAM(1)],2)+'】'),ColorFF00FF;
{- }
DRAWTEXTex(1,10,10,15,'■所属板块:'+BlKNAME),Color00FF00;
DRAWTEXTex(1,0,23,30,STKLABEL+' '+STKNAME),LINETHICK1,ColorFFFFFC;
RH:=H-L;
R:=DYNAINFO(14)*100;
DRAWTEXTEX(1,0,10,45,' 日高低差:'+NUMTOSTR(RH,2)+'元'),COLORWHITE;
金叉:=barslast(FILTER(CROSS("kd.K","KD.D") and "KD.D"<30,13));
主力吸筹区:=if(金叉>0 and 金叉<61,金叉,0);
DRAWTEXTex(1,0,10,60,' 主力建仓天数:'+NUMTOSTR(主力吸筹区,0)+'天'),ColorFFFFFC,LINETHICK1;
MA30:=EMA(CLOSE,30);
MA60:=EMA(CLOSE,60);
MA125:=EMA(CLOSE,125);
MA250:=EMA(CLOSE,250);
A1:=MA30[SYSPARAM(1)];
RA1:=MA30[SYSPARAM(1)-1];
jt1:=IF(A1>RA1,'↑','↓');
SZ1:='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n MA30: '+NUMTOSTR(MA30[SYSPARAM(1)],2)+jt1;
DRAWTEXT(BARPOS=SYSPARAM(2),CLOSE,SZ1),align4,COLORGREEN;
A2:=MA60[SYSPARAM(1)];
RA2:=MA60[SYSPARAM(1)-1];
jt2:=IF(A2>RA2,'↑','↓');
SZ2:='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n MA60: '+NUMTOSTR(MA60[SYSPARAM(1)],2)+jt2;
DRAWTEXT(BARPOS=SYSPARAM(2),CLOSE,SZ2),align4,COLORGREEN;
A3:=MA125[SYSPARAM(1)];
RA3:=MA125[SYSPARAM(1)-1];
jt3:=IF(A3>RA3,'↑','↓');
SZ3:='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n MA125:'+NUMTOSTR(MA125[SYSPARAM(1)],2)+jt3;
DRAWTEXT(BARPOS=SYSPARAM(2),CLOSE,SZ3),align4,COLORGREEN;
A4:=MA250[SYSPARAM(1)];
RA4:=MA250[SYSPARAM(1)-1];
jt4:=IF(A4>RA4,'↑','↓');
SZ4:='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n MA250:'+NUMTOSTR(MA250[SYSPARAM(1)],2)+jt4;
DRAWTEXT(BARPOS=SYSPARAM(2),CLOSE,SZ4),align4,COLORGREEN;
{换手100%}
svol:=INTPART(SUM(V,0)/CAPITAL);
tj0:=sVOL>REF(svol,1) or BARSSINCE(CLOSE)=0;
S1:=BARSLAST(tj0)+1,PRECISION,COLORWHITE;//时间1
tj2:=S1<ref(S1,1);//取点
S2:=if(tj2,ref(S1,1)+1,S1),PRECISION,COLORMAGENTA;//时间2
S3:=sum(tj2,0),COLORMAGENTA;
阶段总额(万元):=SUM(AMOUNT/10000,S2)*100,PRECISION,LINETHICK,Color008BFA;//换手100%成交额
阶段总量(手):=SUM(V,S2)*100,PRECISION,LINETHICK,COLORCYAN;//换手100%成交量
阶段成本(元):=(阶段总额(万元)/(阶段总量(手)/100)),LINETHICK,PRECISION2,COLORRED;
DRAWTEXTex(1,0,10,75,' ■阶段平均成本:'+NUMTOSTR(阶段成本(元)[SYSPARAM(1)],2)+'(元)'),align4,COLORCYAN;
Aa3:=SUMBARS(VOL,CAPITAL);
换手成本:=IF(CAPITAL>0,SUM(AMOUNT,Aa3)/SUM(VOL,Aa3)/100,EMA(CLOSE,120));{100%换手平均成本线};
DRAWTEXTEX(1,0,10,90,' 换手成本:'),COLORYELLOW;
DRAWTEXTEX(1,0,70,90,NUMTOSTR(换手成本,2)),COLORYELLOW;