软件名称:[B]发个通达信MACD组合主图指标 -MACD_吸拉派落主图(补上源码)[/B]
软件类型:国产软件
运行环境:Win9X/Win2000/WinXP/Win2003/Win7/
软件语言:简体中文
授权方式:免费版
软件大小:7.00 KB
官方主页:Home Page
更新时间:2014-01-26 02:55:00
软件简介:
本主图结合坛里多位老师作品
在此先感谢作品老师!
另加自构元索组合而成,自认
为不错,故分享坛友,还附一有
副图指标,成看盘套装,清爽分了
{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),LINETHI
[url=http://www.70822.com/soft/sort013/sort05/down-69313.html]发个通达信MACD组合主图指标 -MACD_吸拉派落主图(补上源码)[/url]