最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信主图源码

    正文概述    2024-04-14 15:22:57  

    指标源码:
     MA5:MA(CLOSE,5);
     MA10:MA(CLOSE,10);
     MA30:MA(CLOSE,30);
     MA60:MA(CLOSE,60);
     MA120:MA(CLOSE,120);
     MA250:MA(CLOSE,250),LINETHICK2;
     上涨家数:"SZ399002$ADVANCE"+"SH999999$ADVANCE"-"SZ399108$ADVANCE",colorred,NODRAW;
     下跌家数:"SZ399002$DECLINE"+"SH999999$DECLINE"-"SZ399108$DECLINE",colorgreen,NODRAW;
     涨跌比:上涨家数/(上涨家数+下跌家数)*100,NODRAW;
     MA1:=MA(C,2);
     MA7:=MA(C,7);
     BB:=REF(INDEXC,1)=REF(C,1) AND REF(O,1)/REF(C,1)>=1.05
     AND REF(C,1)O AND C/O>=1.05 AND C>REF(O,1)
     AND REF(VOL,1)  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);
     中线升:IF(MA30>=REF(MA30,1),MA30,DRAWNULL),LINETHICK3,colorred;
     年线升:IF(MA250>=REF(MA250,1),MA250,DRAWNULL),LINETHICK3,coloryellow;
     CC:=CROSS(VAR1,8);
     DRAWTEXT(CC,L*0.97,'买!'),COLOR0099FF;
     STICKLINE(CC,L*0.99,L*0.96,1,0),COLORFF00FF;
     TYP:=(H+L+C)/3;
     TYP1:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14))<=20 AND REF(MA(C,21),1)  TJ1:=O  TJ2:=REF(C,1)>=MA(C,21) AND L/MA(C,21)>=1.015 AND MA(C,144)>MA(C,250) AND VV;
     TJ3:=REF(MA(C,250),90)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=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 O1.35 AND V  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)=2) AND L  OR TYP1 AND TJ1 AND HHV(H,10)/LLV(L,25)>=1.3 AND REF(C,5)  DATOUJI:=TYP1 AND TJ3 AND 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  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),L*0.98,'量托'),colorwhite;
     卖出:=CROSS(90,SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100);
     VAR2:=(CLOSE+HIGH+LOW)/3;
     VAR3:=EMA(VAR2,10);
     VAR4:=REF(VAR3,1);
     VAR5:=(REF(HIGH,1)+REF(LOW,1))/2;
     VAR6:=MA(CLOSE,20)+2*STD(CLOSE,20);
     DRAWICON(CROSS(VAR5,VAR6) AND C>O,HIGH*1.07,24);
     DRAWTEXT(CROSS(VAR5,VAR6),HIGH*1.06,'卖出'), , colorgreen;
     VAR7:=REF(CLOSE,1);
     VAR8:=SMA(MAX(CLOSE-VAR7,0),6,1)/SMA(ABS(CLOSE-VAR7),6,1)*100;
     VAR9:=CROSS(VAR8,81);
     VARAX:=FILTER(VAR9,4);
     DRAWICON(VARAX,HIGH*1.07,12);
     DRAWTEXT(VARAX,HIGH*1.06,'卖出'), , colorwhite;
     AAZ:=MA((2*CLOSE+HIGH+LOW)/4,5);
     通道1:=AAZ*102/100;
     通道2:=AAZ*(200-102)/100;
     CCA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
     DDA:=DMA(CLOSE,CCA);
     通道3:=(1+7/100)*DDA;
     通道4:=(1-7/100)*DDA;
     DRAWTEXT(CROSS(通道1,通道3),H*1.07,'逃?!'),colorblue;
     {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;}
     VARCQ:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100;
     DRAWICON(CROSS(82,VARCQ),HIGH*1.08,4);
     DRAWTEXT(CROSS(84,VARCQ),H*1.07,'逃顶'),coloryellow ;
     AA1:=AMOUNT/VOL;
     BB1:=L  CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
     DD1:=L  EE1:=VOL  FF1:=BB1 AND CC1 AND DD1 AND EE1;
     DRAWTEXT(FF1,L*0.98,'买点'),COLOR0000FF;
     STICKLINE(FF1,H,L,0.3,0),COLORFF00FF;
     STICKLINE(FF1,O,C,3,1),LINETHICK2,COLORFF00FF;
     A2:=(C-REF(C,1))/REF(C,1)*100<1.02;
     A3:=H>MA(C,5)*1.12;
     AA:= A2 AND A3;
     DRAWTEXT(AA,H*1.06,'卖'),COLORFF0000;
     STICKLINE(AA,H*1.02,H*1.06,3,0),COLORFF0000;
     VARA:=((AMOUNT)/(VOL))/(100);
     VARB:=((3)*(HIGH)+LOW+OPEN+(2)*(CLOSE))/(7);
     VARC:=((SUM(AMOUNT,7))/(VARA))/(100);
     VARD:=DMA(VARB,(VOL)/(VARC));
     VARE:=((CLOSE-VARD)/(VARD))*(100);
     VARF:=((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)))*(100);
     VARJ:=MA(VARE,20)+STD(VARE,20);
     BIAS18:=((CLOSE-MA(CLOSE,18))/(MA(CLOSE,18)))*(100);
     K:=SMA(VARF,3,1);
     顶:=(REF(BIAS18,1)>=5) AND CROSS(VARJ,VARE) AND (K>79);
     DRAWTEXT((REF(BIAS18,1)>=5) AND CROSS(VARJ,VARE) AND (K>79),H*1.07,'风险'),colorliblue;
     LL:=MA(CLOSE,38);
     MAV:=(2*CLOSE+HIGH+LOW)/4;
     SK:=SLOPE(EMA(MAV,2),7)*5+LL,colorwhite,LINETHICK1;
     SD:=EMA(SK,2),colorgray,LINETHICK0;
     SJ:=(2.8*SK-1.8*SD),colorgray,LINETHICK0;
     DIF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
     DEA:=EMA(DIF,9);
     AAA:=(DIF-DEA)*2*60;
     起爆:=CROSS(AAA-REF(AAA,1),15);
     DRAWTEXT(起爆,L*0.95,'↖爆涨'),coloryellow,LINETHICK2;
     T7:=REF(VOL,6)/REF(VOL,7)>=2;
     T6:=REF(VOL,5)/REF(VOL,6)>=2;
     T5:=REF(VOL,5)/REF(VOL,4)>=1.5;
     T4:=REF(VOL,4)/REF(VOL,3)>=1.5;
     T3:=REF(VOL,2)/REF(VOL,3)>=1.5;
     T12:=V/REF(VOL,1)>2;
     T0:=C>O AND C>REF(C,1);
     凹口选股:=T7 AND T12 AND T0 OR T6 AND T12 AND T0 OR T5 AND T12 AND T0 OR T4 AND T12 AND T0
     OR T3 AND T12 AND T0 ;
     DRAWTEXT(凹口选股,(L-0.092),'凹'),coloryellow;
     日:=150;昨前:=3;
     高1:=REF(HHV(H,日),昨前);
     顶1:REFDATE(高1,DATE),colorblack;
     绝顶:=REFDATE(顶1,DATE),NODRAW;
     跑:=绝顶=H AND ((C-L)<(O-C) OR (O-L)<(C-O)),NODRAW;
     DRAWTEXT(跑,C*1.01,'绝顶'),COLORAAAAAA;
     贵:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100+20;
     阿贵:=MA(贵,5);
     天狼:=MA(阿贵,3);
     VARS1:=EMA(C,5);
     VARS2:=MA((LLV(C,9))*1.1,14);
     底线:=2*VARS2-VARS1-C*0.1,colorwhite;
     DRAWTEXT(CROSS(阿贵,底线),(L-0.092),'启'),colormagenta;
     实量:=VOL,VOLSTICK;
     收阳线:=(C>REF(C,1));
     地量1:=VOL  地量:=地量1 AND 收阳线;
     地量反弹:=收阳线 AND VOL>REF(VOL,1)*1.05 AND REF(地量,1);
     DRAWICON(地量反弹,(L*0.90),5);
     
     

    以上公式有DCLOSE未来函数,如果删除这个未来函数的话,源码如下:
     {去掉这个 dclose}
     MA5:MA(CLOSE,5);
     MA10:MA(CLOSE,10);
     MA30:MA(CLOSE,30);
     MA60:MA(CLOSE,60);
     MA120:MA(CLOSE,120);
     MA250:MA(CLOSE,250),LINETHICK2;
     上涨家数:"SZ399002$ADVANCE"+"SH999999$ADVANCE"-"SZ399108$ADVANCE",COLORRED,NODRAW;
     下跌家数:"SZ399002$DECLINE"+"SH999999$DECLINE"-"SZ399108$DECLINE",COLORGREEN,NODRAW;
     涨跌比:上涨家数/(上涨家数+下跌家数)*100,NODRAW;
     MA1:=MA(C,2);
     MA7:=MA(C,7);
     BB:=REF(INDEXC,1)=REF(C,1) AND REF(O,1)/REF(C,1)>=1.05
     AND REF(C,1)O AND C/O>=1.05 AND C>REF(O,1)
     AND REF(VOL,1)  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);
     中线升:IF(MA30>=REF(MA30,1),MA30,DRAWNULL),LINETHICK3,COLORRED;
     年线升:IF(MA250>=REF(MA250,1),MA250,DRAWNULL),LINETHICK3,COLORYELLOW;
     CC:=CROSS(VAR1,8);
     DRAWTEXT(CC,L*0.97,'买!'),COLOR0099FF;
     STICKLINE(CC,L*0.99,L*0.96,1,0),COLORFF00FF;
     TYP:=(H+L+C)/3;
     TYP1:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14))<=20 AND REF(MA(C,21),1)  TJ1:=O  TJ2:=REF(C,1)>=MA(C,21) AND L/MA(C,21)>=1.015 AND MA(C,144)>MA(C,250) AND VV;
     TJ3:=REF(MA(C,250),90)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=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 O1.35 AND V  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)=2) AND L  OR TYP1 AND TJ1 AND HHV(H,10)/LLV(L,25)>=1.3 AND REF(C,5)  DATOUJI:=TYP1 AND TJ3 AND 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  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),L*0.98,'量托'),COLORWHITE;
     卖出:=CROSS(90,SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100);
     VAR2:=(CLOSE+HIGH+LOW)/3;
     VAR3:=EMA(VAR2,10);
     VAR4:=REF(VAR3,1);
     VAR5:=(REF(HIGH,1)+REF(LOW,1))/2;
     VAR6:=MA(CLOSE,20)+2*STD(CLOSE,20);
     DRAWICON(CROSS(VAR5,VAR6) AND C>O,HIGH*1.07,24);
     DRAWTEXT(CROSS(VAR5,VAR6),HIGH*1.06,'卖出'), , COLORGREEN;
     VAR7:=REF(CLOSE,1);
     VAR8:=SMA(MAX(CLOSE-VAR7,0),6,1)/SMA(ABS(CLOSE-VAR7),6,1)*100;
     VAR9:=CROSS(VAR8,81);
     VARAX:=FILTER(VAR9,4);
     DRAWICON(VARAX,HIGH*1.07,12);
     DRAWTEXT(VARAX,HIGH*1.06,'卖出'), , COLORWHITE;
     AAZ:=MA((2*CLOSE+HIGH+LOW)/4,5);
     通道1:=AAZ*102/100;
     通道2:=AAZ*(200-102)/100;
     CCA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
     DDA:=DMA(CLOSE,CCA);
     通道3:=(1+7/100)*DDA;
     通道4:=(1-7/100)*DDA;
     DRAWTEXT(CROSS(通道1,通道3),H*1.07,'逃?!'),COLORBLUE;
     {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;}
     VARCQ:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100;
     DRAWICON(CROSS(82,VARCQ),HIGH*1.08,4);
     DRAWTEXT(CROSS(84,VARCQ),H*1.07,'逃顶'),COLORYELLOW ;
     AA1:=AMOUNT/VOL;
     BB1:=L  CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
     DD1:=L  EE1:=VOL  FF1:=BB1 AND CC1 AND DD1 AND EE1;
     DRAWTEXT(FF1,L*0.98,'买点'),COLOR0000FF;
     STICKLINE(FF1,H,L,0.3,0),COLORFF00FF;
     STICKLINE(FF1,O,C,3,1),LINETHICK2,COLORFF00FF;
     A2:=(C-REF(C,1))/REF(C,1)*100<1.02;
     A3:=H>MA(C,5)*1.12;
     AA:= A2 AND A3;
     DRAWTEXT(AA,H*1.06,'卖'),COLORFF0000;
     STICKLINE(AA,H*1.02,H*1.06,3,0),COLORFF0000;
     VARA:=((AMOUNT)/(VOL))/(100);
     VARB:=((3)*(HIGH)+LOW+OPEN+(2)*(CLOSE))/(7);
     VARC:=((SUM(AMOUNT,7))/(VARA))/(100);
     VARD:=DMA(VARB,(VOL)/(VARC));
     VARE:=((CLOSE-VARD)/(VARD))*(100);
     VARF:=((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)))*(100);
     VARJ:=MA(VARE,20)+STD(VARE,20);
     BIAS18:=((CLOSE-MA(CLOSE,18))/(MA(CLOSE,18)))*(100);
     K:=SMA(VARF,3,1);
     顶:=(REF(BIAS18,1)>=5) AND CROSS(VARJ,VARE) AND (K>79);
     DRAWTEXT((REF(BIAS18,1)>=5) AND CROSS(VARJ,VARE) AND (K>79),H*1.07,'风险'),COLORLIBLUE;


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信主图源码 加入收藏