通达信MACD组合主图指标 -MACD_吸拉派落主图(补上源码)

  • 发个通达信MACD组合主图指标 -MACD_吸拉派落主图(补上源码)

  • 相关简介:发个通达信MACD组合主图指标 -MACD_吸拉派落主图(补上源码) 本主图结合坛里多位老师作品 在此先感谢作品老师! 另加自构元索组合而成,自认 为不错,故分享坛友,还附一有 副图指标,成看盘套装,清爽分了 {MACD_吸拉派落主图} DRAWGBK(OC,RGB(48,41,124),RGB(0,0,0),0,'',0); ZF:=STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(DYBLOCK,' '),HYBLOCK),' '),GNBLOCK),' '

  • 文章来源:股海网发布时间:2014-01-26浏览次数:2352收藏:

发个通达信MACD组合主图指标 -MACD_吸拉派落主图(补上源码)

本主图结合坛里多位老师作品
 在此先感谢作品老师!
 另加自构元索组合而成,自认
 为不错,故分享坛友,还附一有
 副图指标,成看盘套装,清爽分了
 
 
{MACD_吸拉派落主图}
 
DRAWGBK(O>C,RGB(48,41,124),RGB(0,0,0),0,'',0);
 ZF:=STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(DYBLOCK,'    '),HYBLOCK),'   '),GNBLOCK),'  '),FGBLOCK);
 DRAWTEXT_FIX(ISLASTBAR,0,0,0,ZF),{COLORYELLOW}COLOR008888;
 {四区背景主图}
 N:=120;
 M:=BARSLAST(CURRBARSCOUNT=N);
 GD:=CONST(IF(ISLASTBAR=1,HHV(H,M),0));
 DD:=CONST(IF(ISLASTBAR=1,LLV(L,M),0));
 KJ:=GD-DD;
 高区:IF(CURRBARSCOUNT<=N,GD,DRAWNULL),LINETHICK1,COLOR004080;
 低区:IF(CURRBARSCOUNT<=N,DD,DRAWNULL),LINETHICK1,COLOR004080;
 平衡:IF(CURRBARSCOUNT<=N,DD+KJ/2,DRAWNULL),LINETHICK1,COLOR004080;
 支撑0:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.191,DRAWNULL),LINETHICK1,COLOR004080;
 强势:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.382,DRAWNULL),LINETHICK1,COLOR004080;
 突破:IF(CURRBARSCOUNT<=N,DD+KJ/2,DRAWNULL),LINETHICK1,COLOR004080;
 警示:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.618,DRAWNULL),LINETHICK1,COLOR004080;
 压力:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.809,DRAWNULL),LINETHICK1,COLOR004080;
 CD:=CURRBARSCOUNT,NODRAW;
 STICKLINE(CD=60,HHV(高区,60),LLV(低区,60),0,1),COLOR004080;{0.01}
 STICKLINE(CD=120,HHV(高区,60),LLV(低区,60),0,1),COLOR004080;
 STICKLINE(CD=1,HHV(高区,60),LLV(低区,60),0,1),COLOR004080;
 DRAWTEXT(CURRBARSCOUNT=1,压力,'压力'),COLOR004080;
 DRAWTEXT(CURRBARSCOUNT=1,警示,'警示'),COLOR004080;
 DRAWTEXT(CURRBARSCOUNT=1,突破,'突破'),COLOR004080;
 DRAWTEXT(CURRBARSCOUNT=1,强势,'强势'),COLOR004080;
 DRAWTEXT(CURRBARSCOUNT=1,支撑0,'支撑'),COLOR004080;
 DRAWTEXT(CURRBARSCOUNT=N/4+30,GD-KJ*0.09,'【风险区】--高抛避险'),COLOR004080;
 DRAWTEXT(CURRBARSCOUNT=N/4+30,GD-KJ*0.3,'【警示区】--逢高减仓'),COLOR004080;
 DRAWTEXT(CURRBARSCOUNT=N/4+30,GD-KJ*0.45,'【突破区】--主力拉升'),COLOR004080;
 DRAWTEXT(CURRBARSCOUNT=N/4+30,GD-KJ*0.55,'【拉升区】--强势畜锐'),COLOR004080;
 DRAWTEXT(CURRBARSCOUNT=N/4+30,DD+KJ/3,'【关注区】--逢低买入'),COLOR004080;
 DRAWTEXT(CURRBARSCOUNT=N/4+30,DD+KJ/10,'【低吸区】--大胆买入'),COLOR004080;
 DRAWTEXT(CURRBARSCOUNT=N/2+6,GD-KJ*0.25,'【拉升区】'),COLOR004080;
 DRAWTEXT(CURRBARSCOUNT=N/2+6,DD+KJ*0.25,'【持股区】'),COLOR004080;
 DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
 {吸拉派落主图}
 DIFF:=EMA(C,12) - EMA(C,26);
 DEA:=EMA(DIFF,9);
 MACD:=2*(DIFF-DEA);
 M价:(REF(MACD,1)/2 +(26-1)*REF( EMA(C,26),1)/(26+1)
 -(12-1)*REF( EMA(C,12),1)/(12+1)+ 2*DIFF/(9+1)
 +(9-1)*REF( DEA,1)/(9+1)) /2/(1 /(12+1)-1/(26+1) ),DOTLINE;
 WDIF:=EMA(EMA(EMA(C,3),3),3)+DIFF;
