通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
BF:=MA(CLOSE,20);
上:BF+2*STD(CLOSE,20),NODRAW;
下:BF-2*STD(CLOSE,20),NODRAW;
DRAWBAND(上,RGB(85,20,30),BF,RGB(0,60,5));
DRAWBAND(BF,RGB(0,60,5),下,RGB(0,60,5));
PP:=CROSS(C,MA(C,4));
EE:=STICKLINE(PPANDMA(C,20) =REF(MA(C,20),1)AND
C O,H,L,1,0),COLORFF00FF,LINETHICK2;{20日走强买点};
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
AA:=MACD REF(MACD,1)ANDREF(MACD,1) REF(MACD,2)ANDREF(MACD,2) REF(MACD,3)AND
MACD
CT:=MACD REF(MACD,1)ANDREF(MACD,1) REF(MACD,2)ANDREF(MACD,2) REF(MACD,3)ANDREF
(MACD,3) REF(MACD,4)ANDMACD
PPO:=MA(C,4) MA(C,24)ANDPPANDMA(C,24) =REF(MA(C,24),1);
VIP:=AAANDPPOORCTANDPPO;
DRAWICON(VIP=1,LOW*0.95,9),COLORRED;
DRAWKLINE(H,O,L,C);
MA5:MA(CLOSE,5),COLORWHITE;
MA10:MA(CLOSE,10),COLORRED,LINETHICK2;
MA20:MA(CLOSE,20),COLORBLUE;
MA62:=MA(CLOSE,62),POINTDOT,COLORBLUE;
MA133:=MA(CLOSE,133),POINTDOT,COLORGREEN;
{涨幅}
日:((C-REF(C,1))/REF(C,1))*100,COLORRED,NODRAW;
周:((C-REF(C,5))/REF(C,5))*100,COLORLIRED,NODRAW;
月:((C-REF(C,20))/REF(C,20))*100,COLORRED,NODRAW;
季:((C-REF(C,60))/REF(C,60))*100,COLORYELLOW,NODRAW;
STICKLINE(日 =9.95,O,C,2,0),COLORRED,LINETHICK2;
IF(MA10 =MA5,MA10,DRAWNULL),COLORGREEN,LINETHICK2;
IF(MA5 =MA10,MA10,DRAWNULL),COLORGREEN,LINETHICK2;
买线YGB:=EMA(C,2);
卖线YGB:=EMA(SLOPE(C,21)*20+C,42);
指导线:=EMA((EMA(CLOSE,4)+EMA(CLOSE,6)+EMA(CLOSE,12)+EMA(CLOSE,24))/4,2);
界:=MA(CLOSE,27);
B买:IF(CROSS(指导线,界)ORCROSS(买线YGB,卖线YGB),C,DRAWNULL),COLORMAGENTA,NODRAW;
持仓:IF(买线YGB =卖线YGB,C,DRAWNULL),COLORRED,NODRAW;
S卖:IF(CROSS(界,指导线)ORCROSS(卖线YGB,买线YGB),C,DRAWNULL),COLORLIGRAY,NODRAW;
空仓:IF(买线YGB 卖线YGB,C,DRAWNULL),COLORGREEN,NODRAW;
N1:=7;
LC:=REF(CLOSE,1);
X:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100,COLORYELLOW,LINETHICK1;
魔鬼:=DRAWLINE(X =HHV(X,N1),X,X =LLV(X,N1),X,1),COLOR00FF00;
魔王:=DRAWLINE(X =HHV(X,N1),X,X =LLV(X,N1),1,X),COLOR00FF00;
TJ0:=X=魔王;
TJ1:=X=魔鬼;
TJ2:=X REF(X,1);
TJ3:=X REF(1,X);
JRS1:=DRAWICON(TJ1ANDTJ2,X,1);
JRS2:=DRAWICON(TJ0ANDTJ3,X,2);
DRAWICON(FILTER(JRS1 0,1),L*0.97,1);
DRAWICON(FILTER(JRS2 0,1),H*1.02,15);
VAR4:=(LOW+HIGH+CLOSE)/3;
操作:=MA(VAR4,5);
拉升:=HHV(操作,13),POINTDOT;
压力:=HHV(操作,60),POINTDOT;
买卖:=LLV(操作,13),POINTDOT;
支撑:=LLV(LOW,60)*1.02,POINTDOT;
顶部:=HHV(HIGH,60)*0.98,POINTDOT,COLORCYAN;
r1:=ZDMR[-1];
r2:=BDMR[-1];
r3:=-ZDMC[-1];
r4:=-BDMC[-1];
a:=(r1+r2);
b:=(r3+r4);
d:=a+b;
e:=a-b;
STICKLINE(C REF(C,1),0,e,8,1),colorred;
STICKLINE(C =REF(C,1),0,e,8,1),colorfff000;
STICKLINE(d 0,-d,0,8,0),color00ff00;
STICKLINE(d 0,d,0,8,0),color00ffff;
STICKLINE(C,a,0,4,0),coloraa00bb;
STICKLINE(C,a,0,3,0),colorcc22bb;
STICKLINE(C,a,0,2,0),colordd33bb;
STICKLINE(C,a,0,1,0),coloree44bb;
STICKLINE(C,a,r1,4,0),color2266aa;
STICKLINE(C,a,r1,3,0),color3377cc;
STICKLINE(C,a,r1,2,0),color4488dd;
STICKLINE(C,a,r1,1,0),color9955ee;
STICKLINE(C,e,a,4,0),coloraaaaaa;
STICKLINE(C,e,a,3,0),colorbbbbbb;
STICKLINE(C,e,a,2,0),colorcccccc;
STICKLINE(C,e,a,1,0),colordddddd;
STICKLINE(C,e,a-r4,4,0),Colorff6600;
STICKLINE(C,e,a-r4,3,0),Colorff7722;
STICKLINE(C,e,a-r4,2,0),Colorff8833;
STICKLINE(C,e,a-r4,1,0),Colorff9955;
mv5:MA(e,5);
mv10:MA(e,10);
mv35:MA(e,35);
mv135:MA(e,135);
a3:=SUM(a,n)/1000000;
b3:=SUM(b,n)/1000000;
VOL1=SUM(VOL,n)/1000000;
y:=a3-b3;
z:=y/VOL1*100;
TOSTRING(n,0)+ 天买入 +TOSTRING(a3,1)+ 万手,卖出 +TOSTRING(b3,1)+ 万手.净买入 +TOSTRING(y,1)+ 万手.占总成交 +TOSTRING(z,1)+ %.
TOSTRING(n1,0)+ 天机构买入 +TOSTRING(a3,1)+ 万手,卖出 +TOSTRING(b3,1)+ 万手.净买入 +TOSTRING(y,1)+ 万手.占总成交 +TOSTRING(z,1)+ %.
多空生命线:EMA(CLOSE,55),colorred, CIRCLEDOT;
Var1:=(HIGH+LOW+OPEN+CLOSE)/4;
生命线: MA(3*Var1-2*SMA(Var1,2,1),12),,;
Var2:=IF(Var1 生命线,Var1,生命线);
Var3:=2*EMA(LLV(Var1,7),10)-Var1;
多空线: 3*Var3-2*SMA(Var3,10,1),colorgreen;
A1:=REF(CLOSE,1) REF(OPEN,2);
A2:=CLOSE OPEN ;
A3:=REF(HIGH,1) REF(LOW,2) ;
Aa4:=HIGH REF(LOW,1);
DRAWTEXT(TROUGHBARS(3,15,1)=0 AND HIGH LOW+0.01 AND A1 AND A2=0 AND A3=0 AND Aa4=0,(LOW - 0.3), 震仓 ),color0000FF;
Va1:=EMA(CLOSE,8);
Va2:=EMA(Va1,20);
Va3:=CROSS(Va1,Va2);
Va4:=VOL/SUM(VOL,13);
Va5:=DMA(CLOSE,Va4);
Va6:=Va1 MA(CLOSE,120);
A3a:=Va3 AND Va6 AND (CLOSE-Va5)/Va5*100/2.5
A4a:=CROSS( (CLOSE-Va5)/Va5*100/2.5,0 ) AND (CLOSE-Va5)/Va5*100/2.5 1.5 ;
DRAWTEXT(A4a 0 OR A3a 0,L-0.3, 追涨 ),colorwhite;
STICKLINE(A4a 0 OR A3a 0,(LOW - 0.2),(LOW -0.5),4,0),colorwhite;
VV1:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
VV2:=SMA(VV1,7,1);
VV3:=SMA(VV2,12,1);
VV4:=CROSS(VV3,VV2);
VV5:=VV3 88 OR VV2
VV6:=VV4 AND VV5;
STICKLINE(VV6 OR CROSS(REF(VV2,1),VV2) AND VV2 95,(HIGH + 0.5),(HIGH +1.2),8,0),COLOR00ff00;
DRAWTEXT(VV6 OR CROSS(REF(VV2,1),VV2) AND VV2 95,H+1.2, ),color00ff00;
VB1:=LLV(LOW,5)=LLV(LOW,45) AND CLOSE =OPEN*1.04;
VB2:=CLOSE (REF(HIGH,1)+REF(LOW,1))/2;
VB3:=VB1 AND VB2;
DRAWTEXT(VB3,LOW, 买入点 ), colorwhite;
DRAWTEXT(CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),HIGH*1.02, 落袋为安 ), colorwhite;
V2:=REF(CLOSE,1);
V3:=SMA(MAX(CLOSE-V2,0),6,1)/SMA(ABS(CLOSE-V2),6,1)*100;
DRAWTEXT(CROSS(84,V3),HIGH*1.03, 见顶 ), coloryellow;
V4:=SMA(MAX(CLOSE-V2,0),12,1)/SMA(ABS(CLOSE-V2),12,1)*100;
DRAWTEXT(CROSS(V4,20),LOW*0.98, 见底 ),colorred;
a:=(3*C+L+O+H)/6;
x1:=(20*a+19*REF(a,1)+18*REF(a,2)+17*REF(a,3)+16*REF(a,4)+15*REF(a,5)+14*REF(a,6)
+13*REF(a,7)+12*REF(a,8)+11*REF(a,9)+10*REF(a,10)+9*REF(a,11)+8*REF(a,12)
+7*REF(a,13)+6*REF(a,14)+5*REF(a,15)+4*REF(a,16)+3*REF(a,17)+2*REF(a,18)+
REF(a,20))/210;
x2:=EMA(x1,6);
x3:=EMA(x2,5);
STICKLINE(x2 =x3,H,L,0,1),COLOR0000FF;
STICKLINE(x2 =x3 AND C =O,O,C,5,0),COLOR0000FF;
STICKLINE(x2 =x3 AND C O,O,C,5,1),COLOR0000FF;
STICKLINE(x2 x3,H,L,1,0),COLOR00BB00;
STICKLINE(x2 x3 AND C O,O,C,5,0),COLOR00BB00;
STICKLINE(x2=O,O,C,5,1),COLOR00BB00;
STICKLINE(C=x3,H,L,0,1),COLORFFBB00;
STICKLINE(C=x3 AND C =O,O,C,5,0),COLORFFBB00;
STICKLINE(C=x3 AND C O,O,C,5,1),COLORFFBB00;
STICKLINE((C =x3 AND x2 x3),H,L,0,1),COLORFF00FF;
STICKLINE((C =x3 AND x2=O,O,C,5,0),COLORFF00FF;
STICKLINE((C =x3 AND x2 x3) AND C O,O,C,5,1),COLORFF00FF;
MMM:=-MA((DYNAINFO(23)-DYNAINFO(22)/V)*(DYNAINFO(7)-O),1);
MA3:=MA(MMM,3);
MA5:MA(MMM,5);
MA10:SMA(MMM,10,1);
MA20:SMA(MMM,20,1);
MA30:SMA(MMM,30,1);
MA60:SMA(MMM,60,1);
MA120:=SMA(MMM,120,1);
公式解读:
公式解读:
指标公式知识:用周选出
周k线是指以周一的开盘价,周五的收盘价,全周最高价和全周最低价来画的k线图。月k线则以一个月的第一个交易日的开盘价,最后一个交易日的收盘价和全月最高价与全月最低价来画的K线图,同理可以推得年K线定义。周K线,月K线常用于研判中期行情。对于操作者来说,众多分析软件提供的5分钟K线、15分钟K线、30分钟K线和60分钟K线也具有重要的参考价值
对于中、投资者而言,周k线的意义非常重大。因为周k线反映的是中级大行情,周期比较长,因此周k线的准确度要远远高于日k线,而日k线则比较容易形成“技术骗线”。因此,通常在买入点,一般先考虑周k线的状态是否安全,再考虑日k线的价量关系上是否良好、状态是否安全,最后才以盘面变化择低而入。反之亦然,即所谓“周线,日线买股”。周k线不止在中长线投资者中广泛运用,在短线实战中也可灵活运用。
而多数投资者平时都习惯了较为重视对日K线方面的分析,但在周K线方面尤其是在短线的操作中却常常并不十分留意。实际上,日K线是对一个交易日的记录,由于变化太快极易出现技术性陷阱,而周K线反映的是一周的交易状况,短期K线上出现的较大波动在周K线上一般都会被过滤或烫平。因此,如果能够将日K线的分析和周K线的分析相结合则对操作指导的效果会更好。
在实际操作中,对于买卖时机的把握首先要分析周K线是否安全,然后再分析日K线的组合以及量价关系配合是否合理,最后才能在适当的时机选择操作方向。一般而言,将二者结合起来指导实际操作可以避免很多失误。如果仅仅依靠日K线的组合来判断短线的操作方向难免会面临较多的不确定性风险,同时也容易形成追涨杀跌的习惯。在强势的行情中过早抛掉手中的获利,而在弱市行情中又由于反弹力度时强时弱难以掌握,又极为容易跟进马上就被套。
从表面来看,周K线与日K线的形态是相同的,但其实由于二者所覆盖的交易周期上的差异所透露出的操作方向有时会完全不同,甚至会给出相反的买卖信号。
而牛股的培育,往往需要较长的时间,周K线图能够过滤掉一些短线的杂波,可以可清晰地看清个股的并发现的运作痕迹。
假如在周K线图上出现这样的技术特征,则成为牛股的可能性比较大:
公式解读:
编写条件:
今日获利比例数值是60日内最高的选股公式。
编写方法:
AA:=WINNER(C)*100;
XG:HHV(AA,60);