通达信公式源码概况:

指标类别:通达信公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、通达信量比选股公式

  

VAR0:=100*(CLOSE-MA(AMOUNT/(100*VOL),5))/MA(AMOUNT/(100*VOL),5);  

VAR1:=(HIGH+LOW+CLOSE*2)/4;  

VAR2:=((VAR1-EMA(VAR1,21))/STD(VAR1,21)*100+200)/4;  

VAR3:=(EMA(VAR2,5)-25)*1.56;  

VAR4:=EMA(EMA(VAR3,2)*1.22,2);  

VAR5:=3*EMA(VAR3,2)*1.22-2*VAR4;  

VAR6:=EMA((VAR1-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100,13);  

VAR7:=EMA(0.667*REF(VAR6,1)+0.333*VAR6,2);  

VAR8:=EMA(VAR1,13)-EMA(VAR1,21);  

VAR9:=2*(VAR8-EMA(VAR6,2))*3.8;  

VAR10:=VAR9>REF(VAR9,1)ANDVAR6<63ANDVAR7<63ANDEMA(VAR3,2)*1.22<  

63ANDVAR4<63ANDVAR5<63ANDCROSS(VAR5,EMA(VAR3,2)*1.22)AND  

FINANCE(33)>0.01ANDFINANCE(34)>1ANDREF(CLOSE,23)/CLOSE>1.2AND  

REF(CLOSE,10)/CLOSE<1.5;  

VAR11:=MIN(REF(CLOSE,2)*0.865,REF(CLOSE,13)*0.772);  

VAR12:=IF((CLOSE-VAR11)/CLOSE<4/100ANDSUM(100*VOL/CAPITAL,5)/5<1.8AND  

WINNER(CLOSE)*100<0.1,1,0);  

VAR13:=CLOSE<(MA(CLOSE,80)-MA(CLOSE,10)/3)ANDVOL/240>MA(VOL,5)/240  

ANDCLOSE>REF(CLOSE,1)*1.08ANDCLOSE<MA(CLOSE,13)*1.3;  

VAR14:=VAR0<-10ANDCLOSE<10ANDCLOSE/REF(CLOSE,1)>0.935;  

VAR15:=MA(CLOSE,3)-CLOSE-WINNER(OPEN)+(COST(55)-COST(45))/(COST(97)-COST(  

3))+(WINNER(C)-REF(WINNER(C),4))*0.05/MA(V/CAPITAL,5);  

STICKLINE(VAR15>=0,0,VAR15,6,0),COLOR6600CC;  

STICKLINE(VAR15<=0,0,VAR15,6,0),COLOR00FF99;  

STICKLINE(VAR15<=0,0,VAR15*0.4,6,0),COLORCC0033;  

STICKLINE(VAR15>=0,0,VAR15*0.4,6,0),COLORCC0033;  

STICKLINE(VAR12>0ORVAR10>0ORVAR13>0ORVAR14>  

0,0,0.6,6,0),LINETHICK4,STICK,COLOR0000FF;  

lt:=(CAPITAL/100)/10000&lt;=10;  

ZF:=OPEN/ref(CLOSE,1);A1:=ZF&gt;=1.00andZF&lt;1.05;  

换手:=VOL/CAPITAL*100;换5:=MA(换手,5);  

涨停:=CLOSE/ref(CLOSE,1)&gt;1.095;TS:=BARSLAST(涨停);QJ:=BETWEEN(TS,1,10);  

M1:=5;M2:=10;M3:=20;M4:=60;  

VOLUME:=VOL,VOLSTICK;  

MAVOL1:MA(VOLUME,M1),LINETHICK1;  

MAVOL2:MA(VOLUME,M2),LINETHICK1,COLORGREEN;  

MAVOL3:MA(VOLUME,M3),LINETHICK0;  

MAVOL4:MA(VOLUME,M4),LINETHICK1;  

前量比:=VOL/REF(VOL,1);五量比:=VOL/MAVOL1;六量比:=VOL/MAVOL4;  

IF(MA(VOL,5)&gt;=REF(MA(VOL,5),1),MA(VOL,5),DRAWNULL),COLORRED,LINETHICK2;  

tj:=BARSSINCE(v)+1=1;zq:=BARSLAST(tj);  

量比:=if(tj,sum(v,0)/DYNAINFO(38)*240,ref(sum(v,0)/DYNAINFO(38)*240,zq));  

XG:ltandA1andref(换5,1)&lt;3and换手&gt;3and量比&gt;20;  

或:XG:ltandA1andref(换5,1)&lt;3and换手&gt;3andQJand量比&gt;20;  

X_1:=REF(EVERY(CLOSE&lt;OPEN,2),1)ANDCLOSE&gt;OPEN;  

X_2:=MA(CLOSE,5);  

X_3:=MA(CLOSE,10);  

X_4:=(X_2-CLOSE)/CLOSE&gt;3/100;  

X_5:=(X_3-X_2)/X_2&gt;0.03;  

X_6:=LLV(CLOSE,30)=LLV(CLOSE,120);  

X_7:=X_4ANDX_5ANDX_6;  

X_8:=COUNT(CLOSE/REF(CLOSE,1)&gt;1.097,60)AND(MA(CLOSE,250)&gt;=REF(MA(CLOSE,250),30)ORCLOSE&gt;MA(CLOSE,250))ANDBARSCOUNT(CLOSE)&gt;100;  

X_9:=BARSLAST(X_7)&lt;=2ANDX_1ANDX_8;  

X_10:=MA(HHV(HIGH,485),17);  

X_11:=MA(HHV(HIGH,222),17);  

X_12:=MA(HHV(HIGH,96),17);  

X_13:=MA(LLV(LOW,485),17);  

X_14:=MA(LLV(LOW,222),17);  

X_15:=MA(LLV(LOW,96),17);  

X_16:=MA((X_13*0.96+X_14*0.96+X_15*0.96+X_10*0.558+X_11*0.558+X_12*0.558)/6,17);  

X_17:=MA((X_13*1.25+X_14*1.23+X_15*1.2+X_10*0.55+X_11*0.55+X_12*0.65)/6,17);  

X_18:=MA((X_13*1.3+X_14*1.3+X_15*1.3+X_10*0.68+X_11*0.68+X_12*0.68)/6,17);  

X_19:=MA((X_16*3+X_17*2+X_18)/6*1.738,17);  

X_20:=IF(1&lt;=1341231,X_19,X_19*DAY);  

X_21:=LOW;  

X_22:=REF(LOW,1);  

X_23:=SMA(ABS(X_21-X_22),3,1)/SMA(MAX(X_21-X_22,0),3,1)*100;  

X_24:=MA(IF(CLOSE*1.35&lt;=X_20,X_23*10,X_23/10),3);  

X_25:=LLV(LOW,30);  

X_26:=HHV(X_24,30);  

X_27:=13412319;  

X_28:=IF(1&lt;=X_27,MA(IF(LOW&lt;=X_25,(X_24+X_26*2)/2,0),3),100000000);  

X_29:=REF(X_28,2)&gt;REF(X_28,3)ANDX_28&lt;REF(X_28,1);  

X_9ANDX_29;

image.png

二、通达信自带量比指标

  

V1:=AMOUNT/10000;  

业绩:FINANCE(33),POINTDOT,COLORFFCC66;  

VAR1:=REF(C,1);  

VAR2:=(VAR1-L)/(H-L);  

VAR3:=V1*VAR2;  

VAR4:=V*VAR2;  

VAR5:=ABS(VAR4);  

VAR6:=ABS(VAR3);  

VAR7:=ABS(V1-VAR6);  

大单卖盘:ABS(V-VAR5)/100,COLOR00FFFF;  

买盘:VAR3/100,COLORFF00FF;  

成交金额:V1/1000,COLOR00FF00;  

买卖盘比%:ABS(V-VAR3)/V*100,COLORC0C0C0;  

STICKLINE(C&gt;0,0,VAR6,2,0),COLORFFFF00;  

换手:100*V/CAPITAL,COLORRED;  

MA1:MA(AMOUNT/10000,5),COLOR00FFFF;{大单卖盘}  

MA2:MA(AMOUNT/10000,24),COLORFF00FF;{买盘}  

MA3:MA(AMOUNT/10000,60),COLOR00FF00;{成交金额}  

STICKLINE(换手&lt;3,VAR6,V1,2,0),COLORRED;  

STICKLINE(换手&gt;=3AND换手&lt;7,VAR6,V1,2,0),COLORYELLOW;  

STICKLINE(换手&gt;=7,VAR6,V1,2,0),COLOR00FF00;  

A1:=REF(CLOSE,2);  

A2:=SMA(MAX(CLOSE-A1,0),7,1)/SMA(ABS(CLOSE-A1),7,1)*100;  

A3:=DATE<=1070615;  

A4:=REF(LOW,1);  

A5:=SMA(ABS(LOW-A4),3,1)/SMA(MAX(LOW-A4,0),3,1)*100;  

A6:=EMA(IF(CLOSE*1.3,A5*10,A5/10),3);  

A7:=LLV(LOW,29);  

A8:=HHV(A6,37);  

A9:=IF(MA(CLOSE,90),1,0);  

A10:=EMA(IF(LOW<=A7,(A6+A8*2)/2,0),3)/1688*A9;  

A11:=IF(A10>100,100,A10);  

STICKLINE(A11,0,A11,4,1)*A3,COLOR990000;  

主力:EMA(WINNER(C)*100,5),LINETHICK2,COLORRED;  

散户:EMA((WINNER(C*1.1)-WINNER(C*0.9))*100,5),LINETHICK1,COLORYELLOW;  

吸筹:A11,COLORLIBLUE;  

获利盘%:WINNER(CLOSE)*100,LINETHICK2,COLORFFFFFF;  

YYA4:=MA(CLOSE,20);  

YYA5:=(CLOSE>MA(CLOSE,5));  

YYA6:=(MA(CLOSE,5)>MA(CLOSE,10));  

YYA7:=(CLOSE>MA(CLOSE,10));  

YYA8:=(MA(CLOSE,5)>MA(CLOSE,20));  

YYA9:=(CLOSE>MA(CLOSE,20));  

YYA10:=REF(YYA4,1);  

YYA11:=(YYA4>YYA10);  

YYAVX:=(((((IF(YYA5,10,(0-10))+IF(YYA6,10,(0-10)))+IF(YYA7,10,(0-10)))+  

IF(YYA8,10,(0-10)))+IF(YYA9,10,(0-10)))+IF(YYA11,10,(0-10)));  

DSLX:=(CLOSE/INDEXC);  

DSLX1:=MA(DSLX,5);  

YYV1:=MA(VOL,5);  

YYV2:=MA(VOL,10);  

MA75:=MA(CLOSE,75);  

WJ:=(H+L+C)/3;  

V1:=IF(H=L,1,H-MAX(O,C));  

V2:=IF(H=L,1,MAX(C,O)-WJ);  

V3:=IF(H=L,1,MIN(O,C)-L);  

V4:=IF(H=L,1,WJ-MIN(C,O));  

V5:=VOL/IF(H=L,4,H-L);  

V6:=(V1*V5);  

V7:=(V2*V5);  

V8:=(V3*V5);  

V9:=(V4*V5);  

LC:=REF(C,1);  

K9:=SMA((C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100,3,1);  

D9:=SMA(K9,3,1);  

J9:=3*K9-2*D9;  

VAR1:=DYNAINFO(17)*REF(MA(V,5),1);  

VAR2:=DYNAINFO(7)=CANDDYNAINFO(10)=AMOUNT;  

VAR3:=IF(DYNAINFO(7)=CANDDYNAINFO(10)=AMOUNT,VAR1,VAR2);  

预量:=IF(V>=VAR3ANDPERIOD=5,V,VAR3);  

TT:=240/FROMOPEN;  

比:=TT;  

比1:=预量/V;  

买盘:=IF(ISLASTBARANDPERIOD=5ANDC<300,(DYNAINFO(23)*比),(IF(ISLASTBAR  

ANDC>300,(V9+V8)*TT,(V9+V8))));  

卖盘:=IF(ISLASTBARANDPERIOD=5ANDC<300,(DYNAINFO(22)*比),(IF(ISLASTBAR  

ANDC>300,(V6+V7)*TT,(V6+V7))));  

买盘1:=DYNAINFO(23)*比1;  

卖盘1:=DYNAINFO(22)*比1;  

MFI:=(HIGH-LOW)*1000000/(VOL*比);  

XXX:=EMA((C-LLV(L,11))/(HHV(H,25)-LLV(L,11))*4,8)+1;  

XX:=IF(1=1,POW(XXX,2)-10,DRAWNULL);  

STICKLINE(CURRBARSCOUNT=53,100,0,110,0),COLOR333344;  

DRAWTEXT((CONST(IF(((CROSS(YYAVX,1)AND(YYV1>=YYV2))AND(DSLX>=  

DSLX1)),1,0)))=1AND(CLOSE<200)ANDCURRBARSCOUNT=59,70,'量能理想,明显走  

强,中线参与,仓位在2/3左右'),COLORFF00FF;  

DRAWTEXT((CONST(IF(((CROSS(YYAVX,1)AND(YYV1<YYV2))AND(DSLX>=  

DSLX1)),1,0)))=1AND(CLOSE<200)ANDCURRBARSCOUNT=59,70,'走势趋强量能不  

足,短线进场,仓位在1/2左右'),COLORFF00FF;  

DRAWTEXT((CONST(IF(((CROSS(YYAVX,1)AND(YYV1>YYV2))AND(DSLX<  

DSLX1)),1,0)))=1AND(CLOSE<200)ANDCURRBARSCOUNT=59,70,'量价良好,并没有  

明显走强,短线进场,仓位1/2左右。'),COLORFF00FF;  

DRAWTEXT((CONST(IF(((CROSS(YYAVX,1)AND(YYV1<=YYV2))AND(DSLX<  

DSLX1)),1,0)))=1AND(CLOSE<200)ANDCURRBARSCOUNT=59,70,'形态尚可,量能不  

足,未完全走强,短线参与,仓位1/3左右。'),COLORFF00FF;  

DRAWTEXT((CONST(IF(((CROSS(1,YYAVX)AND(YYV1>=YYV2))AND(DSLX>=  

DSLX1)),1,0)))=1AND(CLOSE<200)ANDCURRBARSCOUNT=59,70,'形态变坏,走势尚  

可,重仓减大半,清仓者观望。'),COLORYELLOW;  

DRAWTEXT((CONST(IF(((CROSS(1,YYAVX)AND(YYV1<YYV2))AND(DSLX>=  

DSLX1)),1,0)))=1AND(CLOSE<200)ANDCURRBARSCOUNT=59,70,'随大盘一起下跌,  

明显缩量走势,考虑大盘风险,减持或清仓。'),COLORYELLOW;  

DRAWTEXT((CONST(IF(((CROSS(1,YYAVX)AND(YYV1>=YYV2))AND(DSLX<  

DSLX1)),1,0)))=1AND(CLOSE<200)ANDCURRBARSCOUNT=59,70,'该股放量下跌,走  

势明显偏弱,离场观望。'),COLORYELLOW;  

DRAWTEXT((CONST(IF(((CROSS(1,YYAVX)AND(YYV1<YYV2))AND(DSLX<  

DSLX1)),1,0)))=1AND(CLOSE<200)ANDCURRBARSCOUNT=59,70,'该股缩量下跌,走  

势偏弱,离场观望。'),COLORYELLOW;  

DRAWTEXT((CONST(IF(((((YYAVX>=1)AND(REF(YYAVX,1)>0))AND(YYV1>=  

YYV2))AND(DSLX>=DSLX1)),1,0)))=1  

AND(CLOSE<200)AND  

CURRBARSCOUNT=59,60,'该股形态良好,强势明显,量能充足,可以继续持有。  

'),COLOR00FFFF;  

DRAWTEXT((CONST(IF(((((YYAVX>=1)AND(REF(YYAVX,1)>0))AND(YYV1<  

YYV2))AND(DSLX>=DSLX1)),1,0)))=1  

AND(CLOSE<200)AND  

CURRBARSCOUNT=59,60,'该股上行趋势不变,强势依然,但量能开始转弱,注意风险  

'),COLORYELLOW;  

DRAWTEXT((CONST(IF(((((YYAVX>=1)AND(REF(YYAVX,1)>0))AND(YYV1>=  

YYV2))AND(DSLX<DSLX1)),1,0)))=1  

AND(CLOSE<200)AND  

CURRBARSCOUNT=59,60,'该股仍然具备上涨潜力,但股性偏弱,可考虑减仓。  

'),COLORYELLOW;  

DRAWTEXT((CONST(IF(((((YYAVX>=1)AND(REF(YYAVX,1)>0))AND(YYV1<  

YYV2))AND(DSLX<DSLX1)),1,0)))=1  

AND(CLOSE<200)AND  

CURRBARSCOUNT=59,60,'该股走势趋弱,量能不足,减持大部分筹码'),COLORYELLOW;  

DRAWTEXT((CONST(IF(((((YYAVX<1)AND(REF(YYAVX,1)<0))AND(YYV1>=  

YYV2))AND(DSLX>=DSLX1)),1,0)))=1  

AND(CLOSE<200)AND  

CURRBARSCOUNT=59,60,'该股形态不佳,注意成交量的变化,但目前不适合参与。  

'),COLORYELLOW;  

DRAWTEXT((CONST(IF(((((YYAVX<1)AND(REF(YYAVX,1)<0))AND(YYV1<YYV2))  

AND(DSLX>=DSLX1)),1,0)))=1AND(CLOSE<200)ANDCURRBARSCOUNT=59,60,'  

该股趋势不明,股价偏弱,注意量能变化,目前不宜参与。'),COLORFFFF00;  

DRAWTEXT((CONST(IF(((((YYAVX<1)AND(REF(YYAVX,1)<0))AND(YYV1>=  

YYV2))AND(DSLX<DSLX1)),1,0)))=1  

AND(CLOSE<200)AND  

CURRBARSCOUNT=59,60,'有走强迹象,但量能不足,趋势不明,不适合操作  

'),COLORFFFF00;  

DRAWTEXT((CONST(IF(((((YYAVX<1)AND(REF(YYAVX,1)<0))AND(YYV1<YYV2))  

AND(DSLX<DSLX1)),1,0)))=1AND(CLOSE<200)ANDCURRBARSCOUNT=59,60,'该  

股走势太弱,没有参与价值。'),COLORFFFFFF;  

DRAWTEXT((CONST(IF((CROSS(YYAVX,1)AND(YYV1>=YYV2)),1,0)))AND  

(CLOSE>200)ANDCURRBARSCOUNT=59,50,'量能理想,2/3仓位,前一轮下跌,最佳买点,  

否则谨慎介入。'),COLOR00FF00;  

DRAWTEXT((CONST(IF((CROSS(YYAVX,1)AND(YYV1<YYV2)),1,0)))AND  

(CLOSE>200)ANDCURRBARSCOUNT=59,50,'趋强,量能不足,若前一轮下跌,短线进场  

1/2,量能放大加仓。'),COLORFF00FF;  

DRAWTEXT((CONST(IF((CROSS(1,YYAVX)AND(YYV1>=YYV2)),1,0)))AND  

(CLOSE>200)ANDCURRBARSCOUNT=59,50,'大盘形态走坏,重仓者可以减去大部分仓  

位。'),COLORAAAAAA;  

DRAWTEXT((CONST(IF((CROSS(1,YYAVX)AND(YYV1<YYV2)),1,0)))AND  

(CLOSE>200)ANDCURRBARSCOUNT=59,50,'大盘缩量调整,注意风险,短线清仓观望。  

'),COLORFF0000;  

DRAWTEXT((CONST(IF((((YYAVX>=1)AND(REF(YYAVX,1)>0))AND(YYV1>=  

YYV2)),1,0)))AND(CLOSE>200)ANDCURRBARSCOUNT=59,50,'大盘走势良好,量能理  

想,可以继续持有强势股。'),COLOR00FFFF;  

DRAWTEXT((CONST(IF((((YYAVX>=1)AND(REF(YYAVX,1)>0))AND(YYV1<  

YYV2)),1,0)))AND(CLOSE>200)ANDCURRBARSCOUNT=59,50,'大盘形态良好,但量能  

稍显不足,随时准备减仓'),COLOR00FF00;  

DRAWTEXT((CONST(IF((((YYAVX<1)AND(REF(YYAVX,1)<0))AND(YYV1>=  

YYV2)),1,0)))AND(CLOSE>200)ANDCURRBARSCOUNT=59,50,'大盘趋势不明,注意成  

交量变化,目前不适宜进场。'),COLORFFFFFF;  

DRAWTEXT((CONST(IF((((YYAVX<1)AND(REF(YYAVX,1)<0))AND(YYV1<  

YYV2)),1,0)))AND(CLOSE>200)ANDCURRBARSCOUNT=59,50,'大盘趋势向下,量能萎  

缩,不适合进场。'),COLORFFFFFF;  

DRAWTEXT(CONST(MFI>=REF(MFI,1)ANDVOL*比>=REF(VOL,1))AND  

CURRBARSCOUNT=59,40,'[绿灯]实计交易量增加。MFI促进指数增加。'),COLORFFFFFF;  

DRAWTEXT(CONST(MFI<REF(MFI,1)ANDVOL*比<REF(VOL,1))AND  

CURRBARSCOUNT=59,40,'[衰退]实计交易量减少。MFI促进指数减少。'),COLORGREEN;  

DRAWTEXT(CONST(MFI>=REF(MFI,1)ANDVOL*比<REF(VOL,1))AND  

CURRBARSCOUNT=59,40,'[伪装]实计交易量减少。MFI促进指数增加。'),COLORGREEN;  

DRAWTEXT(CONST(MFI<REF(MFI,1)ANDVOL*比>=REF(VOL,1))AND  

CURRBARSCOUNT=59,40,'[蛰伏]实计交易量增加。MFI促进指数减少。'),COLORYELLOW;  

DRAWTEXT(CONST((卖盘+买盘)/REF(VOL,1)>2)ANDCURRBARSCOUNT=59,30,'★预比  

昨量放大一倍以上;'),COLORGREEN;  

DRAWTEXT(CONST(REF(VOL,1)/(卖盘+买盘)>1.5)ANDCURRBARSCOUNT=59,30,'★预  

比昨缩量一半以上;'),COLORYELLOW;  

DRAWTEXT(CONST((卖盘-买盘)/买盘>0.4)ANDCURRBARSCOUNT=59,20,'☆卖出量大于  

买入量40%以上;'),COLORGREEN;  

DRAWTEXT(CONST((买盘-卖盘)/卖盘>0.4)ANDCURRBARSCOUNT=59,20,'☆买入量大于  

卖出量40%以上;'),COLORYELLOW;  

DRAWTEXT(CONST(IF(预量=LLV(预量,10),1,0))ANDCURRBARSCOUNT=59,10,'缩量  

'),COLOR00FF00;  

DRAWTEXT(CONST(IF(预量=LLV(预量,10)ANDJ9<70,1,0))AND  

AND  

CURRBARSCOUNT=59,10,'缩量,一旦放量上升可买入'),COLOR00FF00;  

DRAWTEXT(CONST(IF(C>LCANDMA(C,5)>REF(MA(C,5),1)  

MA(C,10)>REF(MA(C,10),1)ANDC>MA(C,5)ANDREF(MA(C,5),1)>=REF(MA(C,5),2)  

ANDYYV1<=YYV2AND(预量<REF(预量,1)AND预量<YYV1)AND买盘1>卖盘1,1,0))  

ANDCURRBARSCOUNT=28,20,'量弱少量买明放量加仓'),COLORFF00FF;  

DRAWTEXT(CONST(IF(C<LCANDC<MA(C,5)AND买盘1<卖盘1AND预量>REF(预  

量,1)AND预量>YYV1,1,0))ANDCURRBARSCOUNT=28,3,'放量跌'),COLOR00FF00;  

DRAWTEXT(CONST(IF(C<LC*0.96ANDC<MA(C,5)AND买盘1>卖盘1*1.15AND预  

量>REF(预量,1)AND预量>YYV1,1,0))ANDCURRBARSCOUNT=28,10,'有抄底资金进入  

'),COLOR00CCCC;  

DRAWTEXT(CONST(IF(C<LCANDMA(C,5)<REF(MA(C,5),1)AND  

MA(C,10)<=REF(MA(C,10),1)AND买盘1<卖盘1ANDC<MA(C,5)ANDC<MA(C,10)AND  

预量>LLV(预量,10),1,0))ANDCURRBARSCOUNT=28,20,'走弱离场'),COLORFFFF00;  

DRAWTEXT(CONST(IF((C>MA(C,5)ANDC<MA(C,10))OR(C<=MA(C,5)  

(C>=MA(C,10)ORMA(C,10)>=REF(MA(C,10),1))),1,0))ANDC<LC  

CURRBARSCOUNT=59,90,'短线盘整'),COLORFF77CC;  

AND  

AND  

DRAWTEXT((CONST(IF(CLOSE>=MA(CLOSE,13),1,0)))ANDCURRBARSCOUNT=59,80,'  

短线上升持股'),COLORGREEN;  

DRAWTEXT((CONST(IF(CLOSE<MA(CLOSE,13)ANDC<MA(CLOSE,5),1,0)))  

CURRBARSCOUNT=59,80,'短线下降持币'),COLORGREEN;  

DRAWTEXT((CONST(IF(CROSS(MA(CLOSE,13),CLOSE),1,0)))  

CURRBARSCOUNT=49,90,'短线下降卖出'),COLORGREEN;  

AND  

AND  

DRAWTEXT((CONST(IF(C>=MA75,1,0)))ANDCURRBARSCOUNT=49,80,'长线上升持股  

'),COLORGREEN;  

DRAWTEXT((CONST(IF(C<MA75,1,0)))ANDCURRBARSCOUNT=49,80,'长线下降持币  

'),COLORGREEN;  

万手:VOL/10000,LINETHICK0;  

AA:=IF(CURRBARSCOUNT=1ANDPERIOD=5,VOL*240/FROMOPEN,DRAWNULL);  

预测:AA/10000;  

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

主动  

买:=IF(CLOSE>OPEN,BB*(HIGH-LOW),IF(CLOSE<OPEN,BB*((HIGH-OPEN)+(CLOSE-LO  

W)),VOL/2));  

主买:主动买/10000,COLORRED;  

主动  

卖:=IF(CLOSE>OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-BB*(HIGH  

-LOW),0-VOL/2));  

主卖:-主动卖/10000,COLORGREEN;  

差额:(主动买+主动卖)/10000;  

STICKLINE(CLOSE=REF(CLOSE,1),0,VOL,3.5,0),COLORWHITE;  

STICKLINE(CLOSE>REF(CLOSE,1),0,VOL,3.5,0),COLORRED;  

STICKLINE(CLOSE<REF(CLOSE,1),0,VOL,3.5,0),COLORGREEN;  

STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,3.5,0),COLOR00FFFF;  

STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,3.2,0),COLOR007777;  

STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,2.7,0),COLOR009999;  

STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,2.1,0),COLOR00BBBB;  

STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,1.5,0),COLOR00DDEE;  

STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,0.9,0),COLOR66FFFF;  

STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,1,0.2,0),COLORFFFFFF;  

STICKLINE(主动买>=0,VOL,-主动卖,3.2,0),COLOR000033;  

STICKLINE(主动买>=0,VOL,-主动卖,2.7,0),COLOR000066;  

STICKLINE(主动买>=0,VOL,-主动卖,2.1,0),COLOR000099;  

STICKLINE(主动买>=0,VOL,-主动卖,1.5,0),COLOR0000CC;  

STICKLINE(主动买>=0,VOL,-主动卖,0.9,0),COLOR0000FF;  

STICKLINE(主动买>=0,VOL,-主动卖,0.2,0),COLORCC66FF;  

STICKLINE(主动卖<=0,0,-主动卖,3.2,0),COLOR990000;  

STICKLINE(主动卖<=0,0,-主动卖,2.7,0),COLORCC0000;  

STICKLINE(主动卖<=0,0,-主动卖,2.1,0),COLORFF4400;  

STICKLINE(主动卖<=0,0,-主动卖,1.5,0),COLORFF8800;  

STICKLINE(主动卖<=0,0,-主动卖,0.9,0),COLORFFCC00;  

STICKLINE(主动卖<=0,0,-主动卖,0.2,0),COLORCYAN;  

持币:IF(SAR(10,2,20)>=H,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORBLUE;  

持股:IF(SAR(10,2,20)<=L,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORRED;  

五日:MA(V,5)COLORWHITE;  

十日:MA(V,10)COLORYELLOW;

image.png

[源码注释]通达信公式动态翻译结果

ZTB赋值:收盘价/1日前的收盘价>=1.098

SY赋值:1日前的收盘价/收盘价>1

ZDJ赋值:20日内最低价的最低值

底部Z赋值:收盘价/ZDJ<=1.3

输出两连炮板:ZTB AND 1日前的SY AND 2日前的ZTB AND 底部Z

每日通达信公式解答:

公式编写要求:

3天的成交量都大于过去3天的成交总量,(也就是以1,2,3天为参考, 连续第4,5,6天的成交量 每天都大于123天的成交总量),一字板排除的选股公式。

公式编写方法:

E3:=REF(V,5)+REF(V,4)+REF(V,3);
XG:REF(V,2)>E3 AND REF(V,1)>E3 AND V>E3 AND L<H AND REF(L,1)<REF(H,1) AND REF(L,2)<REF(H,2);

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。