%>
n:=6;
v1:=MA(HIGH,30)*1.15;
V2:=MA(HIGH,3)*1.03;
V3:=MA(LOW,3)*0.97;
V4:=MA(LOW,30)*0.85;
{}
GET:ZIG(3,N),COLORYELLOW;
PL5:=ZIG(3,5);
EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);
EX1:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);
PL10:=ZIG(3,10);
EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);
EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);
PL20:=ZIG(3,20);
EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);
EX3:=ZIG(3,20)<REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);
PL40:=ZIG(3,40);
走强1:=BARSLAST(PL5<REF(PL5,1));
走弱1:=BARSLAST(PL5>REF(PL5,1));
走强2:=BARSLAST(PL10<REF(PL10,1));
走弱2:=BARSLAST(PL10>REF(PL10,1));
走强3:=BARSLAST(PL20<REF(PL20,1));
走弱3:=BARSLAST(PL20>REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);
DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);
ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);
DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);
DRAWTEXT(EN1 AND DTJZ5=1,L*0.98,'㈠'),COLORFFFF00;
DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'㈡'),COLORFFFF00;
DRAWTEXT(EN2 AND ZTJZ5=1,L*0.98,'㈢买'),COLORFFFF00;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,H*1.02,'⑴'),COLOR0000FF;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,L*0.98,'⑵'),COLOR0000FF;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,H*1.02,'⑶'),COLOR0000FF;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,L*0.98,'⑷'),COLOR0000FF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.02,'⑸'),COLOR0000FF;
DRAWTEXT(EN2 AND DTJZ10=1,L*0.94,'Ⅰ'),COLORFF6000;
DRAWTEXT(EX2 AND DTJD10=2,H*1.06,'Ⅱ'),COLORFF6000;
DRAWTEXT(EN3 AND ZTJZ10=1,L*0.91,'Ⅲ大买'),COLOR0000FF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.06,'①'),LINETHICK3,COLOR00FFFF;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.91,'②'),LINETHICK3,COLOR00FFFF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.06,'③卖'),LINETHICK3,COLOR00FFFF;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,L*0.94,'④'),LINETHICK3,COLOR00FF00;
{预测量}
预测额:=IF(DATE<>CURRENTDATE OR OPENMINUTES(CURRENTTIME)=1,AMOUNT,(AMOUNT/OPENMINUTES(CURRENTTIME))*240), LINETHICK;
an:=20;
SAT:=IF((预测额/CLOSE)/(HHV(预测额,aN)/HHV(CLOSE,aN))*100>100,100,(预测额/CLOSE)/(HHV(预测额,aN)/HHV(CLOSE,aN))*100);
预测量:=IF(DATE<>CURRENTDATE OR OPENMINUTES(CURRENTTIME)=1,VOL,(VOL/OPENMINUTES(CURRENTTIME))*240), LINETHICK;
量:=VOL;
DRAWTEXTEX(CLOSE,1,120,140,'预测额:'+NUMTOSTR(预测额,2)),ColorffFF66;
DRAWTEXTEX(CLOSE,1,120,100,'预测量:'+NUMTOSTR(预测量,2)),ColorffFF66;
DRAWTEXTEX(CLOSE,1,120,60,'量:'+NUMTOSTR(量,2)),ColorffFF66;
{支撑阻力}
gj:=IF(CLOSE=INDEXC,(INDEXC+INDEXH+INDEXL+INDEXO)/4,AMOUNT/(VOL+0.01)/100);
明日阻力:=LOW+(gj-LOW)+(CLOSE-LOW);
明日支撑:=LOW+(CLOSE-gj);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);
mc:=REF(CLOSE,1);
{止损位}
vaa:=HHV(HIGH,2);
vab:=vaa*0.95;
{股票教程网-股票公式网站 www.gwgz.net}
DRAWTEXTEX(CLOSE,1,410,440,'[今日 止损位 :'+NUMTOSTR(vab,2)+']'),LINETHICK1,COLOR00FF00;
DRAWNUMBER(BARSTATUS=2 and vab,vab-0.02,vab,2),COLORWHITE;{横线位置数字}
STICKLINE(BARSTATUS=2 and vab,vab,vab,30,0),LINETHICK2,COLORYELLOW;{2天前的最高价下划横线}
DRAWTEXT(BARSCOUNT(CLOSE)=SYSPARAM(1),vab,'←5%止损位线'),SHIFT2,PXUP10,color00FF;
DRAWTEXTEX(CLOSE,1,410,80,'---------------'),colorFFFFFF;
DRAWTEXTEX(CLOSE,1,410,160,'---------------'),colorFFFFFF;
DRAWTEXTEX(CLOSE,1,410,240,'---------------'),colorFFFFFF;
DRAWTEXTEX(CLOSE,1,410,320,'---------------'),colorFFFFFF;
DRAWTEXTEX(CLOSE,1,410,400,'---------------'),colorFFFFFF;
DRAWTEXTEX(CLOSE,1,410,120,'今日支撑=:'+NUMTOSTR(今日支撑,2)+''),colorFFFF;
DRAWTEXTEX(CLOSE,1,410,200,'今日阻力=:'+NUMTOSTR(今日阻力,2)+''),colorFF00;
DRAWTEXTEX(CLOSE,1,410,280,'明日支撑=:'+NUMTOSTR(明日支撑,2)),colorFF00FF;
DRAWTEXTEX(CLOSE,1,410,360,'明日阻力=:'+NUMTOSTR(明日阻力,2)),colorFFFF00;
{画线}
aa:=REF(HIGH,n)=HHV(HIGH,2*n+1);
aaa:=FILTER(aa,n);
bb:=BACKSET(aaa,n+1);
cc1:=FILTER(bb,n);
cc:=cc1 or ISLASTBAR;
aa2:=REF(LOW,n)=LLV(LOW,2*n+1);
aaa2:=FILTER(aa2,n);
bb2:=BACKSET(aaa2,n+1);
cc22:=FILTER(bb2,n);
cc2:=cc22 and NOT(cc1);
ea:=BACKSET(cc,REF(BARSLAST(cc2),1)+1);
eb:=ea>REF(ea,1);
ee:=BACKSET(eb,2);
ff1:=ee>REF(ee,1);
ee2:=BACKSET(ff1 and COUNT(cc,REF(BARSLAST(cc2),1)+2)=0,REF(BARSLAST(cc2),1)+2);
ff2:=ee2>REF(ee2,1);
ee3:=BACKSET(ff2 and COUNT(cc,REF(BARSLAST(cc2),1)+2)=0,REF(BARSLAST(cc2),1)+2);
ff3:=ee3>REF(ee3,1);
js:=IF(cc,COUNT(cc2,REF(BARSLAST(cc),1)+1),0);
g1:=IF(js=1 and cc,BARSLAST(ff1),0);
ga:=IF(cc and REF(LOW,BARSLAST(ff1))>=REF(LOW,BARSLAST(ff2)),BARSLAST(ff2),BARSLAST(ff1));
g2:=IF(js=2 and cc,ga,0);
g3:=IF(js>=3 and cc,IF(cc and REF(LOW,ga)>=REF(LOW,BARSLAST(ff3)),BARSLAST(ff3),ga),0);
gg:=g1+g2+g3;
ja:=BACKSET(cc,gg);
jb:=ja>REF(ja,1);
jj:=BACKSET(jb,2);
ld:=jj>REF(jj,1);
ld1:=ld or ISLASTBAR;
hea:=BACKSET(ld1,REF(BARSLAST(cc),1)+1);
heb:=hea>REF(hea,1);
hee:=BACKSET(heb,2);
hff1:=hee>REF(hee,1);
hee2:=BACKSET(hff1 and COUNT(ld1,REF(BARSLAST(cc),1)+2)=0,REF(BARSLAST(cc),1)+2);
hff2:=hee2>REF(hee2,1);
hee3:=BACKSET(hff2 and COUNT(ld1,REF(BARSLAST(cc),1)+2)=0,REF(BARSLAST(cc),1)+2);
hff3:=hee3>REF(hee3,1);
hjs:=IF(ld1,COUNT(cc1,REF(BARSLAST(ld1),1)+1),0);
hg1:=IF(hjs=1 and ld1,BARSLAST(hff1),0);
hga:=IF(ld1 and REF(HIGH,BARSLAST(hff1))<=REF(HIGH,BARSLAST(hff2)),BARSLAST(hff2),BARSLAST(hff1));
hg2:=IF(hjs=2 and ld1,hga,0);
hg3:=IF(hjs>=3 and ld1,IF(ld1 and REF(HIGH,hga)<=REF(HIGH,BARSLAST(hff3)),BARSLAST(hff3),hga),0);
hgg:=hg1+hg2+hg3;
hja:=BACKSET(ld1,hgg);
hjb:=hja>REF(hja,1);
hjj:=BACKSET(hjb,2);
hd:=hjj>REF(hjj,1);
x1:=BACKSET(ISLASTBAR,BARSLAST(ld)+1);
x2:=x1>REF(x1,1);
y1:=BACKSET(ISLASTBAR,BARSLAST(hd)+1);
y2:=y1>REF(y1,1);
z1:=IF(BARSLAST(x2)<BARSLAST(y2),x2,y2);
z2:=IF(BARSLAST(x2)<BARSLAST(y2),LOW,HIGH);
DRAWLINE(z1,z2,ISLASTBAR,CLOSE,0),POINTDOT,colorff9900;
uu:=BACKSET(ISLASTBAR,BARSLAST(ld)+1);
vv:=uu>REF(uu,1);
ww:=BACKSET(vv,REF(BARSLAST(ld),1)+2);
xx:=ww>REF(ww,1);
DRAWLINE(xx,LOW,vv,LOW,1),POINTDOT,colorffff;
uu2:=BACKSET(ISLASTBAR,BARSLAST(hd)+1);
vv2:=uu2>REF(uu2,1);
ww2:=BACKSET(vv2,REF(BARSLAST(hd),1)+2);
xx2:=ww2>REF(ww2,1);
DRAWLINE(xx2,HIGH,vv2,HIGH,1),POINTDOT,colorffff;
DRAWICON(hd and xx2,HIGH*1.002,12);
DRAWICON(ld and xx,LOW*1.002,10);
高1:REF(HIGH,BARSLAST(vv2)),POINTDOT,color99ff66;
高2:REF(HIGH,BARSLAST(xx2)),POINTDOT,colorff66ff;
低1:REF(LOW,BARSLAST(vv)),POINTDOT,color99ff66;
低2:REF(LOW,BARSLAST(xx)),POINTDOT,colorff66ff;
{股票教程网-http://dxsy008.com承接通达信软件和公式破解,普通加密破解,完全加密破解,导入密码破解,时间限制破解,公式编写,可按您的要求写公式指标,价格按难度不同报价,有需要可以找我们}