gspt01:=max(dynainfo(3),dynainfo(5));
gspt02:=min(dynainfo(3),dynainfo(6));
gspt03:=gspt01-gspt02;
阻力:gspt02+gspt03*8/9,colorred,linethick1;
支撑:gspt02+gspt03*0.5/9,colorgreen,linethick1;
中:(gspt01+gspt02)/2,pointdot,coloryellow,linethick1;
drawicon(longcross(支撑,c,2),c*0.995,44);
stickline(longcross(支撑,c,2),c,阻力,0,-1),colorred;
drawicon(longcross(c,阻力,2),c*1.005,45);
stickline(longcross(c,阻力,2),c,支撑,0,-1),colorgreen;
stickline(c<支撑,支撑,c,1,0),coloryellow;
成交额:=v*c/100,nodraw;
xab123:=sum((if(((成交额/8>20) and (c>(ref(c,1)))),成交额,0)),0);
ybc234:=sum((if(((成交额/8>20) and (c<(ref(c,1)))),成交额,0)),0);
zcd345:=sum((if(((成交额/8<20) and (c>(ref(c,1)))),成交额,0)),0);
ade456:=sum((if(((成交额/8<20) and (c<(ref(c,1)))),成交额,0)),0);
bef567:=((xab123+ybc234)+zcd345)+ade456;
cfg678:=1;
dgh789:=strcat(strcat('机构买入',con2str((100*xab123)/bef567,0)),'%');
ehi890:=strcat(strcat('机构卖出',con2str((100*ybc234)/bef567,0)),'%');
drawtext_fix(cfg678=1,0.0,0.9,0,dgh789),colorred;
drawtext_fix(cfg678=1,0.1,0.1,0,ehi890),colorgreen;
所属板块:=strcat('【所属板块】',strcat(strcat(strcat(' [行业]—',hyblock),strcat(' [地域]—',dyblock)),strcat(' [概念]—',gnblock)));
drawtext_fix(islastbar,0.09,0.95,0,所属板块),coloryellow;
fij901:=(3*c+l+o+h)/6;
gkl012:=(20*fij901+19*ref(fij901,1)+18*ref(fij901,2)+17*ref(fij901,3)+16*ref(fij901,4)+15*ref(fij901,5)+14*ref(fij901,6)+13*ref(fij901,7)+12*ref(fij901,8)+11*ref(fij901,9)+10*ref(fij901,10)+9*ref(fij901,11)+8* ref(fij901,12)+7*ref(fij901,13)+6*ref(fij901,14)+5*ref(fij901,15)+4*ref(fij901,16)+3*ref(fij901,17)+2*ref(fij901,18)+ref(fij901,21))/210;
gspt123:=hhv(c,90);
imn234:=llv(c,90);
jno345:=gspt123-imn234;
kop456:=ema((c-imn234)/jno345-0.5,14);
lpq567:=kop456*20;
lqr678:=ref(hhv(c,66),2);
mrs789:=cross(c,lqr678) and (hhv(c,110)/llv(c,110)-1)*100<45 and lpq567<5.666;
nst890:=15*filter(mrs789,41)>10;
主力扫盘:=nst890*50;
drawtext(nst890,c,'☆游资吃进'),colorred;
otu901:=(vol/c)/2;
puv012:=sum(if(otu901>100 and c>ref(c,1),otu901,0),0);
qvw123:=sum(if(otu901>100 and c<ref(c,1),otu901,0),0);
rwx234:=sum(if(otu901<100 and c>ref(c,1),otu901,0),0);
sxy345:=sum(if(otu901<100 and c<ref(c,1),otu901,0),0);
tyz456:=puv012+qvw123+rwx234+sxy345;
机买:=(puv012/tyz456)*100;
机卖:=(qvw123/tyz456)*100;
主力差:=机买-机卖;
uza567:=drawtext(主力差>0 and ref(主力差,1)<=0,c*0.85,'●机构')=1;
drawtext(uza567>0 ,c*1.0001,'●'),colorgreen;
vab678:=ema(ema(c,13),13);
控盘:=(vab678-ref(vab678,1))/ref(vab678,1)*1000;
wbc789:=dynainfo(11);
财:=(ema(c,8)-ema(c,55))*10;
神:=ema(财,3);
varc1:=(c-wbc789)/wbc789<-0.03;
varc2:=控盘>ref(控盘,1) and 控盘<-0.2;
varc3:=cross(财,神) and 财<-0.3;
xcd890:=filter(varc1 and varc2 and varc3,13);
drawtext(xcd890,c,'●分时控盘'),coloryellow;
星期:=weekday;
日1:=datetoday(date);
上市日:=ref(date,totalbarscount-currbarscount);
自然日:=日1-datetoday(上市日)+1;
zde901:=(自然日-ref(自然日,1))!=星期-ref(星期,1) or totalbarscount-currbarscount=0;
DRAWTEXT_FIX(1,0.980,20,1,'公式平台,公式源码 http://www.gspt.com'),COLOR333333;
本周第几天:=barslast(zde901)+1;
ma1:=ref(c,本周第几天);
ma2:=ref(ma1,本周第几天);
ma3:=ref(ma2,本周第几天);
ma4:=ref(ma3,本周第几天);
ma5:=ref(ma4,本周第几天);
ma6:=ref(ma5,本周第几天);
ma7:=ref(ma6,本周第几天);
ma8:=ref(ma7,本周第几天);
ma9:=ref(ma8,本周第几天);
ma10:=ref(ma9,本周第几天);
ma11:=ref(ma10,本周第几天);
ma12:=ref(ma11,本周第几天);
十三周价:=(c+ma1+ma2+ma3+ma4+ma5+ma6+ma7+ma8+ma9+ma10+ma11+ma12)/13;
决策:refdate(十三周价,date),pointdot,colorred;
drawicon(cross(c,决策),c,1);