当前位置: 网站首页 > 股票软件公式 > 通达信公式 > 文章 当前位置: 通达信公式 > 文章

通达信源码:NXZ-MACD,狂赚主图指标,牛起爆动

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

1、NXZ-MACD

牛股集中营指标源码+战法图解及macd实战优化
恭喜有幸看到本文的朋友, 你可以一周提升至少5年的操盘功力了 .
大道至简,大象无形!( 顶尖财经 股民学院: http://www.58188.com )
仔细品味后, 会发现 非常难得且实用的!
小人的 图标---- 代表 macd背离 , 是  提升 买进信心 加分项 

 { NXZ-MACD  MACD优化-背离+金叉,可作为牛股集中营的买点参考  }
DIFF:EMA(CLOSE,12)-EMA(CLOSE,24);
DEA:EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
STICKLINE(MACD>=0,MACD,0,2,0),COLORRED;
STICKLINE(MACD>=0 AND MACD<REF(MACD,1),MACD,0,2,0),COLORYELLOW;
STICKLINE(MACD<0,MACD,0,2,0),COLORGREEN;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,2,0),COLORWHITE;
IF(DIFF<0,DIFF,0),COLORRED,LINETHICK1;
IF(DIFF<0,0,DIFF),COLORYELLOW,LINETHICK1;
IF(DIFF<DEA,DIFF,DEA),COLOR00FF00,LINETHICK1;
IF(DIFF>DEA,DEA,DEA),COLORWHITE,LINETHICK1;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,-0.06,-0.18,3,0),COLORYELLOW;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,-0.06,-0.18,3,0),COLORFF00FF;
DRAWICON(二次金叉,-0.05,4) ;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,0,0.13,3,0),COLOR00FF00;
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK1;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK1;
PHD:0,COLORWHITE;
 



2、狂赚主图指标

{狂赚指标}
MA3:MA(C,3),COLORF4E202,LINETHICK1;
MA13:MA(C,13),COLORRED;
平衡:EMA(C,30),CIRCLEDOT,COLORWHITE;
上轨:平衡 + 2*STD(C,30),LINETHICK2,COLORFF00FF;
下轨:平衡 - 2*STD(C,30),LINETHICK2,COLOR00FF00;
STICKLINE((CLOSE >平衡),平衡,平衡,1,0),LINETHICK6,COLOR0000FF;
STICKLINE((平衡 > CLOSE),平衡,平衡,1,0),LINETHICK6,COLORFF6600;
STICKLINE(CLOSE>OPEN,OPEN,LOW,0,1 ),COLOR0000FF; 
STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0 ,1 ),COLOR0000FF;
STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0 ,1 ),COLOR00FF00; 
STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0 ,1 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLORFF7700;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2.8,0 ),COLORFF9900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2.7,0 ),COLORFFBB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2.6,0 ),COLORFFCC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2.4,0 ),COLORFFDD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLORFFEE00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLORFFFF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR000055;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.8,0) ,COLOR000066;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.6,0) ,COLOR000077;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.4,0) ,COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.2,0) ,COLOR0000BB;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.6,0) ,COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000FF;
VAR9Q:=C=HHV(C,4) AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF(C,3) OR
REF(C,1)=HHV(C,4)) AND (CLOSE>=REF(C,2) OR REF(C,2)=HHV(C,4)) AND 
REF(C,3)=LLV(C,4) AND (C>=REF(C,1) OR REF(C,3)=HHV(C,4)) AND 
C>=REF(C,1) AND C>=REF(C,2);
红持:=VAR9Q,COLOR0000FF;
     STICKLINE(VAR9Q,C,(O+C)/2,3,0),COLOR000055;
    { STICKLINE(VAR9Q,C,(O+C)/2,6,0),COLOR000066;
     STICKLINE(VAR9Q,C,(O+C)/2,5,0),COLOR000077;
     STICKLINE(VAR9Q,C,(O+C)/2,4,0),COLOR000099;
     STICKLINE(VAR9Q,C,(O+C)/2,3,0),COLOR0000BB;
     STICKLINE(VAR9Q,C,(O+C)/2,2,0),COLOR0000DD;
     STICKLINE(VAR9Q,C,(O+C)/2,1,0),COLOR0000FF;}
VARAQ:=C=HHV(C,4) AND REF(C,1)=LLV(C,4);
粉变:=VARAQ,COLORFF99FF;
     STICKLINE(VARAQ,C,(O+C)/2,3,0),COLORFF11FF;
     {STICKLINE(VARAQ,C,(O+C)/2,6,0),COLORFF33FF;
     STICKLINE(VARAQ,C,(O+C)/2,5,0),COLORFF55FF;
     STICKLINE(VARAQ,C,(O+C)/2,4,0),COLORFF77FF;
     STICKLINE(VARAQ,C,(O+C)/2,3,0),COLORFF99FF;
     STICKLINE(VARAQ,C,(O+C)/2,2,0),COLORFFBBFF;
     STICKLINE(VARAQ,C,(O+C)/2,1,0),COLORFFDDFF;}
