通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信龙虎榜资金指标公式
LC:=REF(CLOSE,1);
强度:SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100,linethick1,colorwhite;
Var1:=IF(DATE<1301231ANDDATE>900101,1,0);
Var2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
Var3:=SMA(Var2,3,1);
乾A:SMA(Var3,3,1)*Var1/2+40,linethick1,colormagenta;
乾B:SMA(Var3,5,1)*Var1/2+39,linethick1,coloryellow;
Var4:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100;
坤A:SMA(Var4,3,1)*Var1/2,linethick1;
坤B:SMA(Var4,5,1)*Var1/2,linethick1,colorcyan;
Var5:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;
做空量能:SMA(Var5,2,1),color66ff00,linethick2;
Var6:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
A0:=(2*C+H+L)/4;
均线:=MA(A0,3)>REF(MA(A0,3),1);
A1:=(CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100;
A2:=EMA(WINNER(C)*100,5);
A3:=MA(SMA(C-REF(C,1),3,1)/SMA(H-REF(C,1),3,1),3)*100;
K:MA(3*SMA(A1,6,1)-2*SMA(SMA(A1,5,1),5,1),3),LINETHICK1,COLORWHITE;
D:MA(K,3),COLORYELLOW,LINETHICK1;
J:3*K-2*D,COLORYELLOW,LINETHICK1;
A4:=SMA(MAX(C-REF(C,2),0),6,1)/SMA(ABS(C-REF(C,2)),6,1)*100;
A5:=MA(3*SMA((C-LLV(L,21))/(HHV(H,21)-LLV(L,21))*100,5,1)-2*SMA(SMA((C-LLV(L,21))/(HHV(H,21)-LLV(L,21))*100,5,1),3,1),3);
低吸:IF(CROSS(A4,14)ORA5>REF(A5,1)ANDCROSS(K,A2)ANDK<40,10,0),COLORYELLOW;
IF(A2>80ANDCROSS(95,K),85,100);
入虎穴:K<5ANDLLV(C,3)/HHV(C,20)<0.8,COLORYELLOW;
STICKLINE(入虎穴,0,30,3,0),COLORYELLOW;
A6:=COUNT(CROSS(K,A2),2)=1ANDCROSS(K,A5)ANDA5/REF(A5,1)>0.9ANDK<50;
A7:=CROSS(K,D)ANDD<10ORCROSS(K,D)ANDCROSS(K,A5)ANDD<18;
DRAWTEXT(FILTER((A6ORA7)ANDK>REF(K,1),5)AND均线,D,'金叉');
DRAWTEXT(CROSS(D,K)ANDCROSS(A5,K)ANDD>85,D,'死叉');
DRAWTEXT(FILTER(K>REF(K,1)AND(CROSS(K,10)ORCROSS(K,A2))ANDCOUNT(A4<14,3)>=1,3),15,'抱虎仔');
无限风光:A2>85ANDK>85ORA2>90ORK>90,LINETHICK0,COLORLIGRAY;
STICKLINE(无限风光,MAX(A2,K),100,5,1),COLORLIGRAY;
DRAWICON(CROSS(A3,-300)ANDK<10,5,1);
A8:=BARSLAST(REF(CROSS(K,D),1));
二金:=(A8<15ANDD<50ANDK>REF(K,A8+1)ANDCROSS(K,D)ANDA5<60);
DRAWTEXT(二金AND均线,K,'二金'),COLORYELLOW;
A9:=LLV(C,2)<REF(LLV(C,15),2);
DRAWTEXT(二金ANDA9,K,'底背离'),COLORRED;
DRAWTEXT(LONGCROSS(J,K,7)ANDCROSS(J,A2)ANDA2<30ANDA2>REF(A2,1),K,'穿三线'),COLORMAGENTA;
DRAWTEXT(CROSS(84,A4)ANDCROSS(K,A4),90,'虎口'),COLOR00FF00;
A10:=MA((A0-MA(A0,13))/(0.15*AVEDEV(A0,13)),3);
DRAWICON(CROSS(A10,-15)ANDJ>REF(J,1),5,1);
DRAWICON(CROSS(20,A10),100,2);
IF(K<REF(K,1),K,DRAWNULL),COLORGREEN,LINETHICK1;
IF(D<REF(D,1),D,DRAWNULL),COLORGREEN,LINETHICK1;
IF(J<REF(J,1),J,DRAWNULL),COLORFFFF00,LINETHICK1;
IF(K>REF(K,1),K,DRAWNULL),COLORRED,LINETHICK1;
IF(D>REF(D,1),D,DRAWNULL),COLORRED,LINETHICK1;
IF(J>REF(J,1),J,DRAWNULL),COLORFF00FF,LINETHICK1;
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);
DRAWBAND(龙D,RGB(0,104,154),龙,RGB(255,0,0));
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;
{DRAWTEXT(WZ=1,50,'【选准股票,认定指标,信号出现,坚决执行,波段操作,必有收益】'),COLORYELLOW;}
龙腾四海:100-100*(HHV(HIGH,5*8)-CLOSE)/(HHV(HIGH,5*8)-LLV(LOW,5*8)),ColorFFFFFF,LINETHICK1;
海面:20,LINETHICK1,colorgreen;
海天分界线:50,LINETHICK1,coloryellow;
天际:80,LINETHICK1,colorred;
RSV1:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*60;
K1:=SMA(RSV1,5,1);
D1:=SMA(K1,5,1);
J1:=3*K1-2*D1;
AA1:=EMA(J1,5);
AA2:=REF(AA1,1);
STICKLINE(AA1>AA2,AA1,AA2,9,0),COLOR0055AA;
STICKLINE(AA1>AA2,AA1,AA2,5,0),COLOR0077CC;
STICKLINE(AA1>AA2,AA1,AA2,3,0),COLOR0099DD;
STICKLINE(AA1>AA2,AA1,AA2,1,0),colorwhite;
STICKLINE(AA1<=AA2,AA1,AA2,9,0),COLOR006600;
STICKLINE(AA1<=AA2,AA1,AA2,5,0),COLOR009900;
STICKLINE(AA1<=AA2,AA1,AA2,3,0),COLOR00BB00;
STICKLINE(AA1<=AA2,AA1,AA2,1,0),colorwhite;
RSV2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K2:=SMA(RSV2,3,1);
D2:=SMA(K2,3,1);
J2:=3*K2-2*D2;
BB1:=EMA(J2,5);
BB2:=REF(BB1,1);
STICKLINE(BB1>BB2,BB1,BB2,8,0),COLOR000045;
DRAWTEXT_FIX(1,0.3,1,0,'★【选准股票,认定指标,信号出现,坚决执行,波段操作,必有收益】★')COLORYELLOW;
指标公式知识:
双飞乌鸦与三只乌鸦k线组合形态
双飞乌鸦和乌鸦挂树梢出现在k线组合中,有见顶回落向淡的意义。作为典型见顶回落的K线组合,双飞乌鸦与三只乌鸦挂树梢具有极强的转势意义。
双飞乌鸦出现在上升趋势中,是由两根阴线构成的转向组合。其技术特征:1、第一根阴线的实体部分与上一根K线形成缺口,构成起飞的形状,只可惜后继无力,出现低收的情形;2、第二根阴线的实体部分较长,较为理想的是第二根阴线再次高于上日开盘价开出,然后低收,形成类似于穿头破脚的图形。出现双飞乌鸦,表示在上升趋势中连续两日高开,但未能贯彻始终,全部以低价收市,构成两只阴线,使多头对后市产生疑虑,开始获利了结,从而造成向下调整的压力。作为见顶回落的组合,双飞乌鸦一旦出现,可先获利了结或止损出局,其较好的获利点与止损点为双飞乌鸦的第二根阴线形成的临收盘前,或出现之后一两天之内的小阴小阳时。
从图形上看,双飞乌鸦与技巧篇中的多头炮之阳后两阴阳有类似之处,中间都可能包括二根阴线,但两者差别仍较大:一是双飞乌鸦对两根阴线前后位置要求甚严,而阳后两阴阳则没有什么大的要求;二是阳后两阴阳中的两根阴线前后皆出现了两根强而有力的阳线,而双飞乌鸦之后往往会出现持续的阴跌,如在形成双飞乌鸦之后,第三日虽出现缩量小阳,但这是下跌抵抗性,绝非阳后两阴阳中强有力的中或大阳。
实战中双飞乌鸦的图形较少出现,三只乌鸦则较为普及。所谓的三只乌鸦由三只阴线构成,三日的收盘价都向下跌,如果在上升趋势的中后期,或股价已处于相对较高的水平时,三只乌鸦为典型的见顶回落K线组合。其技术特征:1、连续出现三只阴线;2、每日收盘价都向下跌;3、收盘价接近每日的最低价位;4、每日的开盘价都在上根K线的实体部分之内;5、第一根阴线的实体部分,最好低于上日的最高价位。图形上看恰似三只乌鸦坐在将快要枯萎的大树之上,即三只乌鸦挂树梢,后市向淡明显。三只乌鸦挂树梢出现后,可先获利了结或止损出局,其较好的获利点与止损点为三只乌鸦的第三根阴线形成的临收盘前,或出现之后一两天之内的小阴小阳时。
三只乌鸦与上升三部曲的图形相类似,中间都可能包括三只阴线,但后果却是迥然不同,主要区别在于上升三部曲图形中的三根阴线前后皆出现了两根强而有力的阳线。因此实战中要加倍小心,以防“冯京”作“马凉”,招致无谓的损失。当然为了更好地把握两者的区别,不妨在出现三只乌鸦挂树梢时再等.
每日通达信公式解答:
编写条件:
KD指标的D减K大于30的选股公式。
编写方法:
K1:="kdj.K";
D1:="kdJ.D";
XG:D1-K1>30;
评论(0)