WDEA9:EMA(WDIF,9),{COLORGREEN.COLORYELLOW}COLOR008888,LINETHICK2;
 MA60:=MA(CLOSE,60),COLORLIGRAY;
 吸:XLPL.NOTEXT吸,NODRAW;
 拉:XLPL.NOTEXT拉,NODRAW;
 派:XLPL.NOTEXT派,NODRAW;
 落:XLPL.NOTEXT落,NODRAW;
 AAW:IF( 吸!=DRAWNULL, M价,DRAWNULL),COLORLIRED,LINETHICK2;
 BBW:IF( 拉!=DRAWNULL, M价,DRAWNULL),{COLORRED}COLOR0099FF,LINETHICK2;
 CCW:IF( 派!=DRAWNULL, M价,DRAWNULL),{COLORGREEN}COLORCYAN,LINETHICK2;
 DDW:IF( 落!=DRAWNULL, M价,DRAWNULL),{COLORWHITE}COLORAAAAAA,LINETHICK2;
 STICKLINE(AAW,LOW,HIGH,0,0),COLORLIRED;
 STICKLINE(AAW,C,O,3,1),COLORLIRED;
 STICKLINE(BBW,LOW,HIGH,0,0),{COLORRED}COLOR0099FF;
 STICKLINE(BBW ,C,O,3,1),{COLORRED}COLOR0099FF;
 STICKLINE(CCW,LOW,HIGH,0,0),{COLORGREEN}COLORCYAN;
STICKLINE(CCW,C,O,3,1){COLORGREEN}COLORCYAN;
 STICKLINE(DDW,LOW,HIGH,0,0),{COLORWHITE}COLORAAAAAA;
 STICKLINE(DDW,C,O,3,1),{COLORWHITE}COLORAAAAAA;
 DRAWTEXT("KDJ.J"-REF("KDJ.J",1)>30  AND C/REF(C,1)>1.043 AND "MACD.MACD">0
AND EXPMA(C,12)>EXPMA(C,50),L*0.995,'↖起爆'),{COLORWHITE}COLORAAAAAA;
 {---------------}
 MA5:MA(CLOSE,5),NODRAW,COLORWHITE;
 MA10:MA(CLOSE,10),NODRAW,COLORWHITE;
 MA20:MA(CLOSE,20),NODRAW,COLORWHITE;
 STICKLINE(CURRBARSCOUNT=1,MA5,MA5,20,1),{COLOR00009C}COLORRED,LINETHICK1;
 STICKLINE(CURRBARSCOUNT=1,MA10,MA10,20,1),COLORYELLOW{COLOR008888},LINETHICK2;
 DRAWTEXT(ISLASTBAR=1,MA5,'    五日'),COLOR00009C,LINETHICK2;
 DRAWTEXT(ISLASTBAR=1,MA10,'   十日'),{COLOR858500}COLOR008888,LINETHICK2;{COLORYELLOW}
 {布林}
 M0:=20; P:=10;
 BC1:=IF(L=LLV(L,10*P),L,DRAWNULL);
 BC2:=CONST(BARSLAST(BC1!=DRAWNULL));
 BC3:=IF(BC2=0,L,REF(L,BC2));
 TC1:=IF(H=HHV(H,10*P),H,DRAWNULL);
 TC2:=CONST(BARSLAST(TC1!=DRAWNULL));
 TC3:=IF(TC2=0,H,REF(H,TC2));
 BZ:=MAX(BC2,TC2);
 高:=IF(CURRBARSCOUNT<=BZ+1,CONST(TC3),DRAWNULL);
 低:=IF(CURRBARSCOUNT<=BZ+1,CONST(BC3),DRAWNULL);
 MID:=MA(C,M0);
 VART1:=POW((C-MID),2);
 VART2:=MA(VART1,M0);    {M0}
 VART3:=SQRT(VART2);
 U_R:=MID+2*VART3;
 L_R:=MID-2*VART3;
 BOLL:=IF(ISLASTBAR,REF(MID,1),DRAWNULL);{COLOR333339,LINETHICK2}
 UB:=IF(ISLASTBAR,REF(U_R,1),DRAWNULL);
 LB:=IF(ISLASTBAR,REF(L_R,1),DRAWNULL);
 DRAWTEXT(ISLASTBAR,BOLL,'   ═══BOLL'),COLOR888888;
 DRAWTEXT(ISLASTBAR,IF(ISLASTBAR AND UB<=高, UB,DRAWNULL), '   ═══UB'),COLOR00CC33;
 DRAWTEXT(ISLASTBAR,IF(ISLASTBAR AND LB>=低, LB,DRAWNULL), '   ═══LB'),COLORLIRED;
 