VARBQ:=C=LLV(C,4) AND (REF(C,1)<REF(C,2) OR REF(C,1)<REF(C,3)) 
OR REF(C,1)=LLV(C,4) AND C<REF(C,2) OR REF(C,2)=LLV(C,4) AND
( REF(C,1)>HHV(C,4)  OR  REF(C,1)<HHV(C,4)) AND C<REF(C,1) OR
REF(C,3)=LLV(C,4) AND C<REF(C,1) AND C<REF(C,2);
灰跌:=VARBQ,COLOR888888;
     STICKLINE(VARBQ,C,(O+C)/2,3,0),COLOR333333;
    { STICKLINE(VARBQ,C,(O+C)/2,6,0),COLOR555555;
     STICKLINE(VARBQ,C,(O+C)/2,5,0),COLOR777777;
     STICKLINE(VARBQ,C,(O+C)/2,4,0),COLOR999999;
     STICKLINE(VARBQ,C,(O+C)/2,3,0),COLORBBBBBB;
     STICKLINE(VARBQ,C,(O+C)/2,2,0),COLORDDDDDD;
     STICKLINE(VARBQ,C,(O+C)/2,1,0),COLORFFFFFF;}
VARCQ:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);
绿买:=VARCQ,COLOR00FF00;
     STICKLINE(VARCQ,O,(O+C)/2,3,0),COLOR003300;
    { STICKLINE(VARCQ,O,(O+C)/2,6,0),COLOR005500;
     STICKLINE(VARCQ,O,(O+C)/2,5,0),COLOR007700;
     STICKLINE(VARCQ,O,(O+C)/2,4,0),COLOR009900;
     STICKLINE(VARCQ,O,(O+C)/2,3,0),COLOR00BB00;
     STICKLINE(VARCQ,O,(O+C)/2,2,0),COLOR00DD00;
     STICKLINE(VARCQ,O,(O+C)/2,1,0),COLOR00FF00;}
VARDQ:=REF(C,1)=HHV(C,4) AND C<REF(C,2) OR (REF(C,2)=HHV(C,4) AND REF(C,1)>REF(C,3) OR REF(C,3)=HHV(C,4) AND REF(C,1)>REF(C,2)) AND REF(C,2)>=REF(C,4) AND C<REF(C,1);
蓝抛:=VARDQ,COLORFF9900;
STICKLINE(VARDQ,O,(O+C)/2,3,0),COLORFF1100;
{STICKLINE(VARDQ,O,(O+C)/2,6,0),COLORFF3300;
STICKLINE(VARDQ,O,(O+C)/2,5,0),COLORFF5500;
STICKLINE(VARDQ,O,(O+C)/2,4,0),COLORFF7700;
STICKLINE(VARDQ,O,(O+C)/2,3,0),COLORFF9900;
STICKLINE(VARDQ,O,(O+C)/2,2,0),COLORFFBB00;
STICKLINE(VARDQ,O,(O+C)/2,1,0),COLORFFDD00;}
Y1:=REF(EMA(DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9),3),1);
VAR1W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
VAR2W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
VAR3W:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
VAR3P:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);
STICKLINE(VAR3P>90,L,L*0.92,1,0),COLORFF00FF;
DRAWTEXT(VAR3P>90,LOW*0.92,'追涨'),COLORFF00FF;
SS:=MA((LOW+HIGH+CLOSE)/3,5)>REF(MA((LOW+HIGH+CLOSE)/3,5),1) AND REF(MA((LOW+HIGH+CLOSE)/3,5),1)<REF(MA((LOW+HIGH+CLOSE)/3,5),2);
SC:=L<HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND H>HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND C>REF(C,1) AND C>O;
MR:=SC AND COUNT(SS,2);
买:=MR AND NOT(REF(MR,1)),COLORYELLOW;
STICKLINE(买,L,L*0.95,1,0),COLORRED;
DRAWTEXT(买,L*0.95, '必涨'),COLORRED;
多方:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)
-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)
-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)
,3,1),2,1);
STICKLINE(CROSS(78.89,多方),H+1.5,H,1,0),COLOR00FF00;
DRAWTEXT(CROSS(78.89,多方),H+1.5,'(顶)'),COLOR00FF00;
VAR1:=(CLOSE-LLV(LOW,24))/(HHV(HIGH,24)-LLV(LOW,24))*1;
VAR2:=SMA(VAR1,3,1)*100;
趋势线:=SMA((SMA(VAR2,3,1)*VAR1),3,1)*1;
VAR9:=CROSS(趋势线,(SMA(VAR2,3,1)*VAR1)) AND (SMA(VAR2,3,1)*VAR1)>8;
DRAWTEXT(VAR9 AND COUNT(VAR9,1)=1,H+0.6,'逃'), LINETHICK2,COLORYELLOW;
DRAWICON(FILTER(CROSS(-"WR.WR1"(14,14),(0 - 81)),10),L-0.2,1);
DRAWICON(FILTER(CROSS((0 -19),-"WR.WR1"(14,14)),10),H,2);
AAX:=AMOUNT/VOL;
BBX:=L<AAX*0.9;
CCX:=(C-REF(C,1))/REF(C,1)*100>1.2;
DDX:=L<MA(C,5)*0.921;
EEX:=VOL<MA(V,5)*1.5;
FFX:BBX AND CCX AND DDX AND EEX,LINETHICK0;
DRAWTEXT(FFX,L*0.99,'老鼠仓'),COLOR00FF00;
STICKLINE(FFX,H,L,0.5,0),COLOR00FF00;
STICKLINE(FFX,O,C,3,1),LINETHICK2,COLOR00FF00; 




