通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信龙虎榜副图指标公式
N:=10;
额:=AMOUNT;
买:=IF(O=CAND(C-REF(C,1))/REF(C,1)*100>9.8,AMOUNT,AMOUNT/((H-L)*2-ABS(O-C))*(C-L));
买%:=买/AMOUNT*100;
买入:=AMOUNT*买%/10000000000;
卖出:=AMOUNT/100000000-买入;
净额:=买入-卖出;
龙虎榜:=SUM(净额,N)>0;
小V逆转:REF(C,1)<REF(O,1)ANDO>REF(C,1)ANDC>=REF(C,1)*1.08,COLORRED,NODRAW;
龙虎逆转:龙虎榜AND小V逆转,COLORMAGENTA,NODRAW;
STICKLINE(小V逆转,20,0,4,0),COLOR000099;
STICKLINE(小V逆转,25,0,2,0),COLOR0000BB;
STICKLINE(小V逆转,35,0,1,0),COLOR0000DD;
STICKLINE(小V逆转,45,0,0.9,0),COLOR0000FF;
DRAWICON(龙虎逆转,40,34);
DRAWTEXT(小V逆转>0,25,'小V逆转'),COLOR00C5FF;
N:=1;
xopen:=(REF(O,N)+REF(C,N))/2;
xclose:=CLOSE;
xhigh:=MAX(HIGH,xopen);
xlow:=MIN(LOW,xopen);
volality:=MA(xhigh-xlow,8);
凰线:MA(xclose,5)+volality/2;
凤线:MA(xclose,5)-volality/2;
凰线升:IF(凰线>REF(凰线,1),凰线,DRAWNULL),colorred,LINETHICK2;
凰线降:IF(凰线<REF(凰线,1),凰线,DRAWNULL),colorgreen,LINETHICK2;
凤线升:IF(凤线>REF(凤线,1),凤线,DRAWNULL),colormagenta,LINETHICK2;
凤线降:IF(凤线<REF(凤线,1),凤线,DRAWNULL),colorgreen,LINETHICK2;
bu:=CROSS(xclose,凰线);
sel:=CROSS(凤线,xclose);
var1:=BARSLAST(bu);
var2:=BARSLAST(sel);
DRAWICON(REF(var1,1)>var2ANDvar1=0,凤线*0.99,1),align1,valign0;
DRAWICON(REF(var2,1)>var1ANDvar2=0,凰线*1.01,2),align1,valign2;
STICKLINE(xclose>xopenANDvar1<var2,xclose,xopen,8,0),colorred;
STICKLINE(xclose>xopenANDvar1<var2,xhigh,xclose,0.5,0),colorred;
STICKLINE(xclose>xopenANDvar1<var2,xopen,xlow,0.5,0),colorred;
STICKLINE(xclose<=xopenANDvar1<var2,xclose,xopen,8,0),coloryellow;
STICKLINE(xclose<=xopenANDvar1<var2,xhigh,xopen,0.5,0),coloryellow;
STICKLINE(xclose<=xopenANDvar1<var2,xclose,xlow,0.5,0),coloryellow;
STICKLINE(xclose<=xopenANDvar1>var2,xclose,xopen,8,0),colorgreen;
STICKLINE(xclose<=xopenANDvar1>var2,xopen,xhigh,0.5,0),colorgreen;
STICKLINE(xclose<=xopenANDvar1>var2,xclose,xlow,0.5,0),colorgreen;
STICKLINE(xclose>xopenANDvar1>var2,xclose,xopen,8,0),colormagenta;
STICKLINE(xclose>xopenANDvar1>var2,xclose,xhigh,0.5,0),colormagenta;
STICKLINE(xclose>xopenANDvar1>var2,xopen,xlow,0.5,0),colormagenta;
T:=1;
V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20)*T;
V2:=(1-7/100)*(DMA(CLOSE,V1))*T;
V3:=(1+7/100)*(DMA(CLOSE,V1))*T;
V5:=MA((LOW+HIGH+CLOSE)/3,5)*T;
HHJSJDA:=(3*CLOSE+OPEN+LOW+HIGH)/6;
主力成本线:(20*HHJSJDA+19*REF(HHJSJDA,1)+18*REF(HHJSJDA,2)+17*REF(HHJSJDA,3)+16*REF(HHJSJDA,4)+15*REF(HHJSJDA,5)+14*REF(HHJSJDA,6)
+13*REF(HHJSJDA,7)+12*REF(HHJSJDA,8)+11*REF(HHJSJDA,9)+10*REF(HHJSJDA,10)+9*REF(HHJSJDA,11)+8*REF(HHJSJDA,12)
+7*REF(HHJSJDA,13)+6*REF(HHJSJDA,14)+5*REF(HHJSJDA,15)+4*REF(HHJSJDA,16)+3*REF(HHJSJDA,17)+2*REF(HHJSJDA,18)+
REF(HHJSJDA,20))/211,coloryellow;
X1:=(C+L+H+O)/4;
X2:=EMA(X1,5);
X3:=EMA(X2,7);
DRAWICON(CROSS(X2,X3)*T,L*0.99,1);
DRAWICON(CROSS(X3,X2)*T,H*1.007,2);MA1:MA(C,5),colorred,LINETHICK1;
K1:=BACKSET(MA1<REF(MA1,1),2);
IF(K1,MA1,DRAWNULL),COLOR00CC33,LINETHICK1;
Y:=(MA(C,5)-MA(C,30))/MA(C,5)*100;
YY1:=C>MA(C,5)ANDOPEN<MA(C,5);
YY3:=C>MA(C,10)ANDOPEN<MA(C,10);
YY5:=C>MA(C,30)ANDOPEN<MA(C,30);
DRAWTEXT(YY1ANDYY5ANDYY3,LOW*0.97,'双龙'),colorred;
V1:=DMA((((HIGH+LOW)+(CLOSE*2))/4.15),0.9);
HHY1:=REF(EMA(V1,3),1);
神秘线:=HHY1;
价:=C;
工作线:EMA(CLOSE,17),COLOR0F00FF;
庄线:=EMA(WINNER(C)*70,5);
短庄:=MA(庄线,10);
AA1:=庄线*CLOSE;
AA2:=庄线*OPEN;
AA3:=庄线*HIGH;
AA4:=庄线*LOW;
VAR1:=AA1-REF(AA1,1);
VAR2:=AA2-REF(AA2,1);
VAR3:=AA3-REF(AA3,1);
VAR4:=AA4-REF(AA4,1);
var5:=(var1+var2+var3+var4)/4;
动能:=MA(var5*庄线,14);
买方:=庄线>短庄AND价>工作线;
买2:=CROSS(庄线,短庄)OR(REF(短庄,1)=REF(庄线,1)AND短庄<庄线);
买1:=CROSS(价,工作线)OR(REF(工作线,1)=REF(价,1)AND工作线<价);
STICKLINE(CLOSE<OPENANDREF(CLOSE,1)>REF(OPEN,1),REF(CLOSE,1),REF(CLOSE,1),20,0),COLORFFFFFF;
aa:=HHV(C,5)/LLV(C,5)<1.50ANDCOUNT(C>O,5)>=1ANDCOUNT(C<O,5)>=1ANDCOUNT(L>REF(L,1),5)<=3;
盘整:=REF(aa,1)ANDC>OAND(C-O)>REF(HHV(ABS(C-O),5),1)*1.3ANDC>REF(HHV(H,5),1);
突破:=突破盘整AND价>工作线;
涨:=CLOSE/REF(CLOSE,1)>=1.07;
跨越:=EMA(SMA((C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*100,10,1),3);
特殊会员:=3*SMA((C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*100,13,1)-2*SMA(SMA((C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*100,13,1),5,1);
卖卖:=CROSS(跨越,特殊会员)OR(REF(特殊会员,1)=REF(跨越,1)AND特殊会员<跨越);
买A:=CROSS(特殊会员,跨越)OR(REF(跨越,1)=REF(特殊会员,1)AND跨越<特殊会员);
va:=VOL/CAPITAL*1000;
vaa:=REF(SUM(va,5),1);
v3:=vaANDva>vaa;
v4:=v3ANDCOUNT(v3,50)=1;
笑脸关注:=买1AND买方;
笑脸关注2:=买2AND买方;
DRAWTEXT(买2AND买方,(OPEN*0.97),'○');
DRAWTEXT(买1AND买方,(OPEN*0.955),'○');
开始建仓:=动能>0AND动能<150AND买方AND卖卖<1;
拉升待涨:=动能>0AND庄线>短庄AND价>工作线ANDC>0;
短线出击:=突破AND涨;
DRAWTEXT(突破AND涨,(OPEN*1),'★');
筹码突破:=买AAND价>工作线;
DRAWTEXT(买AAND价>工作线,(OPEN*1),'╬');
走弱出局:=CROSS(神秘线,价)OR(REF(价,1)=REF(神秘线,1)AND价<神秘线);
DRAWTEXT(走弱出局,(OPEN*1.03),'═');
弱市观望:=价<工作线;
赶底不碰:=价<工作线AND价<神秘线;
STICKLINE(C>0,0,120,15,0),COLORBLUE;
RSV:=(CLOSE-LLV(LOW,4))/(HHV(HIGH,4)-LLV(LOW,4))*100;
FASTK:=SMA(RSV,3,1);
龙:SMA(FASTK,2,1);
龙D:=SMA(龙,5,1);
STICKLINE(龙>=龙D,龙D,龙,3,0),COLOR000085;
STICKLINE(龙<龙D,龙D,龙,3,0),COLOR324800;
DRAWTEXT(CROSS(龙D,龙)AND龙>70,50,'卖'),COLORGREEN;
L1:=(CLOSE-LLV(LOW,11))/(HHV(HIGH,11)-LLV(LOW,11))*200-60;
凤:SMA(L1,3,1),COLORYELLOW;
凤D:=SMA(凤,3,1),COLORRED;
DRAWBAND(凤D,RGB(0,128,0),凤,RGB(255,97,0));
DRAWTEXT(CROSS(凤D,凤)AND凤>78,凤,'←快卖');
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=1000*(2*(DIFF-DEA))/EMA(C,30);
VARA:=EMA(REF(CLOSE,1),4);
VAR1:=(SMA(MAX(CLOSE-VARA,0),6,1)/SMA(ABS(CLOSE-VARA),6,1)*100);
VAR2:=FILTER(MACD<0ANDMACD>REF(MACD,1)ANDVAR1<20,5);
VAR3:=CROSS(VAR1,90);
准备:IF(VAR1<3.5,15,0),COLORCYAN,LINETHICK2;
DRAWTEXT(VAR1<3.5,7,'准备'),COLORCYAN;
钱进:IF(VAR2,20,0),COLORMAGENTA,LINETHICK3;
DRAWTEXT(VAR2,10,'“钱”进'),COLORRED;
{DRAWTEXT(VAR3,70,'凤舞ラ小心'),COLORCYAN;}
VAR4:=LLV(LOW,10);
VAR5:=HHV(H,25);
VAR6:=EMA((C-VAR4)/(VAR5-VAR4)*4,4);
DRAWTEXT(CROSS(3.5,VAR6),110,'急卖');
恭喜:STICKLINE(CROSS(VAR6,0.3),-50,-30,3,0),COLOR00AAFF,LINETHICK1;
STICKLINE(CROSS(VAR6,0.3),-40,-30,3,0),COLORRED,LINETHICK1;
DRAWTEXT(CROSS(VAR6,0.3),-45,'恭喜'),COLORMAGENTA;
发财:STICKLINE(CROSS(3.5,VAR6),100,120,2,0),COLORRED,LINETHICK2;
STICKLINE(CROSS(3.5,VAR6),110,120,2,0),COLORYELLOW,LINETHICK2;
DRAWTEXT(CROSS(3.5,VAR6),90,'发财'),COLORYELLOW;
龙行凤影:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)
-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)
-LLV(LOW,27))*100,5,1),3,1);
龙飞:IF(龙行凤影<=10,-20,-40),COLOR0000FF,LINETHICK2;
{DRAWTEXT(龙行凤影<=10,-25,'龙飞'),COLORYELLOW;}
DRAWTEXT(CROSS(0,MACD)ANDVAR1>75,110,'☆高空'),COLORFFFFFF;
红红的天:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)
-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)
-LLV(LOW,27))*100,5,1),3,1);
花开:IF(CROSS(红红的天,2),70,-50),COLORLIMAGENTA,LINETHICK2;
DRAWTEXT(CROSS(红红的天,2),75,'花开了'),COLORMAGENTA;
IF(CROSS(红红的天,2),70,DRAWNULL),CROSSDOT,LINETHICK6,COLORFF77FF;
IF(CROSS(红红的天,2),70,DRAWNULL),POINTDOT,LINETHICK4,COLOR00CCFF;
RSV1:=(((CLOSE-LLV(LOW,29))/(HHV(HIGH,29)-LLV(LOW,29)))*100);
K1:=MA(RSV1,5);
D1:=MA(K1,2);
J1:=((3*K1)-(2*D1));
明天涨:IF((J1<5),25,0),COLORRED,LINETHICK2;
DRAWTEXT((J1<5),30,'明天涨'),COLORYELLOW;
R:=RSI;
MAR:=MA(R,3);
F:=100*(C-REF(C,1))/REF(C,1);
HHH:=EMA(R,25)+6,COLORBLUE;
GAODIAN:=REF(R,1)>REF(R,2)ANDREF(R,1)>R;
DIDIAN:=(REF(R,1)<REF(R,2)ANDREF(R,1)<R)OR(REF(R,1)=REF(R,2)ANDREF(R,1)<RANDREF(R,2)<REF(R,3));
BIAOJI:=CROSS(HHH,R);
JIN:STICKLINE(REF(R,2)>REF(R,3)ANDREF(R,2)>REF(R,1)ANDR>REF(R,1)
ANDMAR>REF(MAR,1)+1ANDREF(MAR,2)-REF(MAR,1)>-1
ANDREF(R,1)<REF(MAR,1)ANDREF(R,2)-REF(MAR,2)>-3
ANDREF(R,1)<38ANDR<HHHANDF<8,100,120,2,0),COLORRED;
DRAWTEXT(JIN,110,'RSI买'),COLORYELLOW;
VAR7:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
VAR8:=EMA(VAR7,5),LINETHICK2,COLOR6600FF;
VAR9:=100*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60)),LINETHICK2;
STICKLINE(CROSS(VAR8,VAR9),0,20,2,0);
DRAWTEXT(CROSS(VAR8,VAR9),20,'追涨');
VOLUME:=VOL/10000,VOLSTICK;
MAVOL1:=MA(VOLUME,5)/10000;
MAVOL2:=MA(VOLUME,35)/10000;
MAVOL3:=MA(VOLUME,135)/10000;
地量:IF(CROSS(0.9,1/VOL*1000>0.01AND"KDJ.J"<0),-25,-50),COLORMAGENTA,LINETHICK3;
DRAWTEXT(CROSS(0.9,1/VOL*1000>0.01AND"KDJ.J"<0),-29,'地量'),COLORRED;
DRAWTEXT(LAST(MA(C,5)<MA(C,10),5,0)AND"CCI.CCI">REF("CCI.CCI",1)ANDCROSS("CCI.CCI",-100),-45,'CCI买点'),COLORYELLOW;
A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1);
LC:=REF(CLOSE,1);
RSI2:=((SMA(MAX((CLOSE-LC),0),3,1)/SMA(ABS((CLOSE-LC)),3,1))*100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
出局:IF(CROSS(88,RSI2),100,120),COLORLIGREEN,LINETHICK3;
DRAWTEXT(CROSS(88,RSI2),100,'虎'),COLORGREEN;
RSV3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV3,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
进场:IF(CROSS(J,REF(J+0.01,1))ANDXANDJ<20,0,-20),COLORYELLOW,LINETHICK2;
DRAWTEXT(CROSS(J,REF(J+0.01,1))ANDXANDJ<20,-10,'龙'),COLORYELLOW;
WZ:=150=CURRBARSCOUNT;
[源码注释]通达信公式动态翻译结果
输出FL:收盘价的17日简单移动平均+收盘价的17日简单移动平均-1日前的收盘价的17日简单移动平均的绝对值,COLORF4E202
输出FS:收盘价的17日简单移动平均+收盘价的17日简单移动平均-1日前的收盘价的17日简单移动平均,COLORF4E202
输出CG:如果收盘价的17日简单移动平均<FS,返回FS,否则返回收盘价的17日简单移动平均,COLORF4E202
年线赋值:收盘价的250日指数移动平均
输出A:CG-(收盘价的3日指数移动平均-CG),COLORFFCCCC
输出QQ:年线-(收盘价的3日指数移动平均-年线),COLORFF80FF,线宽为2
如果CG=FS,返回CG,否则返回CG, 画黄色,线宽为2
指标公式知识:
主力出货在分时图上的特征
一、跌破均价线卖点。均价线反映了当日买入的平均价格,它的走向也反映了市场投资者的买卖意愿。如果股价跌破均价线,说明最近的买入意愿已经严重下降,卖出意愿增强了很多,投资者愿意以低于均价的价格出货足以说明当时空头占据优势,场内获利盘和恐慌盘常常会跟风出逃,股价短期内将步入调整周期,机会较小,应及时卖出。
二、跌破前高卖点。股价逐波上涨,然后股价下滑,跌破前期高点位置。前期高点通常可作为一个重要的支撑位,如果股价跌破前高,意味着防守的一道屏障已经被突破,后市继续下跌的可能性极大。此时,上涨量能难以维系,股价反转向下,短期内多方无力有效反攻,果断出逃为上策。
三、分时线与均价线背离卖点。分时线走高,均价线没有跟随。说明市场不认同股价上涨,追涨意愿不足。既然市场大部分人不认同上涨,则后市下跌的可能性较大。此时从技术上来看,股价前期整体涨幅较大,虽然分时线快速走高,但均价线并不跟随向上,同时也缺乏成交量配合,这样上涨反而成为及时出货的好机会。
每日通达信公式解答:
编写条件:
大盘30日线的公式。
编写方法:
ma("SH999999$C",30);
评论(0)