C0:STICKLINE(CURRBARSCOUNT=1,C,C,10000,1),COLOR555555,LINETHICK1;
 
{中期趋势回归划线}
 UR:=6;
 LR:=UR;
 { TC1:=IF(H=HHV(H,8*UR),H,DRAWNULL);
 TC2:=CONST(BARSLAST(TC1=H))+1;}
 UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));
 { BC1:=IF(L=LLV(L,8*LR),L,DRAWNULL);
 BC2:=CONST(BARSLAST(BC1=L))+1;}
 LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));
 LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低点定位}
 HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;{高点定位}
 { STICKLINE(IF(BC2>TC2,HP,LP),LOWER,UPPER,0,0),COLOR628962;
 STICKLINE(IF(BC2>TC2,LP,HP),LOWER,UPPER,0,0),COLOR628962;}
 NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2));{用时};
 LR1:=FORCAST(C,NOD+1);
 NP:=IF(CURRBARSCOUNT<=MAX(BC2,TC2),CONST(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,MIN(TC2,BC2)-1))),DRAWNULL),POINTDOT,COLOR93BDA8;{近点=}
 LR2:=SLOPE(C,NOD+1);
 LR3:=CONST(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)));
 FP:=NP-LR3*(NOD),POINTDOT,COLOR93BDA8;{远点=}
 EQU:=(NP+FP)/2,POINTDOT,COLOR93BDA8;{=}
 AD:=ABS(NP-FP);{高差}
 DBL:=BARSLAST(BC1!=DRAWNULL)+1;
 DBH:=BARSLAST(TC1!=DRAWNULL)+1;
 BSP:=IF(BC2>TC2,DBL,DBH)-1;
 
LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);
 AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL);
 AT2:=HHV(AT1-LRL,MAX(BC2,TC2));
 AT3:=CONST(BARSLAST(AT1-LRL=AT2));
 AT4:=CONST(IF(AT3=0,H,REF(H,AT3)));
 AT5:=CONST(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)));
 ATL:=LRL+AT5;
 UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL);
 UT2:=HHV(LRL-UT1,MAX(BC2,TC2));
 UT3:=CONST(BARSLAST(LRL-UT1=UT2));
 UT4:=CONST(IF(UT3=0,H,REF(H,UT3)));
 UT5:=CONST(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)));
 UTL:=LRL-UT5;
 
RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,CONST(REF(ATL,MIN(BC2,TC2)-11)));{限制高}
 RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,CONST(REF(UTL,MIN(BC2,TC2)-11)));{限制低}
 中期中轨:IF(NP>FP,IF(LRL<=RH,LRL,DRAWNULL),IF(LRL>=RL,LRL,DRAWNULL)),COLOR628962;
 中期上轨:IF(NP>FP,IF(ATL<=RH,ATL,DRAWNULL),IF(ATL>=RL,ATL,DRAWNULL)),COLOR628962;
 中期下轨:IF(NP>FP,IF(UTL<=RH,UTL,DRAWNULL),IF(UTL>=RL,UTL,DRAWNULL)),COLOR628962;
 
止损:0.965*REF(H,1),LINETHICK0;{,DRAWNULL,COLORWHITE}
 止盈:1.06*REF(H,1),LINETHICK0;

==========================================================
 {波段王,中长期个股趋势背景,底部  副图}
 VAR21:=(INDEXC+INDEXH+INDEXL+INDEXO)/4;
