通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
高1:=REF(HHV(H,150),3);
低1:=REF(LLV(L,150),3);
H3:=高1-(高1-低1)*0.5;
中轴:REFDATE(H3,DATE),POINTDOT,COLORLIGRAY,LINETHICK3;
B1:=EMA(C,12);
B2:=EMA(C,26);
B3:=B1-B2;
WDIF:=EMA(EMA(EMA(C,3),3),3)+B3;
WDEA:=EMA(WDIF,9);
MACD:=2*(WDIF-WDEA);
STICKLINE(MACD 0,中轴,中轴+MACD,0,1),COLORRED;
STICKLINE(MACD 0,中轴,中轴+MACD,0,1),COLORLIBLUE;
STICKLINE(MACD REF(MACD,1)ANDMACD 0,中轴,中轴+MACD,0,0),COLOR00BBFF;
STICKLINE(MACD =REF(MACD,1)ANDMACD 0,中轴,中轴+MACD,0,0),COLOR0011BB;
STICKLINE(MACD REF(MACD,1)ANDMACD 0,中轴,中轴+MACD,0,0),COLORBB11BB;
STICKLINE(MACD =REF(MACD,1)ANDMACD 0,中轴,中轴+MACD,0,0),COLORFFBB11;
乾线:MA(C,3),COLORRED,LINETHICK2;
坤线:XMA(REF(LLV(C,3),2),2),COLOR00FF00,LINETHICK2;
STICKLINE(CLOSE REF(CLOSE,1),HIGH,LOW,0,1),COLORRED;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,3,0),COLOR000055;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,2.7,0),COLOR000077;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,2.1,0),COLOR000099;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,1.5,0),COLOR0000BB;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,0.9,0),COLOR0000DD;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,0.3,0),COLOR0000FF;
STICKLINE(CLOSE=REF(CLOSE,1),HIGH,LOW,0,1),COLORWHITE;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,3,0),COLOR555555;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,2.7,0),COLOR777777;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,2.1,0),COLOR999999;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,1.5,0),COLORBBBBBB;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,0.9,0),COLORDDDDDD;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,0.3,0),COLORFFFFFF;
STICKLINE(CLOSE REF(CLOSE,1),HIGH,LOW,0,1),COLORCYAN;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,3,0),COLOR990000;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,2.7,0),COLORCC0000;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,2.1,0),COLORFF4400;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,1.5,0),COLORFF8800;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,0.9,0),COLORFFCC00;
STICKLINE(CLOSE REF(CLOSE,1),OPEN,CLOSE,0.3,0),COLORCYAN;
DRAWICON(CROSS(ZIG(3,10),REF(ZIG(3,10),1)),LOW*0.98,1);
DRAWICON(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.02,2);
DRAWTEXT(REF(CLOSE,2)/REF(OPEN,2) 0.95AND
REF(C,2) REF(C,3)ANDREF(OPEN,1) REF(CLOSE,2)AND
REF(CLOSE,1) REF(CLOSE,2)AND
REF(CLOSE,1) (REF(CLOSE,2)+REF(OPEN,2))/2AND
CLOSE REF(CLOSE,1)AND
LLV(LOW,13)=REF(LOW,1),LOW*0.96, 上升 ),COLORYELLOW;
DRAWTEXT(REF(CLOSE,2)/REF(OPEN,2) 0.95AND
REF(OPEN,1) REF(CLOSE,2)AND
ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1) 0.03AND
CLOSE/OPEN 1.05ANDCLOSE REF(CLOSE,2),LOW*0.96, 进场 ),COLORYELLOW;
DRAWICON(REF(CLOSE,2)/REF(OPEN,2) 0.95AND
REF(OPEN,1) REF(CLOSE,2)AND
ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1) 0.03AND
CLOSE/OPEN 1.05ANDCLOSE REF(CLOSE,2),C,1);
QC:=REF(CLOSE,1);
{MA10:MA(CLOSE,10);}
RSV:=(((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9)))*100);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
YX:=((CLOSE QC)ANDC O);
KK:=HHV(K,5);
HH:=HHV(D,5);
D1:=REF(D,1);
K1:=REF(K,1);
DRAWTEXT((((D1 30)ANDCROSS(K,D))ANDYX),(LOW*0.96), ←短买! ),COLORYELLOW;
{DRAWTEXT(((HH 70)ANDCROSS(D,K)),(LOW*1.13), ←减仓! ),COLORFF00CC;};
VAR31:=((((HHV((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),4) 0)AND((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2) REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),1)))AND(REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),1) REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),2)))AND(REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),2) REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),3)));
DRAWTEXT(CROSS(MA(C,3),MA(C,9))ANDC =REF(C,1)ANDC O,L*1.00, ←加仓! ),COLORMAGENTA;
AA1:=AMOUNT/V;
BB1:=L AA1*0.9;
CC1:=(C-REF(C,1))/REF(C,1)*100 1.2;
DD1:=L MA(C,5)*0.921;
EE1:=V MA(V,5)*1.5;
FF1:=BB1ANDCC1ANDDD1ANDEE1;
DRAWTEXT(FF1,(LOW*0.97), 老鼠仓 ),COLOR4080FF;
获利:WINNER(CLOSE)*100,NODRAW,COLORRED;
KDJ_K:= KDJ.K (9,3,3);KDJ_D:= KDJ.D (9,3,3);KDJ_J:= KDJ.J (9,3,3);
买1:=CROSS(KDJ_J,0)OR(CROSS(KDJ_J,KDJ_K)ANDKDJ_D 26);
买2:=CROSS( RSI.RSI1 (6,2,2),20)ORCROSS( RSI.RSI1 (6,12,24), RSI.RSI2 (6,12,24));
买3:=CROSS( MACD.DIF , MACD.DEA )ORCROSS( MACD.MACD ,0);
买0:=买1+买2+买3;
买9:=IF(买0 1,买0,0);
底:IF(买9,L*0.9978-0.03,DRAWNULL),POINTDOT,COLOR00FFFF,LINETHICK5;
选股:=FILTER(CROSS( KDJ.K , KDJ.D ) amp; amp;CROSS( MACD.DIF , MACD.DEA ),50);
吸:IF(选股,L*0.988-0.01,DRAWNULL),POINTDOT,COLORFF00FF,LINETHICK7;
DRAWICON(买9 0,L/1.0,9);
MA05:=MA(C,3);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA30:=MA(C,30);
五日乖离率:=(C-MA05)/MA05*100;
BB05:=ATAN((MA05/REF(MA05,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((MA05-REF(MA05,1))/REF(MA05,1),3)*100,3,1);
加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;
IF(BB05 30ANDMA05 REF(MA05,1),MA05,DRAWNULL),LINETHICK2,COLORRED;
BB10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;
IF(BB05 0ANDMA05 REF(MA05,1),MA05,DRAWNULL),LINETHICK2,COLORGREEN;
三拾日乖离率:=(C-MA30)/MA30*100,NODRAW;
VAR1:=(MA20-MA30) REF((MA20-MA30),1)ANDMA20 REF(MA20,1)ANDMA30 REF(MA30,1);
VAR2:=(MA30-MA20) REF((MA30-MA20),1)ANDMA20 REF(MA20,1)ANDMA30 REF(MA30,1);
BB30:=ATAN((MA30/REF(MA30,1)-1)*100)*180/3.1416;
强势狙击:=FILTER(BB30 30ANDBB10 45ANDCROSS(BB05,60),10);
加仓:=FILTER(COUNT(CROSS(BB05,30),5) =1ANDMA05 REF(MA05,1)AND三拾日乖离率 REF(三拾日乖离率,1)ANDMA10 REF(MA10,1)
AND加速度5 REF(加速度5,1)AND速度5 REF(速度5,1),10);
清仓:=FILTER(COUNT(CROSS(30,BB05),5) =1AND(C MA30ORO MA30)ANDMA05 REF(MA05,1)AND三拾日乖离率 REF(三拾日乖离率,1)ANDMA10 REF(MA10,1),10);
DRAWTEXT(加仓,LOW*0.98, ◆加二 ),COLORYELLOW;
JC:=CROSS(0,五日乖离率)AND三拾日乖离率 REF(三拾日乖离率,1)ANDMA10 REF(MA10,1);
减仓:=FILTER(JC,10);
MR:=COUNT(CROSS(五日乖离率,0),3) =1AND三拾日乖离率 REF(三拾日乖离率,1)ANDMA05 REF(MA05,1)AND(C/REF(C,1)-1)*100 5ANDREF(C,1) MA30;
买入:=FILTER(MR,10);
DRAWTEXT(减仓,HIGH*1.02, ◆风险 ),COLORCYAN;
DRAWTEXT(买入,LOW*0.96, ◆买二 ),COLORYELLOW;
DRAWTEXT(清仓,HIGH*1.00, ◆清仓 ),COLORGREEN;
A1:=BARSLAST(REF(CROSS( MACD.DIF , MACD.DEA ),1));
B11:=REF(C,A1+1) CANDREF( MACD.DIF ,A1+1) MACD.DIF ANDCROSS( MACD.DIF , MACD.DEA
DRAWTEXT(B11 0,L-0.02, ★M ),COLOR00FFFF;{MACD底}
A2:=BARSLAST(REF(CROSS( KDJ.K , KDJ.D ),1));
B22:=REF(C,A2+1) CANDREF( KDJ.K ,A2+1) KDJ.K ANDCROSS( KDJ.K , KDJ.D
DRAWTEXT(B22,L-0.10, ◎K ),COLORFF00FF;{KDJ底背离};
安全线:EMA(CLOSE,55),COLORLIGREEN,LINETHICK2;
VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5;
A1:=(EMA(VAR1,3)+EMA(VAR1,6)+EMA(VAR1,12)+EMA(VAR1,24))/4;
A2:=EMA(A1,2);
A3:=EMA(A2,2);
A4:=EMA(A3,2);
A5:=EMA(A4,2);
A6:=EMA(A5,2);
A7:=EMA(A6,2);
A8:EMA(VAR1,2.78)*1.028,COLORMAGENTA;
A9:MA(OPEN,3.2)*1.028,COLORYELLOW,DOTLINE;
A:=(3*C+H+L+O)/6;
XJ:=(A+0.618*REF(A,1)+0.382*REF(A,2)+0.236*REF(A,3)+0.146*REF(A,4))/2.382,COLORMAGENTA;
MAA:=MA(XJ,3),COLORYELLOW,DOTLINE;
PJ:=(10*A+9*REF(A,1)+8*REF(A,2)+7*REF(A,3)+6*REF(A,4)+5*REF(A,5)+4*REF(A,6)+3*REF(A,7)+
2*REF(A,8)+REF(A,9))/55;
A2I:=SUM(IF(C REF(C,1),V*C,0),0);
A3I:=SUM(IF(C REF(C,1),V*C,0),0);
A4I:=SUM(IF(C=REF(C,1),V*C,0),0);
B1万元:=D*DCLOSE/100;
B1差:=B1万元-REF(B1万元,1);
净流入万元:=(A2I-A3I-0.5*A4I),COLOR0088FF,NODRAW;
PM:=MA(净流入万元,1);
PMA:=PM/REF(PM,1) 1;
PMB:=REF(PMA,1) 1ANDPMA;
密码:=(EMA(MA(B1万元,2),2))/100000;
二日比:=密码/REF(密码,1);
选股:PMBAND密码 REF(密码,1)AND二日比 1,COLORWHITE,NODRAW;
均价:=AMOUNT/V/100;
均价2:=MA(均价,3);
均价5:=MA(均价,5);
均价10:=MA(均价,10);
均价30:=MA(均价,30);
:C 均价2AND均价2 REF(均价2,1)ANDREF(均价2,1) REF(均价2,2)AND
REF(均价2,2) REF(均价2,3)AND选股,COLORYELLOW,NODRAW;
选票:REF(MA(C,5) MA(C,10),1)ANDCROSS(C,MA(C,5))ANDCROSS(二日比,1.01),COLORMAGENTA,NODRAW;
高:=REF(HHV(XJ,80),3);
顶点:REFDATE(高,DATE),COLORBROWN,NODRAW;
低:=REF(LLV(XJ,80),3);
低点:REFDATE(低,DATE),COLORGRAY,DOTLINE;
中:(顶点+低点)/2,COLORGRAY,DOTLINE;
流入:=BARSLAST(PM/REF(PM,1) 1);
入:=EMA(EMA(流入,2),2);
入MA:=MA(入,3);
流入强度:(入-入MA),NODRAW;
STICKLINE(流入强度 0,中,中+流入强度/4,0,0),COLORRED;
STICKLINE(流入强度 0,中,中+流入强度/4,0,0),COLORCYAN;
STICKLINE(流入强度 0AND流入强度 REF(流入强度,1),中,中+流入强度/4,0,0),COLORLIRED;
A05:=EMA(PJ,11),COLORWHITE;
XJ金叉:REF(XJ A05,1)ANDCROSS(XJ,MAA),COLORRED,NODRAW;
{低位金叉}
OA:=VOL*C;
OB:=SUM(OA,1)/SUM(VOL,1);
B1:=EMA(OB,17);
资金:=(OB-B1)/OB*100;
FA:=EMA(资金,5)-EMA(资金,34);
AA:=EMA(FA,9);
资低金叉:(CROSS(FA,AA)ANDFA -0.1),COLORWHITE,NODRAW;
DI:=EMA(C,6)-EMA(C,13),;
DE:=EMA(DI,5),;
MACD:=2*(DI-DE),;
OA1:=BARSLAST(REF(CROSS(DI,DE),1));
底背离:=REF(C,OA1+1) CANDDI REF(DI,OA1+1)ANDCROSS(DI,DE);
STICKLINE(底背离,中,中+流入强度/4,0.1,0),COLORLIRED;
DRAWTEXT(底背离,中+流入强度/4, 底背离 ),COLORLIRED;
OA2:=BARSLAST(REF(CROSS(DE,DI),1));
顶背离:=REF(C,OA2+1) CANDREF(DI,OA2+1) DIANDCROSS(DE,DI);
STICKLINE(顶背离,中,中+流入强度/4,0.1,0),COLORLIBLUE;
DRAWTEXT(顶背离,中+流入强度/4, 顶背离 ),COLORCYAN;
DRAWTEXT(CROSS(85,RSI),XJ, 落袋 ),COLORCYAN;
{DRAWTEXT(CROSS(DE,DI)ANDDI 0,中+流入强度/3, 死叉 ),COLORCYAN;}
STICKLINE(资低金叉,低点,中,0,0),COLORWHITE;
DRAWTEXT(资低金叉,低点+0.02, 资金叉 ),COLORWHITE;
STICKLINE(突破=1,C,O,2,0),COLORYELLOW;
STICKLINE(选票=1,C,O,2,0),COLORMAGENTA;
STICKLINE(选股=1,C,O,2,0),COLORWHITE;
LX:=REF(XJ,1);
ZD:=(SMA(MAX(XJ-LX,0),5,1)/SMA(ABS(XJ-LX),5,1))*100;
KX1:=C =OANDZD =50;
KX2:=C OANDZD =50;
KX3:=C =OANDZD 50;
KX4:=C OANDZD 50;
STICKLINE(KX1,A8,A9,1,0),COLOR0000CC;
STICKLINE(KX2,A8,A9,1,0),COLOR008888;
STICKLINE(KX3,A8,A9,1,0),COLORLIRED;
STICKLINE(KX4,A8,A9,1,0),COLORLICYAN,;
R1:IF(A1 REF(A1,1),A1,A1),COLOR008200,LINETHICK1;
Q1:IF(A1 REF(A1,1),A1,DRAWNULL),COLORRED,LINETHICK1;
R2:IF(A2 REF(A2,1),A2,DRAWNULL),COLOR008C00,LINETHICK1;
Q2:IF(A2 REF(A2,1),A2,DRAWNULL),COLOR000085,LINETHICK1;
R3:IF(A3 REF(A3,1),A3,DRAWNULL),COLOR009B00,LINETHICK1;
Q3:IF(A3 REF(A3,1),A3,DRAWNULL),COLOR00006C,LINETHICK1;
R4:IF(A4 REF(A4,1),A4,DRAWNULL),COLOR00BB00,LINETHICK1;
Q4:IF(A4 REF(A4,1),A4,DRAWNULL),COLOR00007D,LINETHICK1;
R5:IF(A5 REF(A5,1),A5,DRAWNULL),COLOR00CC00,LINETHICK1;
Q5:IF(A5 REF(A5,1),A5,DRAWNULL),COLOR00009F,LINETHICK1;
R6:IF(A6 REF(A6,1),A6,DRAWNULL),COLOR00CC00,LINETHICK1;
Q6:IF(A6 REF(A6,1),A6,DRAWNULL),COLOR00009F,LINETHICK1;
R7:IF(A7 REF(A7,1),A7,DRAWNULL),COLOR00CC00,LINETHICK1;
Q7:IF(A7 REF(A7,1),A7,DRAWNULL),COLOR00009F,LINETHICK1;
DRAWTEXT(突破=1,L, 突破 ),COLORYELLOW;
DRAWTEXT(选票=1,C, 选票 ),COLORMAGENTA;
DRAWTEXT(选股=1,A8, 选股 ),COLORWHITE;
DRAWICON(XJ金叉=1,L-0.02,1);
DOU:=((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)))*(100);
DOUDOU:=SMA(DOU,3,1);
:=SMA(DOUDOU,3,1);
人气:=SMA(趋势,3,1);
杀手出击:CROSS(趋势,人气)AND(趋势 34)AND(趋势 50);
EXP1:=EXPMA(C,21);
crOSS(EXP1,L)ANDC EXP1;
牛熊分界点:Dma(MA(CLOSE+REF(CLOSE,5)/CLOSE*0.098,90),vol),LINETHICK2,COLORRED;
MID:MA(CLOSE,20),COLORYELLOW;
UPPER:MID+2*stD(CLOSE,20),COLORRED,DOTLINE;
LOWER:MID-2*STD(CLOSE,20),COLORGREEN,DOTLINE;
AA:=MA((2*CLOSE+HIGH+LOW)/4,5);
通1:=AA*102/100;
通2:=AA*(200-102)/100;
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
上:(1+7/100)*DD,CIRCLEDOT,COLOR0099FF;
下:(1-7/100)*DD,CIRCLEDOT,COLOR0099FF;
中:(上+下)/2,CIRCLEDOT,COLOR0099FF;
DRAWTEXTREL(1,10, ■所属: +BKNAME),COLORGREEN;
MA7:MA(C,7),LINETHICK2;
MA21:MA(C,21),LINETHICK2;
MA50:MA(C,50),LINETHICK2;
牛熊分界点:DMA(MA(CLOSE+REF(CLOSE,5)/CLOSE*0.098,90),VOL),LINETHICK2,COLORRED;
MID:MA(CLOSE,20),COLORYELLOW,LINETHICK1;
UPPER:MID+2*STD(CLOSE,20),COLORRED,DOTLINE,LINETHICK1;
LOWER:MID-2*STD(CLOSE,20),COLORGREEN,DOTLINE,LINETHICK1;
AA:=MA((2*CLOSE+HIGH+LOW)/4,5);
通1:=AA*102/100;
通2:=AA*(200-102)/100;
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
上:(1+7/100)*DD,CIRCLEDOT,COLOR0099FF;
下:(1-7/100)*DD,CIRCLEDOT,COLOR0099FF;
中:(上+下)/2,CIRCLEDOT,COLOR0099FF;
DRAWTEXTREL(1,10, ■所属板块: +BKNAME),COLORGREEN;
跳空十字星中常见的三种情况
在中,十字星是一种比较常见的,比较有代表性的K线形态,能够反映出多种市场信息。下面就来讲一讲跳空十字星中常见的三种情况。
1.出现于低价区
当价格经过长期大幅下挫之后,跳空出现一颗十字星(最好伴随有放大的)。此时往往意味着多空力量的,双方势力从空方占优势演变为双方形成均势,筑底有望完成。如果隔日再放量出现一根大阳线,则多方优势确立,价格将急转直上。
这种十字星的出现意味着接下来的行情最有可能开始大涨。
2.出现于上升的中间位置
行情经过一段时间的大涨但是离之前的历史高点还有一定的距离,此时若出现跳空十字星,并且放量,说明多空力量在这里开始出现分歧,已经有一部分获利盘选择落袋为安,接下来多空博弈将变的激烈,多头会利用这个机会将心理薄弱者趁机洗盘出局,借机低价吸取。
这种十字星的出现意味着接下来的行情最有可能面临着洗盘,但是洗盘完毕价格还有继续攀升的能力。
3出现于高价区
当行情经过长时间的大涨后到达一个比较高的位置。若此时出现十字星,则分析意义与出现于低价区相反,多方势力衰竭,空方将发动反攻的信号。在这个地方出现十字星这表示行情最有可能已经走到顶点,接下来将会开始大跌。
公式解读:
编写条件:
被举牌的选股公式。
编写方法:
XG:INBLOCK( 被举牌