C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
- {缺口数浪}
- n:=6;
- LL:=REF(L,1);
- HH:=REF(H,1);
- SQK:=L>HH;
- XQK:=H<LL;
- DRAWTEXT(SQK,L*0.92,' 向上跳空'),COLORRED;
- DRAWTEXT(XQK,H*1.08,' 逃命跳空'),COLORYELLOW;
- STICKLINE(SQK,L,HH,4*N,1),COLORRED;
- STICKLINE(XQK,H,LL,4*N,2),COLORYELLOW;
- MA5:MA(CLOSE,5);
- MA10:MA(CLOSE,10);
- MA20:MA(CLOSE,20);
- MA60:MA(CLOSE,60);
- BB:=REF(INDEXC,1)<REF(INDEXC,2) AND REF(C,2)*0.95>=REF(C,1) AND REF(O,1)/REF(C,1)>=1.05
- AND REF(C,1)<REF(O,1) AND C>O AND C/O>=1.05 AND C>REF(O,1)
- AND REF(VOL,1)<REF(VOL,2);
- STICKLINE(BB,O,C,4,0),COLORRED;
- STICKLINE(BB,O,H,0,0),COLORRED;
- STICKLINE(BB,L,C,0,0),COLORRED;
- DRAWTEXT(BB,L*0.98,'○追'),COLORYELLOW;
- VAR1:=4*SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1)-
- 3*SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1),3.2,1);
- VAR2:=8;
- CC:=CROSS(VAR1,VAR2);
- DRAWTEXT(CC,L*0.98,'◎买'),COLOR0099FF;
- TYP:=(H+L+C)/3;
- TYP1:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14))<=20 AND REF(MA(C,21),1)<MA(C,21);
- TJ1:=O<MAX(REF(C,1),REF(O,1));
- TJ2:=REF(C,1)>=MA(C,21) AND L/MA(C,21)>=1.015 AND MA(C,144)>MA(C,250) AND V<MA(V,10) AND MIN(REF(V,2),REF(V,1))>V;
- TJ3:=REF(MA(C,250),90)<REF(MA(C,144),90) AND MA(C,144)>MA(C,250) AND O>MA(C,250);
- TJ4:=MAX(REF(H,10)AND REF(H,9)AND REF(H,8)AND REF(H,7), REF(H,6));
- TOUJI:=TYP1 AND TJ1 AND TJ2 AND REF(C,2)/REF(O,2)<1.06 AND C/O<=1.05 AND HHV(H,5)/LLV(L,30)>=1.65 AND REF(H,5)/REF(L,1)>=1.15 AND REF(C,1)/REF(O,1)<=0.995 AND (L<REF(L,2) OR (REF(H,2)-REF(L,2))/(H-L)>=2) AND O/REF(L,1)<=1.04
- OR TYP1 AND TJ1 AND O/REF(L,1)<1.05 AND REF(L,1)/REF(O,4)<=0.85 AND REF(C,1)/REF(O,1)<=1.03 AND O<REF(C,1) AND HHV(H,5)/LLV(L,35)>1.35 AND V<MA(V,10);
- TOUJI2:=TYP1 AND TJ1 AND TJ2 AND O/REF(L,1)<1.05 AND O/LLV(L,3)<1.1 AND REF(C,1)/REF(0,1)<=1.05 AND HHV(H,4)/LLV(L,16)>=1.35 AND REF(O,4)/REF(C,2)>=1.08 AND REF(C,2)/REF(O,2)<=0.995 AND (REF(L,2)<REF(L,3) OR (REF(H,3)-REF(L,3))/(REF(H,1)-REF(L,1))>=2) AND L<MIN(REF(C,1),REF(O,1))
- OR TYP1 AND TJ1 AND HHV(H,10)/LLV(L,25)>=1.3 AND REF(C,5)<REF(H,5) AND REF(C,4)<REF(C,5) AND REF(C,3)<REF(C,4) AND REF(C,2)<REF(C,3) AND REF(C,1)<REF(C,2) AND L<REF(L,1) AND MA5/O<1.1;
- DATOUJI:=TYP1 AND TJ3 AND O<REF(C,5) AND O<=REF(C,1) AND REF(H,10)/O>=1.17 AND HHV(H,10)/LLV(L,30)>1.4 AND (MA(V,10)/HHV(V,10)>0.5 AND V/HHV(V,10)>0.2 AND V/HHV(V,10)<0.4 OR REF(V,3)>REF(V,2) AND REF(V,2)>REF(V,1)) AND REF(C,1)/REF(C,2)<=1.02;
- DATOUJI1:=TYP1 AND TJ3 AND O<REF(L,6) AND O<MIN(REF(C,5)AND REF(O,5),5) ;
- DRAWTEXT(TOUJI OR TOUJI2 OR DATOUJI OR DATOUJI1,L*0.98,'△'),COLORYELLOW;
- DRAWTEXT(CROSS(MA(VOL,10),MA(VOL,20)) AND MA(VOL,5)>MA(VOL,10) AND L<MA(C,20) AND C>=MA(C,20),L*0.98,'量托'),COLORWHITE;
- 卖出:=CROSS(90,SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100);
- DRAWTEXT(卖出,H*1.05,'◎短卖'),COLORGREEN;
- C3:=REF(C,1);
- 涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0);
- STICKLINE(涨停,OPEN,CLOSE,2,0),COLORRED;
- 跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);
- STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;
- W1:=C=HHV(C,20);
- W2:=BARSLAST(W1);
- W3:=IF(W2>0,REF(C,W2),REF(C,W2));
- W4:=CROSS(C,REF(W3,1));
- 突破盘整:=W4 AND COUNT(W4,5)=1;
- DRAWICON(突破盘整,L-0.10,1);
-
-
- {数浪}
- GET:ZIG(3,5),LINETHICK2,COLORYELLOW;
- PL5:=ZIG(3,5);
- EN1:=pl5>REF(pl5,1) AND REF(pl5,1)<=REF(pl5,2) AND REF(pl5,2)<=REF(pl5,3);
- EX1:=pl5<REF(pl5,1) AND REF(pl5,1)>=REF(pl5,2) AND REF(pl5,2)>=REF(pl5,3);
- PL10:=ZIG(3,10);
- EN2:=pl10>REF(pl10,1) AND REF(pl10,1)<=REF(pl10,2) AND REF(pl10,2)<=REF(pl10,3);
- EX2:=pl10<REF(pl10,1) AND REF(pl10,1)>=REF(pl10,2) AND REF(pl10,2)>=REF(pl10,3);
- PL20:=ZIG(3,20);
- EN3:=pl20>REF(pl20,1) AND REF(pl20,1)<=REF(pl20,2) AND REF(pl20,2)<=REF(pl20,3);
- EX3:=pl20<REF(pl20,1) AND REF(pl20,1)>=REF(pl20,2) AND REF(pl20,2)>=REF(pl20,3);
- 走强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.9,'Ⅰ'),colorred;
- DRAWTEXT(EX2 AND DTJD10=2,H*0.9,'Ⅱ'),colorred;
- DRAWTEXT(EN3 AND ZTJZ10=1,L*0.9,'Ⅲ'),colorred;
- DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.06,'①'),LINETHICK2,COLOR00FFFF;
- DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.94,'②'),LINETHICK2,COLOR00FFFF;
- DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.06,'③'),LINETHICK2,COLOR00FFFF;
- DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,L*0.94,'④'),LINETHICK2,COLOR00FFFF;
-
- DRAWTEXTABS(30,0,BKNAME ),colorDDDDDD;
- DRAWTEXTABS(30,15,'流通盘:'+CAPITAL/100+'万股,利润增长:'+FINANCE2(10)+'%。每股收益:'+FINANCE2(3)+'元。' ),color00DDDD;
-
-
-
-
-
- {盖印}
- DRAWRECTABS(0,0,30,35,rgb(250,60,80)),color000099;
- DRAWRECTABS(0,30,30,45,rgb(250,250,80)),color009999;
- DRAWTEXTABS(2,5,'雨轩'),colorFFFFFF,LINETHICK1;
- DRAWTEXTABS(2,18,'优化'),colorFFFFFF,LINETHICK1;
- DRAWTEXTABS(2,30,'推荐'),color0000FF,LINETHICK1;
-
-
- 均价:=(3*C+H+L+O)/6;
- VAR1:=(8*均价+7*REF(均价,1)+6*REF(均价,2)+5*REF(均价,3)+
- 4*REF(均价,4)+3*REF(均价,5)+2*REF(均价,6)+REF(均价,8))/36;
- VAR2:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
- SZ1:=REF(VAR1,1)=REF(VAR2,1) AND VAR1>VAR2 AND CLOSE>VAR1;
- SZ2:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)
- AND H/VAR1<1.1 AND L>VAR2 AND CLOSE>VAR1;
- SZ3:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>=REF(VAR2,1) AND H/VAR1>1.1;
- SZ4:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)
- AND CLOSE>VAR2 AND CLOSE<VAR1;
- SZ5:=(VAR1>VAR2 AND VAR2>REF(VAR2,1) AND VAR1<>REF(VAR1,1)
- AND CLOSE<VAR2) OR (VAR1>VAR2 AND VAR1<REF(VAR1,1)
- AND VAR2<REF(VAR2,1) AND CLOSE<VAR2);;
- SZ6:=REF(VAR1,1)>REF(VAR2,1) AND VAR1=VAR2 AND CLOSE<VAR2;
- XD1:=VAR1=VAR2 AND CLOSE<VAR2 OR (VAR1<REF(VAR1,1) AND VAR2<REF(VAR2,1)
- AND REF(VAR1,1)=REF(VAR2,1) AND CLOSE<VAR2);
- XD2:=VAR1=VAR2 AND CLOSE>VAR1;
- SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
- 量能饱和度:=IF(SAT>1,1,SAT)*100;
- IF BARSTATUS=2 AND SZ1 THEN BEGIN
- DRAWTEXTABS(350,25,'调整结束短线介入'),COLORRED;
- END
- ELSE
- IF BARSTATUS=2 AND SZ2 THEN BEGIN
- DRAWTEXTABS(350,25,'上升通道走势良好'),COLORRED;
- END
- ELSE
- IF BARSTATUS=2 AND SZ3 THEN BEGIN
- DRAWTEXTABS(350,25,'股价偏离注意调整'),COLORRED;
- END
- ELSE
- IF BARSTATUS=2 AND SZ4 THEN BEGIN
- DRAWTEXTABS(350,25,'上升通道调整洗盘'),COLORGREEN;
- END
- ELSE
- IF BARSTATUS=2 AND SZ5 THEN BEGIN
- DRAWTEXTABS(350,25,'转向特征注意离场'),COLORGREEN;
- END
- ELSE
- IF BARSTATUS=2 AND SZ6 THEN BEGIN
- DRAWTEXTABS(350,25,'通道改变坚决离场'),COLORGREEN;
- END
- ELSE
- IF BARSTATUS=2 AND XD1 THEN BEGIN
- DRAWTEXTABS(350,25,'下跌通道只宜观望'),COLORGREEN;
- END
- ELSE
- IF BARSTATUS=2 AND XD2 THEN BEGIN
- DRAWTEXTABS(350,25,'短期底部准备进入'),COLORYELLOW;
- END;
- STICKLINE(CLOSE>OPEN,OPEN,LOW,0.5,0 ),COLOR0000FF;
- STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.5 ,0 ),COLOR0000FF;
- STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0.5 ,0 ),COLOR00FF00;
- STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0.5 ,0 ),COLOR00FF00;
- STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLORff7700;
- STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLORff9900;
- STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLORffbb00;
- STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLORffcc00;
- STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLORffdd00;
- STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLORffee00;
- STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLORffFF00;
- STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR000055;
- STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR000066;
- STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR000077;
- STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR000099;
- STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000bb;
- STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000dd;
- STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000ff;
- var9Q:=c= hhv(c,4)and (ref(c,1)>=ref(c,2) or ref(c,1)>=ref(c,3))
- or ref(c,1)=hhv(c,4) and close>=ref(c,2) or ref(c,2)=hhv(c,4)
- and ref(c,3)=llv(c,4) and c>=ref(c,1) or ref(c,3)=hhv(c,4)
- and c>=ref(c,1) and c>=ref(c,2);
- stickline(var9Q,c,(o+c)/2,7,0),color000055;
- stickline(var9Q,c,(o+c)/2,6,0),color000066;
- stickline(var9Q,c,(o+c)/2,5,0),color000077;
- stickline(var9Q,c,(o+c)/2,4,0),color000099;
- stickline(var9Q,c,(o+c)/2,3,0),color0000bb;
- stickline(var9Q,c,(o+c)/2,2,0),color0000dd;
- stickline(var9Q,c,(o+c)/2,1,0),color0000ff;
- varaQ:=c=hhv(c,4) and ref(c,1)=llv(c,4);
- stickline(varaQ,c,(o+c)/2,7,0),colorff11ff;
- stickline(varaQ,c,(o+c)/2,6,0),colorff33ff;
- stickline(varaQ,c,(o+c)/2,5,0),colorff55ff;
- stickline(varaQ,c,(o+c)/2,4,0),colorff77ff;
- stickline(varaQ,c,(o+c)/2,3,0),colorff99ff;
- stickline(varaQ,c,(o+c)/2,2,0),colorffbbff;
- stickline(varaQ,c,(o+c)/2,1,0),colorffddff;
- varbQ:=c=llv(c,4) and (ref(c,1)<ref(c,2) or ref(c,1)<ref(c,3))
- or ref(c,1)=llv(c,4) and c<ref(c,2) or ref(c,2)=llv(c,4)
- and ref(c,1)<>hhv(c,4) and c<ref(c,1) or ref(c,3)=llv(c,4)
- and c<ref(c,1) and c<ref(c,2);
- stickline(varbQ,c,(o+c)/2,7,0),color333333;
- stickline(varbQ,c,(o+c)/2,6,0),color555555;
- stickline(varbQ,c,(o+c)/2,5,0),color777777;
- stickline(varbQ,c,(o+c)/2,4,0),color999999;
- stickline(varbQ,c,(o+c)/2,3,0),colorbbbbbb;
- stickline(varbQ,c,(o+c)/2,2,0),colordddddd;
- stickline(varbQ,c,(o+c)/2,1,0),colorffffff;
- varcQ:=ref(c,1)=llv(c,4) and c>=ref(c,2) or ref(c,2)=llv(c,4)
- and ref(c,1)<=ref(c,3) and ref(c,2)<ref(c,4) and c>=ref(c,1);
- stickline(varcQ,o,(o+c)/2,7,0),color003300;