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

    正文概述    2024-05-04 04:19:05  


    通达信公式源码概况:


    指标类别:通达信公式


    授权方式: 免费版


    指标评级: ★★★★★


    指标分类: 策略


    画线方法: 副图



    一、通达信公式


     

    虚拟VOL:=IF(CURRBARSCOUNT=1AND 

    PERIOD=5,AMOUNT*240/FROMOPEN,DRAWNULL),NODRAW; 

    {STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,虚拟VOL,0,-1,-1),COLORWHITE;} 

    加速:=IF(100*WINNER(CLOSE*0.95) 50ANDCOST(85) CLOSEAND 

    (EMA(EMA(CLOSE,9),9)-REF(EMA(EMA(CLOSE,9),9),1))/REF(EMA(EMA(CLOSE,9),9),1)*1 

    000 0, 

    (EMA(EMA(CLOSE,9),9)-REF(EMA(EMA(CLOSE,9),9),1))/REF(EMA(EMA(CLOSE,9),9),1)*1 

    000,0),COLORFF00FF,NODRAW; 

    成交量:AMOUNT,VOLSTICK; 

    换手:VOL/CAPITAL*100,NODRAW; 

    饱 

    和:(AMOUNT/CLOSE)/HHV((AMOUNT/CLOSE),26)*100,COLORLIMAGENTA,NODRAW; 

    VAR1:=AMOUNT/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 

    主动买 

    盘:=IF(CLOSE OPEN,VAR1*(HIGH-LOW),IF(CLOSE OPEN,VAR1*((HIGH-OPEN)+(CLOS 

    E-LOW)),AMOUNT/2)); 

    STICKLINE(量能饱和=100,主动买盘,0,1.2,0),COLORMAGENTA; 

    DRAWTEXT((AMOUNT/CLOSE)/HHV((AMOUNT/CLOSE),26)*100=100,AMOUNT*1.2, ◎ 

    ),COLORMAGENTA; 

    DRAWTEXT((AMOUNT-主动买盘)/AMOUNT 0.10,AMOUNT*1.00, * ),COLORRED; 

    MA8:MA(AMOUNT,8),COLORRED,LINETHICK2; 

    MA97:MA(AMOUNT,97),COLORFFAA66,LINETHICK3; 

    VUME:=V,VOLSTICK; 

    FL4:=成交量=HHV(成交量,250); 

    FL3:=成交量=HHV(成交量,120)ANDV!=HHV(V,250); 

    FL2:=成交量=HHV(成交量,60)ANDV!=HHV(V,120)ANDV!=HHV(V,250); 

    FL1:=成交量=HHV(成交量,30)ANDV!=HHV(V,60)ANDV!=HHV(V,120)AND 

    V!=HHV(V,250); 

    DRAWTEXT(FL4,1.05*成交量, ④ ),COLORYELLOW; 

    DRAWTEXT(FL3,1.00*成交量, ③ ),COLORYELLOW; 

    DRAWTEXT(FL2,0.95*成交量, ② ),COLORYELLOW; 

    DRAWTEXT(FL1,0.90*成交量, ① ),COLORYELLOW; 

    XG:SUM(FL1,10),NODRAW; 

    提示A:DRAWTEXT_FIX(C=C,0,0.1,0, ①30天最大量、②60天最大量 ),COLOR0000FF; 

    提示B:DRAWTEXT_FIX(C=C,0,0.3,0, ③120天最大量.④250天最大量 ),COLOR0000FF; 

    {示:DRAWTEXT_FIX(C=C,0,0.5,0, 有票的话建议出局规避了 ),COLOR0000FF;}; 

    TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD= 

    4,60,IF(PERIOD=5,240,1))))); 

    MTIME:=MOD(FROMOPEN,TOTAL); 

    CTIME:=IF(MTIME 0.5,TOTAL,MTIME); 

    VVOL:IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL),NODRAW; 

    STICKLINE(CURRBARSCOUNT=1 (SETCODE=0|| 

    SETCODE=1),VVOL,0,-1,-1),COLOR00C0C0; 

    VOLUME:VOL,VOLSTICK; 

    MAVOL1:MA(VOLUME,5); 

    MAVOL2:MA(VOLUME,10); 

    VA:=IF(CLOSE REF(CLOSE,1),VOL,-VOL); 

    OBV1:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0); 

    OBV2:=EMA(OBV1,3)-MA(OBV1,9); 

    OBV3:=EMA(IF(OBV2 0,OBV2,0),3); 

    MAC3:=MA(C,3); 

    STICKLINE(OBV3 REF(OBV3,1)AND 

    MAC3 REF(MAC3,1),0,OBV3,1,0),COLORYELLOW; 

    预测量万:IF(ISNULL(REFX( CLOSE,1))ANDSTRFIND(PERIODNAME, 日线 

    ),VOL*240/FROMOPEN,0)/10000;//线形不输出 

    成交量万:VOL/10000,COLOR00ffff;//线形不输出 

    倍量:=VOL =REF(V,1)*1.8ANDC REF(C,1); 

    低量:=VOL REF(LLV(VOL,13),1); 

    平量:=ABS(VOL-HHV(REF(VOL,1),5))/HHV(REF(VOL,1),5) =0.03OR 

    ABS(VOL-REF(VOL,1))/REF(VOL,1) =0.03; 

    倍缩:=VOL =REF(V,1)*0.5; 

    梯量:=COUNT(V REF(V,1),3)=3ANDCOUNT(C O,3)=3; 

    缩量涨:=COUNT(C REF(C,1),2)=2ANDCOUNT(V REF(V,1),2)=2; 

    STICKLINE(ISNULL(REFX( CLOSE,1))ANDSTRFIND(PERIODNAME, 日线 ),预测量万 

    *10000,0,11,1),COLORffffff; 

    STICKLINE(C =O,0,V,9,0),color0000aa; 

    STICKLINE(C O,0,V,9,0),color00aa00; 

    STICKLINE(倍量,0,V,5,0),coloryellow; 

    STICKLINE(低量,0,V,5,0),colorblack; 

    STICKLINE(平量,0,V,5,0),colorwhite; 

    STICKLINE(倍缩,0,V,5,0),colorcyan; 

    STICKLINE(梯量,0,V,5,0),colorgray; 

    STICKLINE(缩量涨,0,V,5,0),colorblue; 

    {VOLUME:VOL,VOLSTICK; 

    MAV5:MA(VOLUME,M1);MAV20:MA(VOLUME,20);MAV60:MA(VOLUME,20); 

    MAV120:MA(VOLUME,M2);} 

    绿低量:=13; 

    蓝低量:=55; 

    灰低量:=100; 

    {--------VOL.量能饱和--------} 

    N1:=21; 

    SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20)); 

    量能饱和:IF(SAT 1,1,SAT)*100,COLOR00AAFF,NODRAW; 

    中点:=REFDATE(HHV(V,180)*0.5,DATE); 

    STICKLINE(CURRBARSCOUNT=N1,中点*1.9,中点*1.5,100,1),COLOR00AAFF; 

    STICKLINE(CURRBARSCOUNT=N1,中点*1.88,中点*1.52,量能饱 

    和,0),COLOR0077FF; 

    DRAWTEXT(CURRBARSCOUNT=N1+3,中点*1.8, 饱和度 ),COLORYELLOW; 

    {============================================== 

    =======} 

    H_L:=0.1*CONST(HHV(VOL,240)); 

    {MAV10:MA(V,10),COLORYELLOW;} 

    启动5:=MA(V,5),COLORWHITE; 

    洗盘40:=MA(V,40),COLORBLUE; 

    异动135:=MA(V,135),COLORMAGENTA; 

    VVOL:=IF(CURRBARSCOUNT=1AND 

    PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);{模拟量} 

    STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,VVOL,0,1,-1),COLOR00C0C0; 

    量:VOL,VOLSTICK; 

    换手:VOL*10000/FINANCE(7),NODRAW;{DYNAINFO(37)*100} 

    换10T:=SUM(换手,10),NODRAW; 

    倍数:=1.9; 

    倍量:VOL =REF(V,1)*倍数AND 

    (IF(C O,C REF(C,1),1)),COLORYELLOW,NODRAW; 

    倍缩:REF(V,1) =VOL*倍数,COLORMAGENTA,NODRAW; 

    平量:RANGE(V/REF(V,1),0.97,1.03)AND 

    BARSCOUNT(V) =2,COLORWHITE,NODRAW; 

    低量10:VOL=LLV(VOL,绿低量)ANDBARSCOUNT(V) =绿低 

    量,COLORGREEN,NODRAW; 

    低量50:VOL=LLV(VOL,蓝低量)ANDBARSCOUNT(V) =蓝低 

    量,COLORBLUE,NODRAW; 

    地量:VOL=LLV(VOL,灰低量)ANDBARSCOUNT(V) =灰低 

    量,COLORGRAY,NODRAW; 

    V1:=VOL*0.9;{图标位置} 

    V2:=VOL*0.8; 

    STICKLINE(倍量,0,V1,1,0),COLORYELLOW; 

    STICKLINE(平量,0,V1,1,0),COLORWHITE; 

    STICKLINE(低量10,0,V2,1,0),COLORLIGREEN; 

    STICKLINE(低量50,0,V2,1,0),COLORBLUE; 

    STICKLINE(地量,0,V2,1,0),COLORGRAY; 

    STICKLINE(倍缩,0,V*0.45,1,0),COLORMAGENTA; 

    均价:=AMOUNT/VOL/100; 

    TJ01:=C OAND均价 REF(C,1){ANDBARSCOUNT(C) =240};{假阴真阳}; 

    TJ02:=C OANDC REF(C,1); 

    STICKLINE(TJ01ORTJ02,0,V,0,0),COLORRED;{假阴柱} 

    真阳或假阴:=C OORC REF(C,1); 

    收阳:=REF(真阳或假阴,3); 

    倍量1:=REF(倍量,3); 

    高量:=REF(V,3) =HHV(V,7); 

    三日不破:=LLV(C,3) =REF(L,3); 

    价升:=COUNT(C =REF(C,1),3)=3;{收盘价逐升} 

    量缩:=COUNT(V =REF(V,1),3)=3; 

    连阳:=COUNT(真阳或假阴,3)=3; 

    倍量将军柱:=倍量1AND三日不破AND收阳; 

    高量将军柱:=高量AND三日不破AND收阳; 

    将军柱:=倍量将军柱OR高量将军柱; 

    黄金柱:=将军柱AND价升AND量缩AND连阳; 

    STICKLINE(黄金柱,0.3*V,0.7*V,1,0),COLORRED;{红柱} 

    DRAWICON(黄金柱,V*1.5,1); 

    V100:=V =LLV(V,100)*1.2ANDV 0ANDBARSCOUNT(V) =100; 

    百日地量群:=COUNT(V100,5)  

    DRAWTEXT(FILTER(百日地量群,4),V+3*H_L, 地量群 ),COLORGRAY; 

    长阴短柱:=C/REF(C,1) =0.96ANDV HHV(V,30)/1.9; 

    {DRAWTEXT(长阴短柱,V+1.6*H_L, ! ),COLORLICYAN}; 

    DRAWLINE(V=LLV(V,3),V,V=HHV(V,3),V,0),COLOR9A90FF; 

    DRAWLINE(V=HHV(V,7),V,V=LLV(V,7),V,0),COLOR9AFF89; 

    DRAWLINE(L=LLV(L,7),V,H=HHV(H,7),V,0),COLOR9AFF89; 

    DRAWLINE(V=HHV(V,21),V,V=LLV(V,21),V,0),COLORC100FF; 

    DRAWLINE(V=LLV(V,21),V,V=HHV(V,21),V,0),COLORC100FF; 

    DRAWLINE(V=HHV(V,35),V,V=LLV(V,35),V,0),COLORC1005B; 

    DRAWLINE(V=LLV(V,35),V,V=HHV(V,35),V,0),COLORC1005B; 

    DRAWLINE(V=HHV(V,49),V,V=LLV(V,49),V,0),COLORYELLOW; 

    DRAWLINE(V=LLV(V,49),V,V=HHV(V,49),V,0),COLORYELLOW; 

    量:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 

    买量:=IF(CLOSE OPEN,量*(HIGH-LOW),IF(CLOSE OPEN,量*((HIGH-OPEN)+ 

    (CLOSE-LOW)),VOL/2)); 

    卖量:=(IF(CLOSE OPEN,0-量*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE OPEN,0-量 

    *(HIGH-LOW),0-VOL/2)))*-1; 

    总量:=买量+卖量; 

    净量:买量-卖量,LINETHICK0; 

    MAA:=MA(CLOSE,2); 

    STICKLINE(买量 0,0,买量,3,0),COLOR000099; 

    STICKLINE(净量 0,0,净量,0.1,0),COLOR00FFFF; 

    STICKLINE(V =2*REF(V,1),1,总量,4,1),COLOR0000FF; 

    STICKLINE(C MAA,总量,1,4,1),COLOR00FFFF; 

    STICKLINE(C MAA,总量,1,4,1),COLORFF00FF; 

    STICKLINE(净量 0,1,总量,4,1),COLORFFFF00; 

    STICKLINE(C MAAAND净量 0,净量,1,4,1),COLOR0000FF; 

    STICKLINE(V =2*REF(V,1),1,总量,4,1),COLOR0000FF; 

    STICKLINE(买量 0,0,买量,3,0),COLOR000099; 

    STICKLINE(买量 0,0,买量,2,0),COLOR0000AA; 

    STICKLINE(买量 0,0,买量,1,0),COLOR0000FF; 

    STICKLINE(买量 0,0,买量,0.1,0),COLORCC00FF; 

    STICKLINE(净量 0,0,净量,3,0),COLOR0033FF; 

    STICKLINE(净量 0,0,净量,2,0),COLOR0077FF; 

    STICKLINE(净量 0,0,净量,1,0),COLOR00BBFF; 

    STICKLINE(净量 0,0,净量,0.1,0),COLOR00FFFF; 

    STICKLINE(C MAAAND净量 0,净量,0,3,0),COLOR777777; 

    STICKLINE(C MAAAND净量 0,净量,0,2,0),COLOR999999; 

    STICKLINE(C MAAAND净量 0,净量,0,1,0),COLORBBBBBB; 

    STICKLINE(C MAAAND净量 0,净量,0,0.1,0),COLORFFFFFF; 

    MA5:=MA(VOL,5); 

    MA10:=MA(VOL,10); 

    MA20:=MA(VOL,20); 

    净买量金色:0,COLORYELLOW;买量红色:0,COLORRED;短买灰色:0,COLORLIGRAY; 

    DRAWTEXT(CROSS(净量,0),0-0, 买 ),COLORFF00FF; 

    DRAWTEXT(CROSS(0,净量),0-0, 减仓 ),COLORGREEN; 

    公式解读:


    二、特色成交量指标公式


     

    {VOL换手} 

    换手:=VOL/CAPITAL*100,POINTDOTCOLORMAGENTA; 

    十换:SUM(换手,10),COLORRED,LINETHICK1,NODRAW; 

    三十换:SUM(换手,30),COLORGREEN,LINETHICK1,NODRAW; 

    {成交%} 

    AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 

    主买:=IF(CLOSE OPEN,AA*(HIGH-LOW),IF(CLOSE OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)); 

    量比%:主买/VOL*100,COLOR00FFFF,LINETHICK1,NODRAW; 

    量:=V/CONST(HHV(V,90))*30,LINETHICK0,VOLSTICK; 

    {粉色} 

    STICKLINE(CLOSE =OPEN,0,量*1,2.4,0),COLOR880088; 

    STICKLINE(CLOSE =OPEN,0,量*1,1.6,0),COLORAA00AA; 

    STICKLINE(CLOSE =OPEN,0,量*1,0.8,0),COLORCC00CC; 

    STICKLINE(CLOSE =OPEN,0,量*1,0,0),COLORFF00FF; 

    {蓝色} 

    STICKLINE(CLOSE =OPEN,0,量*1,2.4,0),COLOREC0000; 

    STICKLINE(CLOSE =OPEN,0,量*1,1.6,0),COLORFF4600; 

    STICKLINE(CLOSE =OPEN,0,量*1,0.8,0),COLORFF6300; 

    STICKLINE(CLOSE =OPEN,0,量*1,0,0),COLORFF8B00; 

    {地量买点} 

    STICKLINE(CROSS(0.9,1/VOL*1000 0.01AND KDJ.J 0),量 0,-3,1.2,0),COLORGREEN,LINETHICK2; 

    DRAWTEXT(CROSS(0.9,1/VOL*1000 0.01AND KDJ.J 0),量 0, 地量 ),COLORGREEN,LINETHICK1; 

    {倍量} 

    倍量:(量/REF(量,1) =1.91ANDCOUNT(C O,1))OR(L REF(H,1)ANDCOUNT(O C,1)AND量/REF(量,1) =1.91),NODRAW,COLORYELLOW; 

    STICKLINE(倍量,0,量,0.0001,0),COLOR00FFFF; 

    DRAWTEXT(倍量,量*0.99, 倍 ),COLORYELLOW,LINETHICK1; 

    {資金线} 

    VAR8:=LLV(LOW,21); 

    VAR9:=HHV(HIGH,21); 

    K:EMA((CLOSE-VAR8)/(VAR9-VAR8)*50,6),COLORRED,LINETHICK2; 

    D:EMA(0.667*REF(K,1)+0.333*K,2),COLORGREEN; 

    DRAWICON(LONGCROSS(D,K,0.1),D,2),COLORRED,LINETHICK1; 

    DRAWICON(LONGCROSS(K,D,0.1),K,1),COLORGREEN,LINETHICK1; 

    input:N1(13,1,1000,1),N2(34,1,1000,1),N3(144,1,1000,1); 

    OBV:SUM(IF(ISUP,VOL,IF(ISDOWN,-VOL,0)),0),layer1; 

    {Q6:=ATAN((ma5/REF(ma5,1)-1)*100)*180/3.1416;} 

    MAOBV1:MA(OBV,N1),layer1; 

    MAOBV2:MA(OBV,N2),layer1; 

    新高:OBV=HHV(OBV,N3),LINETHICK0; 

    新高1:OBV=HHV(OBV,N2),LINETHICK0; 

    新高2:OBV=HHV(OBV,N1),LINETHICK0; 

    FILLRGN(OBV,MAOBV1, 

    OBV MAOBV1and(NOT(新高)andNOT(新高1)andNOT(新高2)),RGB(88,0,0), 

    OBV MAOBV1and(NOT(新高)andNOT(新高1)and新高2),RGB(88,88,88), 

    OBV MAOBV1and(NOT(新高)and新高1),RGB(255,88,0), 

    OBV MAOBV1and(新高),RGB(255,0,0), 

    OBV MAOBV1,RGB(0,255,0)),layer2; 

    0,LINETHICK2; 

    DIFF1:=EMA(CLOSE,12)-EMA(CLOSE,26),COLORFFFFFF,LINETHICK2; 

    DEA1:=EMA(DIFF1,9),COLORYELLOW,LINETHICK2; 

    MACD1:=2*(DIFF1-DEA1); 

    MACD2:=EMA(MACD1,5); 

    STICKLINE(MACD1 MACD2ANDMACD1 0,0,MACD1,3,0),COLOR000055; 

    STICKLINE(MACD1 MACD2ANDMACD1 0,0,MACD1,2.5,0),COLOR000077; 

    STICKLINE(MACD1 MACD2ANDMACD1 0,0,MACD1,1.5,0),COLOR000099; 

    STICKLINE(MACD1 MACD2ANDMACD1 0,0,MACD1,1,0),COLOR0000FF; 

    STICKLINE(MACD1 MACD2ANDMACD1 0,0,MACD1,3,0),COLOR222222; 

    STICKLINE(MACD1 MACD2ANDMACD1 0,0,MACD1,2.5,0),COLOR444444; 

    STICKLINE(MACD1 MACD2ANDMACD1 0,0,MACD1,1.5,0),COLOR666666; 

    STICKLINE(MACD1 MACD2ANDMACD1 0,0,MACD1,0,0),COLOR999999; 

    STICKLINE(MACD1 MACD2,0,MACD1,3,0),COLORA80000; 

    STICKLINE(MACD1 MACD2,0,MACD1,2.5,0),COLORB80000; 

    STICKLINE(MACD1 MACD2,0,MACD1,1.5,0),COLOREC1000; 

    STICKLINE(MACD1 MACD2,0,MACD1,1,0),COLORFF4600; 

    STICKLINE(MACD1 MACD2,0,MACD1,0,0),COLORFFAA00; 

    低位:=CROSS(DIFF1,DEA1)ANDDIFF1 -0.1; 

    STICKLINE(低位金叉,0,DIFF1,3,0),COLOR002222; 

    STICKLINE(低位金叉,0,DIFF1,2.5,0),COLOR006666; 

    STICKLINE(低位金叉,0,DIFF1,1.5,0),COLOR009999; 

    STICKLINE(低位金叉,0,DIFF1,1,0),COLOR00FFFF; 

    DRAWTEXT(低位金叉,0.2, 低位金叉 ),COLOR00FF88; 

    JCCOUNT:=COUNT(CROSS(DIFF1,DEA1),BARSLAST(DEA1 =0)); 

    二次金叉:=CROSS(DIFF1,DEA1)ANDDEA1 0ANDCOUNT(JCCOUNT=2,21)=1; 

    STICKLINE(二次金叉,MACD1,-0.01,3,0),COLOR440044; 

    STICKLINE(二次金叉,MACD1,-0.01,2.5,0),COLOR660066; 

    STICKLINE(二次金叉,MACD1,-0.01,1.5,0),COLOR990099; 

    STICKLINE(二次金叉,MACD1,-0.01,1,0),COLORFF00FF; 

    DRAWTEXT(二次金叉,DEA1*1.3, 二次金叉 ),COLORYELLOW; 

    A1:=BARSLAST(REF(CROSS(DIFF1,DEA1),1)); 

    底:=REF(CLOSE,A1+1) CLOSEANDDIFF1 REF(DIFF1,A1+1)ANDCROSS(DIFF1,DEA1); 

    STICKLINE(底背离,0,0.03,6,0),COLOR00FF00; 

    DRAWLINE(A1=0,DEA1,底背离,DEA1,0),COLORRED,LINETHICK1; 

    DRAWTEXT(底背离,0.03, 底背离 ),COLORFF00FF; 

    A2:=BARSLAST(REF(CROSS(DEA1,DIFF1),1)); 

    顶背离:=REF(CLOSE,A2+1) CLOSEANDREF(DIFF1,A2+1) DIFF1ANDCROSS(DEA1,DIFF1); 

    DRAWLINE(A2=0,DEA1,顶背离,DEA1,0),COLORFF8800,LINETHICK1; 

    DRAWTEXT(顶背离,-0.02, 顶背离 ),COLORFFFF00; 

    DIFF:DIFF1,COLOR009922,LINETHICK2; 

    DEA:DEA1,COLORYELLOW,LINETHICK2; 

    ZT:=CROSS(DEA,DIFF); 

    LS0:=BARSLAST(ZT); 

    S1:=IF(1,LS0=1,ZT)ANDIF(1,DIFF DEA,0); 

    DRAWTEXT(S1ANDDIFF 0,DIFF*0.8, 1 ),COLOR00FF00; 

    DRAWTEXT(S1ANDDIFF 0,DIFF*1.8, 1 ),COLOR00FF00; 

    S3:=IF(3,LS0=3,ZT)ANDIF(3,DIFF DEA,0); 

    DRAWTEXT(S3ANDDIFF 0,DIFF*0.8, 3 ),COLOR00FF00; 

    DRAWTEXT(S3ANDDIFF 0,DIFF*1.4, 3 ),COLOR00FF00; 

    S5:=IF(5,LS0=5,ZT)ANDIF(5,DIFF DEA,0); 

    DRAWTEXT(S5ANDDIFF 0,DIFF*0.8, 5 ),COLOR00FF00; 

    DRAWTEXT(S5ANDDIFF 0,DIFF*1.4, 5 ),COLOR00FF00; 

    S8:=IF(8,LS0=8,ZT)ANDIF(8,DIFF DEA,0); 

    DRAWTEXT(S8ANDDIFF 0,DIFF*0.8, 8 ),COLOR00FF00; 

    DRAWTEXT(S8ANDDIFF 0,DIFF*1.8, 8 ),COLOR00FF00; 

    S13:=IF(13,LS0=13,ZT)ANDIF(8,DIFF DEA,0); 

    DRAWTEXT(S13ANDDIFF 0,DIFF*0.8, 13 ),COLOR00FF00; 

    DRAWTEXT(S13ANDDIFF 0,DIFF*1.2, 13 ),COLOR00FF00; 

    S21:=IF(21,LS0=21,ZT)ANDIF(21,DIFF DEA,0); 

    DRAWTEXT(S21ANDDIFF 0,DIFF*0.8, 21 ),COLOR00FF00; 

    DRAWTEXT(S21ANDDIFF 0,DIFF*1.2, 21 ),COLOR00FF00; 

    S26:=IF(26,LS0=26,ZT)ANDIF(26,DIFF DEA,0); 

    DRAWTEXT(S26ANDDIFF 0,DIFF*0.8, 26 ),COLOR00FF00; 

    DRAWTEXT(S26ANDDIFF 0,DIFF*1.2, 26 ),COLOR00FF00; 

    S29:=IF(29,LS0=29,ZT)ANDIF(29,DIFF DEA,0); 

    DRAWTEXT(S29ANDDIFF 0,DIFF*0.8, 29 ),COLOR00FF00; 

    DRAWTEXT(S29ANDDIFF 0,DIFF*1.2, 29 ),COLOR00FF00; 

    S34:=IF(34,LS0=34,ZT)ANDIF(34,DIFF DEA,0); 

    DRAWTEXT(S34ANDDIFF 0,DIFF*0.8, 34 ),COLOR00FF00; 

    DRAWTEXT(S34ANDDIFF 0,DIFF*1.8, 34 ),COLOR00FF00; 

    S55:=IF(55,LS0=55,ZT)ANDIF(55,DIFF DEA,0); 

    DRAWTEXT(S55ANDDIFF 0,DIFF*0.8, 55 ),COLOR00FF00; 

    DRAWTEXT(S55ANDDIFF 0,DIFF*1.8, 55 ),COLOR00FF00; 

    S68:=IF(68,LS0=68,ZT)ANDIF(68,DIFF DEA,0); 

    DRAWTEXT(S68ANDDIFF 0,DIFF*0.8, 68 ),COLOR00FF00; 

    DRAWTEXT(S68ANDDIFF 0,DIFF*1.8, 68 ),COLOR00FF00; 

    ZTJ:=CROSS(DIFF,DEA); 

    LSJ:=BARSLAST(ZTJ); 

    SJ1:=IF(1,LSJ=1,ZTJ)ANDIF(1,DIFF DEA,0); 

    DRAWTEXT(SJ1ANDDIFF 0,DIFF*1.2, 1 ),COLORFFFFFF; 

    DRAWTEXT(SJ1ANDDIFF 0,DIFF*0.8, 1 ),COLORFFFFFF; 

    SJ3:=IF(3,LSJ=3,LSJ)ANDIF(3,DIFF DEA,0); 

    DRAWTEXT(SJ3ANDDIFF 0,DIFF*1.2, 3 ),COLORFFFFFF; 

    DRAWTEXT(SJ3ANDDIFF 0,DIFF*0.8, 3 ),COLORFFFFFF; 

    SJ5:=IF(5,LSJ=5,ZTJ)ANDIF(5,DIFF DEA,0); 

    DRAWTEXT(SJ5ANDDIFF 0,DIFF*1.2, 5 ),COLORFFFFFF; 

    DRAWTEXT(SJ5ANDDIFF 0,DIFF*0.8, 5 ),COLORFFFFFF; 

    SJ8:=IF(8,LSJ=8,ZTJ)ANDIF(8,DIFF DEA,0); 

    DRAWTEXT(SJ8ANDDIFF 0,DIFF*1.2, 8 ),COLORFFFFFF; 

    DRAWTEXT(SJ8ANDDIFF 0,DIFF*0.8, 8 ),COLORFFFFFF; 

    SJ13:=IF(13,LSJ=13,ZTJ)ANDIF(8,DIFF DEA,0); 

    DRAWTEXT(SJ13ANDDIFF 0,DIFF*1.2, 13 ),COLORFFFFFF; 

    DRAWTEXT(SJ13ANDDIFF 0,DIFF*0.8, 13 ),COLORFFFFFF; 

    SJ18:=IF(18,LSJ=18,ZTJ)ANDIF(8,DIFF DEA,0); 

    DRAWTEXT(SJ18ANDDIFF 0,DIFF*1.2, 18 ),COLORFFFFFF; 

    DRAWTEXT(SJ18ANDDIFF 0,DIFF*0.8, 18 ),COLORFFFFFF; 

    SJ21:=IF(21,LSJ=21,ZTJ)ANDIF(21,DIFF DEA,0); 

    DRAWTEXT(SJ21ANDDIFF 0,DIFF*1.2, 21 ),COLORFFFFFF; 

    DRAWTEXT(SJ21ANDDIFF 0,DIFF*0.8, 21 ),COLORFFFFFF; 

    SJ26:=IF(26,LSJ=26,ZTJ)ANDIF(26,DIFF DEA,0); 

    DRAWTEXT(SJ26ANDDIFF 0,DIFF*1.2, 26 ),COLORFFFFFF; 

    DRAWTEXT(SJ26ANDDIFF 0,DIFF*0.8, 26 ),COLORFFFFFF; 

    SJ29:=IF(29,LSJ=29,ZTJ)ANDIF(29,DIFF DEA,0); 

    DRAWTEXT(SJ29ANDDIFF 0,DIFF*1.2, 29 ),COLORFFFFFF; 

    DRAWTEXT(SJ29ANDDIFF 0,DIFF*0.8, 29 ),COLORFFFFFF; 

    SJ34:=IF(34,LSJ=34,ZTJ)ANDIF(34,DIFF DEA,0); 

    DRAWTEXT(SJ34ANDDIFF 0,DIFF*1.2, 34 ),COLORFFFFFF; 

    DRAWTEXT(SJ34ANDDIFF 0,DIFF*0.8, 34 ),COLORFFFFFF; 

    SJ47:=IF(47,LSJ=47,ZTJ)ANDIF(47,DIFF DEA,0); 

    DRAWTEXT(SJ47ANDDIFF 0,DIFF*1.2, 47 ),COLORFFFFFF; 

    DRAWTEXT(SJ47ANDDIFF 0,DIFF*0.8, 47 ),COLORFFFFFF; 

    SJ55:=IF(55,LSJ=55,ZTJ)ANDIF(55,DIFF DEA,0); 

    DRAWTEXT(SJ55ANDDIFF 0,DIFF*1.2, 55 ),COLORFFFFFF; 

    DRAWTEXT(SJ55ANDDIFF 0,DIFF*0.8, 55 ),COLORFFFFFF; 

    SJ60:=IF(60,LSJ=60,ZTJ)ANDIF(60,DIFF DEA,0); 

    DRAWTEXT(SJ60ANDDIFF 0,DIFF*1.2, 63 ),COLORFFFFFF; 

    DRAWTEXT(SJ60ANDDIFF 0,DIFF*0.8, 63 ),COLORFFFFFF; 

    SJ68:=IF(68,LSJ=68,ZTJ)ANDIF(68,DIFF DEA,0); 

    DRAWTEXT(SJ68ANDDIFF 0,DIFF*1.2, 68 ),COLORFFFFFF; 

    DRAWTEXT(SJ68ANDDIFF 0,DIFF*0.8, 68 ),COLORFFFFFF; 

    DRAWICON(CROSS(MACD,0),MACD,1); 

    DRAWICON(CROSS(DIFF,DEA),DIFF,1); 

    DRAWICON(CROSS(DEA,DIFF),DEA,2); 

    N:=1; 

    量:=V; 

    换手:=V/CAPITAL*100; 

    VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 

    主买:=IF(CLOSE OPEN,VAR1*(HIGH-LOW),IF(CLOSE OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)); 

    主卖:=IF(CLOSE OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE OPEN,0-VAR1*(HIGH-LOW),0-VOL/2)); 

    主动比:=主买/主卖*-1; 

    成交量能数值:=主动比-2; 

    成交量能值:成交量能数值,COLORBLUE,VOLSTICK; 

    二十日飘红:COUNT(成交量能值 0,20),COLORRED,NODRAW; 

    十日飘红:COUNT(成交量能值 0,10),NODRAW; 

    STICKLINE(主卖 0,0,主卖,3,0),COLORCC0000; 

    STICKLINE(主卖 0,0,主卖,2,0),COLORFF4400; 

    STICKLINE(主卖 0,0,主卖,1.1,0),COLORFF8800; 

    STICKLINE(主卖 0,0,主卖,0.4,0),COLORFFCC00; 

    STICKLINE(主买 0,0,主买,3,0),COLOR000066; 

    STICKLINE(主买 0,0,主买,2,0),COLOR000099; 

    STICKLINE(主买 0,0,主买,1.1,0),COLOR0000CC; 

    STICKLINE(主买 0,0,主买,0.4,0),COLOR0000FF;


    image.png



    [源码注释]通达信公式动态公式解读

    公式解读:

    每日通达信公式解答:

     

    公式编写要求: 

    在7天内,5天线与10天线先金叉后死叉的形态,今天5天线重新金叉10天线,同时MACD是红柱的公式。 

    公式编写方法: 

    M:=7; 

    MA5:=(CLOSE,5); 

    MA10:=(CLOSE,10); 

    HZ:=MACD.MACD; 

    A1:=CROSS(MA5,MA10); 

    A2:=CROSS(MA10,MA5); 

    B1:=COUNT(A1,M)  

    B2:=COUNT(A2,M)  

    B3:=HZ  

    B4:=B1ANDB2ANDA1ANDB3; 

    XG:B4;


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信成交量公式(特色成交量指标公式) 加入收藏