VAR22:=SUMBARS(VOL,CAPITAL);
VAR23:=HHV(VAR21,VAR22);
VAR24:=LLV(VAR21,VAR22);
VAR25:=(2*VAR21-VAR24-REF(VAR24,1))/(VAR23-VAR24);
VAR26:=(VAR21-VAR24)/(VAR23-VAR24);
VAR27:=IF(VAR21<=VAR24,VAR25*60,VAR26*60);
VAR28:=600*(EMA(CLOSE,3)-EMA(LOW,30))/EMA(LOW,30);
VAR29:=EMA(VAR28,7);
VAR2A:=(WINNER(120*CLOSE/100)-WINNER(100*CLOSE/100))*100;
VAR2B:=(-100)*(WINNER(120*CLOSE/100)-WINNER(100*CLOSE/100))+5;
VAR2C:=HHV(HIGH,9)-LLV(LOW,9);
VAR2D:=HHV(HIGH,9)-CLOSE;
VAR2E:=CLOSE-LLV(LOW,9);
VAR2F:=VAR2D/VAR2C*100-70;
VAR210:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
VAR211:=(2*CLOSE+HIGH+LOW)/4;
VAR212:=SMA(VAR2E/VAR2C*100,3,1);
VAR213:=LLV(LOW,34);
VAR214:=SMA(VAR212,3,1)-SMA(VAR2F,9,1);
VAR215:=IF(VAR214>100,VAR214-100,0);
VAR216:=HHV(HIGH,34);
VAR217:=EMA((VAR211-VAR213)/(VAR216-VAR213)*100,8);
VAR218:=EMA(VAR217,5);
 
STICKLINE(VAR217-VAR218>0,5,12.5,4.2,0), ,{COLORRED}COLOR0099FF ; {COLORCYAN}
 STICKLINE(VAR217-VAR218<0,5,12.5,4.2,0), ,{COLORGREEN}COLORFFFF00 ;
 DRAWTEXT(CURRBARSCOUNT=1,8.5,'_安全区'),{COLORMAGENTA}COLOR0099FF;{超卖安全区}
 {治势能臣动力线}
 动力线:=EMA((C-LLV(LOW,10))/(HHV(HIGH,25)-LLV(LOW,10))*100,4),LINETHICK2,{COLORWHITE}COLOR008888;
 {短线骁骑吸筹值}
 XVAR2:=REF(LOW,1);
 XVAR3:=SMA(ABS(LOW-XVAR2),3,1)/SMA(MAX(LOW-XVAR2,0),3,1)*100;
 XVAR4:=EMA(IF(CLOSE*1.3,XVAR3*10,XVAR3/10),3);
 XVAR5:=LLV(LOW,13);
 XVAR6:=HHV(XVAR4,13);
 XVAR7:=IF(MA(CLOSE,34),1,0);
 XVAR8:=EMA(IF(LOW<=XVAR5,(XVAR4+XVAR6*2)/2,0),3)/618*XVAR7;
 XVAR9:=IF(XVAR8>100,100,XVAR8)*0.675+12.5;
 STICKLINE(XVAR9>-120,12.5,XVAR9,8,1),COLORYELLOW;
 {};
 MA1:=5;M2:=10;M3:=30;M4:=60;
 J1:=ATAN((MA(C,MA1)/REF(MA(C,MA1),1)-1)*100)*180/3.1416;
 J2:=ATAN((MA(C,M2)/REF(MA(C,M2),1)-1)*100)*180/3.1416;
 J3:=ATAN((MA(C,M3)/REF(MA(C,M3),1)-1)*100)*180/3.1416;
 J4:=ATAN((MA(C,M4)/REF(MA(C,M4),1)-1)*100)*180/3.1416;
 
均线5:=J1;
 均线10:=J2;
 均线30:=J3;
 均线60:=J4;
 XG1:=J1>=0 AND 0>=REF(0,1);
 XG2:=J2>=0 AND 0>=REF(0,1);
 XG3:=J3>=0 AND 0>=REF(0,1);
 XGX:=CROSS(XG1,XG2);
 XGY:=CROSS((XG1,XG2),XG3);
 低买1:IF(XGX,55.5,12),COLOR0099FF{COLORYELLOW},LINETHICK2;{右侧买};
 低买2:IF(XGY,55.5,12),COLORLIRED{COLORYELLOW},LINETHICK2;{右侧买};
 N:=9;M01:=3;M02:=3;
 RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
 K:SMA(RSV,M01,1),COLORCYAN;
 D:SMA(K,M02,1),COLOR008888;
 J:3*K-2*D,COLORAAAAAA;

(0)

相关推荐