3、牛起爆动

牛起爆动,原创公式( 顶尖财经 股民学院: http://www.58188.com )

牛起爆动:包含主图+副图  无未来通达信专用
 

{牛起}
FF:=EMA(C,12)-EMA(C,26);
FF1:=EMA(FF,9);
QQ:=(FF-FF1)*2;
R1:=MA(C,233);
A1:=V/REF(V,1)>=2 AND REF(V,1)/REF(V,2)>=2 AND C>0 AND C>REF(C,1) AND QQ/REF(QQ,1)>1.5 AND C>R1,COLORMAGENTA;
DRAWTEXT(A1,8,'牛起'),COLORRED;
STICKLINE(A1, 0,3, 7,-1),COLORLIMAGENTA;
STICKLINE(A1, 1.5,3, 3, 0),COLORYELLOW;
STICKLINE(A1, 0,1.5, 3, 0),COLORRED;
STICKLINE(A1, 3,10,0, -1),COLORLIMAGENTA;
 
{牛起主图}
{行业 板块 地区 概念}
DRAWTEXT_FIX(ISLASTBAR,0.5,0.92,0,HYBLOCK),COLORYELLOW;{在屏幕左上角显示所属行业板块}
DRAWTEXT_FIX(ISLASTBAR,0.55,0.92,0,DYBLOCK),COLORYELLOW;{在屏幕左上角显示所属地域板块}
DRAWTEXT_FIX(ISLASTBAR,0.6,0.92,0,GNBLOCK),COLORYELLOW;{在屏幕左上角显示所属概念板块}
DRAWTEXT_FIX(ISLASTBAR,0.5,0.97,0,FGBLOCK),COLORMAGENTA;{在屏幕左上角显示所属风格}
短A:MA(C,3),COLORYELLOW;
中期B:MA(C,21),COLORMAGENTA,LINETHICK2;
涨幅:=(C-REF(C,1))/REF(C,1)*100,NODRAW;
RC1:=REF(C,1);
ZT:=C/REF(C,1)>1.099 AND H>L;
CS:=IF(C>=1,10000,100000);
C涨停10:=1.10*RC1-49/CS;{考虑到4舍5入}
C涨停5 :=1.05*RC1-49/CS;
C跌停10:=0.90*RC1+51/CS;
C跌停5 :=0.95*RC1+51/CS;
ST:=NAMELIKE('S') OR NAMELIKE('*S');
涨停:= IF(ST, C>=C涨停5, C>=C涨停10);
跌停:= IF(ST, C<=C跌停5, C<=C跌停10);
盘中涨停:=IF(ST, H>=C涨停5, H>=C涨停10),;
盘中跌停:=IF(ST, L<=C跌停5, L<=C跌停10);
STICKLINE(盘中涨停,H,MAX(C,O),0,0),COLORYELLOW;{涨停后回落}
STICKLINE(盘中跌停,L,MIN(C,O),0,0),COLORLICYAN;{跌停后回升};
STICKLINE(涨停,O,C,1,0),COLORYELLOW;
STICKLINE(跌停,O,C,1,0),COLORLICYAN;

上一篇:通达信源码:打板法典看盘主图,妖股指标,降龙伏魔之剑

下一篇:通达信源码:黄柱买入,轻风强势,背离王