MACD最新用法“美人眼”
需要积分升级,拿出看家的东东,先发张图,觉得好多顶,多给加分,我发原码,不加分以后不发免费贴了!大智慧源码
{MACD美人眼 long 26 m9 short 12}
DIFF1:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA1:=EMA(DIFF1,M);
MACD:=2*(DIFF1-DEA1);
DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG),colorff00ff,linethick2;
DEA: EMA(DIFF1,M),colorwhite,linethick2;
AH:HHV(DIFF1,55),COLOR6600ff,linethick2,layer0;
PARTLINE(ah,ah),COLORWHITE,POINTDOT,linethick2,layer0;
DRAWICON( ref(aH=diff1,1) and DIFF<REF(DIFF1,1),AH,8),ALIGN1;
AL:LLV(DIFF1,55),COLOR248a24,linethick2,layer0;
PARTLINE(al,Al),COLORWHITE,POINTDOT,linethick2,layer0;
DRAWICON( ref(al=diff1,1) and DIFF>REF(DIFF1,1),al,7),ALIGN1;
{●60零上金叉:IF(CROSS(DIFF,DEA) AND DIFF>0,0.3,0),COLOR6600ff,POINTDOT;
STICKLINE(●60零上金叉,DIFF,ah,4,0),COLOR6600ff;}
■零下金叉:IF(CROSS(DIFF,DEA) AND DIFF<-0.001,0.3,0),COLORWHITE,POINTDOT;
STICKLINE(■零下金叉,0.1,0.15,6,0),COLORWHITE;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
■二次金叉:IF(CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1,0.2,0),COLOR3C86CC,POINTDOT;
STICKLINE(■二次金叉,0.15,0.2,6,0),COLOR3C86CC;
A3:=CROSS(DIFF,DEA) AND DEA<0;
■零下二次金叉:IF(FILTER(COUNT(A3,21)=2,10) AND DEA<0,0.05,0),COLORF58F98,POINTDOT;
STICKLINE(■零下二次金叉,0.25,0.3,6,0),COLORF58F98;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
■底背离:IF(REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA),0.1,0),COLORFFFF00;
底背离1:STICKLINE(REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA),0,AL,4,0),COLOR00FF00;
STICKLINE(■底背离,0.2,0.25,6,0),COLORFFFF00;
{DRAWLINE(A1=0,DEA,■底背离,DEA,0),COLORYELLOW};
{A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:STICKLINE(REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF),0,DIFF,4,0),COLORBLACK;
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN;}
{MACD背离}
DD:=C=HHV(C,100);
EE:=DEA1< REF(DEA1,1) AND REF(DEA1< REF(DEA1,1),1)=1;
CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;
上升背离:(CC AND EE)*AH,stick,linethick2,COLORff00FF;
顶背离:(DD AND EE AND DEA1< HHV(DEA1,100))*AH,STICK,LINETHICK2,COLOrYELLOW;
drawtext(顶背离,DEA1/2,'顶背离'),ALIGN1,colorYELLOW;
FF:=C=LLV(C,100);
GG:= DEA1> REF(DEA1,1) AND REF(DEA1> REF(DEA1,1),1)=1;
LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;
下降背离:(LL AND GG)*AL,stick,linethick2,COLORwhite;
底背离:(FF AND GG AND DEA1> LLV(DEA1,100))*AL,STICK,LINETHICK2,COLOR6600ff;
drawtext(底背离,DEA1/2,'底背离'),ALIGN1,color6600FF;
if(diff<0,diff,0),colorff00ff,linethick2,layer0;
if(diff<0,0,diff),coloryellow,linethick2,layer0;
if(diff<dea,diff,dea),colorffff00,linethick2,layer0;
if(diff>dea,dea,dea),colorwhite,linethick2,layer0;
{PARTLINE(DEA,bbDEA>0,RGB(255,0,255)),LINETHICK2;
PARTLINE(DEA,bbDEA<0,RGB(255,255,225)),LINETHICK2;
PARTLINE(DIFF,bbDIFF>0,RGB(255,255,0)),LINETHICK2;
PARTLINE(DIFF,bbDIFF<0,RGB(0,0,255)),LINETHICK2;}
{绿色}
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,8,0 ),COLOr008800;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,7,0 ),COLOR009900;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,6,0 ),COLOR00aa00;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,5,0 ),COLOR00bb00;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,4,0 ),COLOR00cc00;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,3,0 ),COLOR00dd00;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,2,0 ),COLOR00ee00;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,1,0 ),COLOR00ff00;
{红色}
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,8,0 ),COLOR000088;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,7,0 ),COLOR000099;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,6,0 ),COLOR0000aa;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,5,0 ),COLOR0000bb;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,4,0 ),COLOR0000cc;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,3,0 ),COLOR0000dd;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,2,0 ),COLOR0000ee;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,1,0 ),COLOR0000ff;
{黄色}
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,8,0 ),COLOR338fdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,7,0 ),COLOR339fdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,6,0 ),COLOR33afdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,5,0 ),COLOR33bfdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,4,0 ),COLOR33cfdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,3,0 ),COLOR33dfdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,2,0 ),COLOR33efdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,1,0 ),COLOR33ffdd;
{兰色}
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,8,0 ),COLORFF4400;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,7,0 ),COLORFF6600;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,6,0 ),COLORFF7700;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,5,0 ),COLORFF8800;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,4,0 ),COLORFF9900;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,3,0 ),COLORFFaa00;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,2,0 ),COLORFFbb00;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,1,0 ),COLORFFcc00;
VAR1:=HHV(DEA,53);
VAR2:=LLV(DEA,30);
VAR3:=DEA-(DIFF-DEA);
UP:IF(DIFF>VAR1 AND DEA=VAR1,MAX(LLV(VAR1,10),VAR3),VAR1),COLORbb9a00,LINETHICK2,LAYER0;
DN:IF(DIFF<VAR2 AND DEA=VAR2,MIN(HHV(VAR2,10),VAR3),VAR2),COLORaa00bb,LINETHICK2,LAYER0;
美人眼:=CROSS(DIFF ,DEA ) AND CROSS( DIFF,DN ) AND DN<0;
美人眼a:美人眼*AL,stick,linethick4,COLOR8080ff;
DRAWTEXT(美人眼,dn,'美人眼'),ALIGN1,COLOR8080FF,linethick2,LAYER0;
美人瞎眼:=CROSS(DEA ,DIFF ) AND CROSS( UP,DIFF ) AND DIFF<UP;
美人瞎眼a:美人瞎眼*ah,stick,linethick4,COLOR9ca010;
DRAWTEXT(美人瞎眼,dn,'美人瞎眼'),ALIGN1,COLOR9ca010,linethick2,LAYER0;
视情况在改写通达信公式
大智慧源码 {MACD美人眼 long 26 m9 short 12} DIFF1:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG); DEA1:=EMA(DIFF1,M); MACD:=2*(DIFF1-DEA1); DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG),colorff00ff,linethick2; DEA: EMA(DIFF1,M),colorwhite,linethick2; AH:HHV(DIFF1,55),COLOR6600ff,linethick2,layer0; PARTLINE(ah,ah),COLORWHITE,POINTDOT,linethick2,layer0; DRAWICON( ref(aH=diff1,1) and DIFF<REF(DIFF1,1),AH,8),ALIGN1; ALLV(DIFF1,55),COLOR248a24,linethick2,layer0; PARTLINE(al,Al),COLORWHITE,POINTDOT,linethick2,layer0; DRAWICON( ref(al=diff1,1) and DIFF>REF(DIFF1,1),al,7),ALIGN1; {●60零上金叉:IF(CROSS(DIFF,DEA) AND DIFF>0,0.3,0),COLOR6600ff,POINTDOT; STICKLINE(●60零上金叉,DIFF,ah,4,0),COLOR6600ff;} ■零下金叉:IF(CROSS(DIFF,DEA) AND DIFF<-0.001,0.3,0),COLORWHITE,POINTDOT; STICKLINE(■零下金叉,0.1,0.15,6,0),COLORWHITE; JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0)); ■二次金叉:IF(CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1,0.2,0),COLOR3C86CC,POINTDOT; STICKLINE(■二次金叉,0.15,0.2,6,0),COLOR3C86CC; A3:=CROSS(DIFF,DEA) AND DEA<0; ■零下二次金叉:IF(FILTER(COUNT(A3,21)=2,10) AND DEA<0,0.05,0),COLORF58F98,POINTDOT; STICKLINE(■零下二次金叉,0.25,0.3,6,0),COLORF58F98; A1:=BARSLAST(REF(CROSS(DIFF,DEA),1)); ■底背离:IF(REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA),0.1,0),COLORFFFF00; 底背离1:STICKLINE(REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA),0,AL,4,0),COLOR00FF00; STICKLINE(■底背离,0.2,0.25,6,0),COLORFFFF00; {DRAWLINE(A1=0,DEA,■底背离,DEA,0),COLORYELLOW}; {A2:=BARSLAST(REF(CROSS(DEA,DIFF),1)); 顶背离:STICKLINE(REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF),0,DIFF,4,0),COLORBLACK; DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN;} {MACD背离} DD:=C=HHV(C,100); EE:=DEA1< REF(DEA1,1) AND REF(DEA1< REF(DEA1,1),1)=1; CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;上升背离CC AND EE)*AH,stick,linethick2,COLORff00FF; 顶背离DD AND EE AND DEA1< HHV(DEA1,100))*AH,STICK,LINETHICK2,COLOrYELLOW; drawtext(顶背离,DEA1/2,'顶背离'),ALIGN1,colorYELLOW; FF:=C=LLV(C,100); GG:= DEA1> REF(DEA1,1) AND REF(DEA1> REF(DEA1,1),1)=1; LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;下降背离LL AND GG)*AL,stick,linethick2,COLORwhite; 底背离FF AND GG AND DEA1> LLV(DEA1,100))*AL,STICK,LINETHICK2,COLOR6600ff; drawtext(底背离,DEA1/2,'底背离'),ALIGN1,color6600FF; if(diff<0,diff,0),colorff00ff,linethick2,layer0; if(diff<0,0,diff),coloryellow,linethick2,layer0; if(diff<dea,diff,dea),colorffff00,linethick2,layer0; if(diff>dea,dea,dea),colorwhite,linethick2,layer0; {PARTLINE(DEA,bbDEA>0,RGB(255,0,255)),LINETHICK2; PARTLINE(DEA,bbDEA<0,RGB(255,255,225)),LINETHICK2; PARTLINE(DIFF,bbDIFF>0,RGB(255,255,0)),LINETHICK2; PARTLINE(DIFF,bbDIFF<0,RGB(0,0,255)),LINETHICK2;} {绿色} STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,8,0 ),COLOr008800;STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,7,0 ),COLOR009900; STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,6,0 ),COLOR00aa00;STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,5,0 ),COLOR00bb00; STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,4,0 ),COLOR00cc00; STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,3,0 ),COLOR00dd00; STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,2,0 ),COLOR00ee00; STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,1,0 ),COLOR00ff00; {红色} STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,8,0 ),COLOR000088;STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,7,0 ),COLOR000099;STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,6,0 ),COLOR0000aa; STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,5,0 ),COLOR0000bb;STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,4,0 ),COLOR0000cc;STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,3,0 ),COLOR0000dd; STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,2,0 ),COLOR0000ee; STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,1,0 ),COLOR0000ff; {黄色} STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,8,0 ),COLOR338fdd; STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,7,0 ),COLOR339fdd; STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,6,0 ),COLOR33afdd; STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,5,0 ),COLOR33bfdd;STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,4,0 ),COLOR33cfdd;STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,3,0 ),COLOR33dfdd; STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,2,0 ),COLOR33efdd; STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,1,0 ),COLOR33ffdd; {兰色} STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,8,0 ),COLORFF4400; STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,7,0 ),COLORFF6600;STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,6,0 ),COLORFF7700; STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,5,0 ),COLORFF8800;STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,4,0 ),COLORFF9900;STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,3,0 ),COLORFFaa00; STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,2,0 ),COLORFFbb00; STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,1,0 ),COLORFFcc00; VAR1:=HHV(DEA,53); VAR2:=LLV(DEA,30); VAR3:=DEA-(DIFF-DEA); UP:IF(DIFF>VAR1 AND DEA=VAR1,MAX(LLV(VAR1,10),VAR3),VAR1),COLORbb9a00,LINETHICK2,LAYER0; DN:IF(DIFF<VAR2 AND DEA=VAR2,MIN(HHV(VAR2,10),VAR3),VAR2),COLORaa00bb,LINETHICK2,LAYER0; 美人眼:=CROSS(DIFF ,DEA ) AND CROSS( DIFF,DN ) AND DN<0; 美人眼a:美人眼*AL,stick,linethick4,COLOR8080ff; DRAWTEXT(美人眼,dn,'美人眼'),ALIGN1,COLOR8080FF,linethick2,LAYER0; 美人瞎眼:=CROSS(DEA ,DIFF ) AND CROSS( UP,DIFF ) AND DIFF<UP; 美人瞎眼a:美人瞎眼*ah,stick,linethick4,COLOR9ca010; DRAWTEXT(美人瞎眼,dn,'美人瞎眼'),ALIGN1,COLOR9ca010,linethick2,LAYER0; 需要积分升级,拿出看家的东东,先发张图,觉得好多顶,多给加分,我发原码,不加分以后不发免费贴了!
大智慧源码
{MACD美人眼 long 26 m9 short 12}
DIFF1:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA1:=EMA(DIFF1,M);
MACD:=2*(DIFF1-DEA1);
DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG),colorff00ff,linethick2;
DEA: EMA(DIFF1,M),colorwhite,linethick2;
AH:HHV(DIFF1,55),COLOR6600ff,linethick2,layer0;
PARTLINE(ah,ah),COLORWHITE,POINTDOT,linethick2,layer0;
DRAWICON( ref(aH=diff1,1) and DIFF<REF(DIFF1,1),AH,8),ALIGN1;
ALLV(DIFF1,55),COLOR248a24,linethick2,layer0;
PARTLINE(al,Al),COLORWHITE,POINTDOT,linethick2,layer0;
DRAWICON( ref(al=diff1,1) and DIFF>REF(DIFF1,1),al,7),ALIGN1;
{●60零上金叉:IF(CROSS(DIFF,DEA) AND DIFF>0,0.3,0),COLOR6600ff,POINTDOT;
STICKLINE(●60零上金叉,DIFF,ah,4,0),COLOR6600ff;}
■零下金叉:IF(CROSS(DIFF,DEA) AND DIFF<-0.001,0.3,0),COLORWHITE,POINTDOT;
STICKLINE(■零下金叉,0.1,0.15,6,0),COLORWHITE;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
■二次金叉:IF(CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1,0.2,0),COLOR3C86CC,POINTDOT;
STICKLINE(■二次金叉,0.15,0.2,6,0),COLOR3C86CC;
A3:=CROSS(DIFF,DEA) AND DEA<0;
■零下二次金叉:IF(FILTER(COUNT(A3,21)=2,10) AND DEA<0,0.05,0),COLORF58F98,POINTDOT;
STICKLINE(■零下二次金叉,0.25,0.3,6,0),COLORF58F98;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
■底背离:IF(REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA),0.1,0),COLORFFFF00;
底背离1:STICKLINE(REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA),0,AL,4,0),COLOR00FF00;
STICKLINE(■底背离,0.2,0.25,6,0),COLORFFFF00;
{DRAWLINE(A1=0,DEA,■底背离,DEA,0),COLORYELLOW};
{A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:STICKLINE(REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF),0,DIFF,4,0),COLORBLACK;
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN;}
{MACD背离}
DD:=C=HHV(C,100);
EE:=DEA1< REF(DEA1,1) AND REF(DEA1< REF(DEA1,1),1)=1;
CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;
上升背离CC AND EE)*AH,stick,linethick2,COLORff00FF;
顶背离DD AND EE AND DEA1< HHV(DEA1,100))*AH,STICK,LINETHICK2,COLOrYELLOW;
drawtext(顶背离,DEA1/2,'顶背离'),ALIGN1,colorYELLOW;
FF:=C=LLV(C,100);
GG:= DEA1> REF(DEA1,1) AND REF(DEA1> REF(DEA1,1),1)=1;
LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;
下降背离LL AND GG)*AL,stick,linethick2,COLORwhite;
底背离FF AND GG AND DEA1> LLV(DEA1,100))*AL,STICK,LINETHICK2,COLOR6600ff;
drawtext(底背离,DEA1/2,'底背离'),ALIGN1,color6600FF;
if(diff<0,diff,0),colorff00ff,linethick2,layer0;
if(diff<0,0,diff),coloryellow,linethick2,layer0;
if(diff<dea,diff,dea),colorffff00,linethick2,layer0;
if(diff>dea,dea,dea),colorwhite,linethick2,layer0;
{PARTLINE(DEA,bbDEA>0,RGB(255,0,255)),LINETHICK2;
PARTLINE(DEA,bbDEA<0,RGB(255,255,225)),LINETHICK2;
PARTLINE(DIFF,bbDIFF>0,RGB(255,255,0)),LINETHICK2;
PARTLINE(DIFF,bbDIFF<0,RGB(0,0,255)),LINETHICK2;}
{绿色}
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,8,0 ),COLOr008800;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,7,0 ),COLOR009900;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,6,0 ),COLOR00aa00;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,5,0 ),COLOR00bb00;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,4,0 ),COLOR00cc00;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,3,0 ),COLOR00dd00;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,2,0 ),COLOR00ee00;
STICKLINE(MACD<ref(MACD,1)and MACD>0,0,MACD,1,0 ),COLOR00ff00;
{红色}
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,8,0 ),COLOR000088;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,7,0 ),COLOR000099;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,6,0 ),COLOR0000aa;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,5,0 ),COLOR0000bb;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,4,0 ),COLOR0000cc;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,3,0 ),COLOR0000dd;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,2,0 ),COLOR0000ee;
STICKLINE(MACD>=ref(MACD,1)and MACD>0,0,MACD,1,0 ),COLOR0000ff;
{黄色}
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,8,0 ),COLOR338fdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,7,0 ),COLOR339fdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,6,0 ),COLOR33afdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,5,0 ),COLOR33bfdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,4,0 ),COLOR33cfdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,3,0 ),COLOR33dfdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,2,0 ),COLOR33efdd;
STICKLINE(MACD>ref(MACD,1)and MACD<0,0,MACD,1,0 ),COLOR33ffdd;
{兰色}
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,8,0 ),COLORFF4400;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,7,0 ),COLORFF6600;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,6,0 ),COLORFF7700;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,5,0 ),COLORFF8800;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,4,0 ),COLORFF9900;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,3,0 ),COLORFFaa00;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,2,0 ),COLORFFbb00;
STICKLINE(MACD<=ref(MACD,1)and MACD<0,0,MACD,1,0 ),COLORFFcc00;
VAR1:=HHV(DEA,53);
VAR2:=LLV(DEA,30);
VAR3:=DEA-(DIFF-DEA);
UP:IF(DIFF>VAR1 AND DEA=VAR1,MAX(LLV(VAR1,10),VAR3),VAR1),COLORbb9a00,LINETHICK2,LAYER0;
DN:IF(DIFF<VAR2 AND DEA=VAR2,MIN(HHV(VAR2,10),VAR3),VAR2),COLORaa00bb,LINETHICK2,LAYER0;
美人眼:=CROSS(DIFF ,DEA ) AND CROSS( DIFF,DN ) AND DN<0;
美人眼a:美人眼*AL,stick,linethick4,COLOR8080ff;
DRAWTEXT(美人眼,dn,'美人眼'),ALIGN1,COLOR8080FF,linethick2,LAYER0;
美人瞎眼:=CROSS(DEA ,DIFF ) AND CROSS( UP,DIFF ) AND DIFF<UP;
美人瞎眼a:美人瞎眼*ah,stick,linethick4,COLOR9ca010;
DRAWTEXT(美人瞎眼,dn,'美人瞎眼'),ALIGN1,COLOR9ca010,linethick2,LAYER0;
红军 发表于 2010-5-21 22:58
现在报答“幸福幸福”的评分,特发通达信公式。
市日年:FINANCE(42),,NODRAW,COLORRED;
:(:L我也是通达信,好用就好,老师辛苦。 谢谢分享,代码中的表情可以在回复时选相应表情 就知道表情代码了。
在导公式时就不会报错了.记得还要写参数 long 26 m9 short 12 :( 呵呵。。。。 谢谢分享,代码中的表情可以在回复时选相应表情 就知道表情代码了。
在导公式时就不会报错了.记得还要写参 ...
吉它星空 发表于 2010-5-21 21:10 http://www.178448.cn/images/common/back.gif
上面有参数啊!看清楚了老弟。 我的是通达信麻烦老师发一下源码。辛苦了 回复 1# 红军
:L 学习MACD最新用法“美人眼” :( :L 相应表情 大盘个股强弱 :L:L:L:L学习了 学习一下 周末愉快 现在报答“幸福幸福”的评分,特发通达信公式。
市日年:FINANCE(42),,NODRAW,COLORRED;
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
{}
AH:HHV(DIF,55),COLOR6600FF,LINETHICK2;
AL:LLV(DIF,55),COLOR248A24,LINETHICK2;
VAR1:=HHV(DEA,53);
VAR2:=LLV(DEA,30);
VAR3:=DEA-(DIF-DEA);
UP:IF(DIF>VAR1 AND DEA=VAR1,MAX(LLV(VAR1,10),VAR3),VAR1),COLORBB9A00;
DN:IF(DIF<VAR2 AND DEA=VAR2,MIN(HHV(VAR2,10),VAR3),VAR2),COLORAA00BB,LINETHICK2;
美人眼:=CROSS(DIF ,DEA ) AND CROSS( DIF,DN ) AND DN<0;
美人眼A:美人眼*AL,STICK,LINETHICK5,COLOR8080FF;
DRAWTEXT(美人眼,DN,'美人眼'),COLOR8080FF,LINETHICK2;
美人瞎眼:=CROSS(DEA ,DIF ) AND CROSS( UP,DIF ) AND DIF<UP;
美人瞎眼A:美人瞎眼*AH,STICK,LINETHICK5,COLOR9CA010;
DRAWTEXT(美人瞎眼,DN,'美人瞎眼'),COLOR9CA010,LINETHICK2;
{}
{绿色}
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2.5,0 ),COLOR008800;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1.5,0 ),COLOR009900;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,0.5,0 ),COLOR00AA00;
{红色}
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2.5,0 ),COLOR000088;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1.5,0 ),COLOR000099;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,0.5,0 ),COLOR0000AA;
{黄色}
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2.5,0 ),COLOR338FDD;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1.5,0 ),COLOR339FDD;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,0.5,0 ),COLOR33AFDD;
{兰色}
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2.5,0 ),COLORFF4400;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1.5,0 ),COLORFF6600;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,0.5,0 ),COLORFF7700;
谢谢楼主分享,祝楼主财运亨通! 向楼主学习,谢谢楼主!:):L:(:handshake:victory: lz:通达信通不过啊