周MACD
参数N=13;
DRAWGBK(DAY>0,COLORRGB(20,5,205),COLORRGB(25,255,0),1);
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:2000*(DIFF-DEA)/EMA(CLOSE,34);
周DIFF:=MA("MACD.DIFF#week",5);
周DEA:=MA("MACD.DEA#week",5);
周MACD:=MA("MACD.MACD#week",5)*100;
STICKLINE(周MACD>0,周MACD,0,10,0),color33FFFF;
STICKLINE(周MACD<0,周MACD,0,10,0),colorFF9966;
VAR1:=EMA(DMA(EMA(CLOSE,5),SUM(VOL,5)/3),2);
VAR2:=EMA(DMA(EMA(CLOSE,10),SUM(VOL,5)/3),2);
芙蓉:(VAR1-VAR2)*300,COLORSTICK,LINETHICK1;
VAR3:=芙蓉;
VAR4:=VAR3-REF(VAR3,1);
STICKLINE(VAR3>0 OR VAR3<40,0,VAR3,10,0),LINETHICK2,colorCCCCFF;
STICKLINE(VAR3>40 AND VAR3<400,40,VAR3,10,0),LINETHICK2,colorFF;
STICKLINE(VAR3<0 AND VAR3>-40,0,VAR3,10,0),LINETHICK2,colorCCFF33;
STICKLINE(VAR3<-40 AND VAR3>-400,-40,VAR3,10,0),LINETHICK2,colorFF0000;
DRAWTEXT(CROSS(VAR4,0) AND REF(VAR3,1)<-40,VAR3,'п'),PXUP4,colorFFFF;
DRAWTEXT(CROSS(0,VAR4) AND REF(VAR3,1)>40,VAR3,'ψ'),PXUP4,colorFF0000;
DRAWICON(CROSS(VAR4,0) AND REF(VAR3,1)<-40,VAR3,10),ALIGN1;
VARM1:=EMA(CLOSE,8);
VARM2:=EMA(VARM1,20);
VARM3:=CROSS(VARM1,VARM2);
VARM4:=VARM1<MA(CLOSE,120);
VARM5:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;
VARM6:=SMA(VARM5,5,1);
VARM7:=SMA(VARM6,8,1);
VARM8:=CROSS(VARM6,VARM7) AND VARM7<20;
VARM9:=CLOSE>LLV(CLOSE,60)+0.3*LLV(CLOSE,60) AND VARM8;
VARMA:=IF(CLOSE>1000,VARM8,VARM9);
DRAWTEXT(VARMA=1,VAR3+150,'★卖'),PXUP4,colorFF00;
日MACD:MACD,LINETHICK1,color10000;
VAR1:=REF(CLOSE,1);
VAR2:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);
VAR3:=REF(VAR2,1);
VAR4:=(SMA(MAX(CLOSE-VAR1,0),7,1))/(SMA(ABS(CLOSE-VAR1),7,1))*100;
VAR5:=(SMA(MAX(CLOSE-VAR1,0),13,1))/(SMA(ABS(CLOSE-VAR1),13,1))*100;
VAR6:=(SMA(MAX(VAR2-VAR3,0),26,1))/(SMA(ABS(VAR2-VAR3),26,1))*100;
VAR7:=DATE<1081231;
DRAWICON(VAR4>85 AND VAR5>80 AND VAR6>50 AND BARSCOUNT(CLOSE)>25 AND VAR7,130,2);
DRAWICON(VAR4<15 AND VAR5<20 AND VAR6<50 AND BARSCOUNT(CLOSE)>25 AND VAR7,-60,1);
VARD1:=INDEXV*INDEXC;
VARD2:=EMA(VARD1,5)/EMA(INDEXV,5);
VARD3:=(INDEXC-VARD2)/VARD2*100;
VARD4:=VARD3<=-1.5 AND VARD3>-100;
VARD5:=(SUM(VARD4>0,18))/(SUM(VARD4=0,18));
VARD6:=VARD5<5 AND VARD5>=0.25;
VARD7:=(LOW+HIGH+CLOSE)/3;
VARD8:=(VARD7-MA(VARD7,14))/(0.015*AVEDEV(VARD7,14));
VARD9:=EMA(VARD8,3);
VARDA:=(HIGH+LOW+CLOSE)/3;
VARDB:=SUM(MAX(0,HIGH-REF(VARDA,1)),26)/(SUM(MAX(0,REF(VARDA,1)-LOW),26))*100;
VARDC:=REF(MA(VARDB,3),2.2);
VARDD:=REF(MA(VARDB,13),6.2);
VARDE:=REF(MA(VARDB,89),36.6);
VARDF:=CROSS(VARDC,VARDB) AND VARDB>150;
DRAWTEXT(VARD6 AND CROSS(VARD8,VARD9),-61,'抄底'),colorFF00;
DRAWTEXT(VARDF,100,'逃顶'),colorFFFF;
AA:=REF(MACD,N)=HHV(MACD,2*N+1);
AAA:=FILTER(AA,N);
BB:=BACKSET(AAA,N+1);
CC1:=FILTER(BB,N);
CC:=CC1 OR ISLASTBAR;
AA2:=REF(LOW,N)=LLV(LOW,2*N+1);
AAA2:=FILTER(AA2,N);
BB2:=BACKSET(AAA2,N+1);
CC22:=FILTER(BB2,N);
CC2:=CC22 AND NOT(CC1);
EB:=BACKSET(CC,REF(BARSLAST(CC2),1)+1);
EE:=EB>REF(EB,1);
FF1:=BACKSET(EE,2);
EE2:=FF1>REF(FF1,1);
FF2:=BACKSET(EE2 AND COUNT(CC,REF(BARSLAST(CC2),1)+2)=0,REF(BARSLAST(CC2),1)+2);
EE3:=FF2>REF(FF2,1);
FF3:=BACKSET(EE3 AND COUNT(CC,REF(BARSLAST(CC2),1)+2)=0,REF(BARSLAST(CC2),1)+2);
JS:=FF3>REF(FF3,1);
G1:=IF(CC,COUNT(CC2,REF(BARSLAST(CC),1)+1),0);
GA:=IF(G1=1 AND CC,BARSLAST(EE2),0);
G2:=IF(CC AND REF(LOW,BARSLAST(EE2))>=REF(LOW,BARSLAST(EE3)),BARSLAST(EE3),BARSLAST(EE2));
G3:=IF(G1=2 AND CC,G2,0);
GG:=IF(G1>=3 AND CC,IF(CC AND REF(LOW,G2)>=REF(LOW,BARSLAST(JS)),BARSLAST(JS),G2),0);
JA:=GA+G3+GG;
JB:=BACKSET(CC,JA);
JJ:=JB>REF(JB,1);
LD:=BACKSET(JJ,2);
LD1:=LD>REF(LD,1);
HEA:=LD1 OR ISLASTBAR;
HEB:=BACKSET(HEA,REF(BARSLAST(CC),1)+1);
HEE:=HEB>REF(HEB,1);
HFF1:=BACKSET(HEE,2);
HEE2:=HFF1>REF(HFF1,1);
HFF2:=BACKSET(HEE2 AND COUNT(HEA,REF(BARSLAST(CC),1)+2)=0,REF(BARSLAST(CC),1)+2);
HEE3:=HFF2>REF(HFF2,1);
HFF3:=BACKSET(HEE3 AND COUNT(HEA,REF(BARSLAST(CC),1)+2)=0,REF(BARSLAST(CC),1)+2);
HJS:=HFF3>REF(HFF3,1);
HG1:=IF(HEA,COUNT(CC1,REF(BARSLAST(HEA),1)+1),0);
HGA:=IF(HG1=1 AND HEA,BARSLAST(HEE2),0);
HG2:=IF(HEA AND REF(HIGH,BARSLAST(HEE2))<=REF(HIGH,BARSLAST(HEE3)),BARSLAST(HEE3),BARSLAST(HEE2));
HG3:=IF(HG1=2 AND HEA,HG2,0);
HGG:=IF(HG1>=3 AND HEA,IF(HEA AND REF(HIGH,HG2)<=REF(HIGH,BARSLAST(HJS)),BARSLAST(HJS),HG2),0);
HJA:=HGA+HG3+HGG;
HJB:=BACKSET(HEA,HJA);
HJJ:=HJB>REF(HJB,1);
HD:=BACKSET(HJJ,2);
UU:=HD>REF(HD,1);
VV:=BACKSET(ISLASTBAR,BARSLAST(LD1)+1);
WW:=VV>REF(VV,1);
XX:=BACKSET(WW,REF(BARSLAST(LD1),1)+2);
UU2:=XX>REF(XX,1);
VV2:=BACKSET(ISLASTBAR,BARSLAST(UU)+1);
WW2:=VV2>REF(VV2,1);
XX2:=BACKSET(WW2,REF(BARSLAST(UU),1)+2);
XL1:=XX2>REF(XX2,1);
DRAWLINE(UU2,MACD,WW,MACD,1),POINTDOT,color99;
DRAWLINE(XL1,MACD,WW2,MACD,2),POINTDOT,colorFF;
XPL1:=BACKSET(UU2,REF(BARSLAST(LD1),1)+2);
XD1:=XPL1>REF(XPL1,1);
XPD1:=BACKSET(XL1,REF(BARSLAST(UU),1)+2);
XD2:=XPD1>REF(XPD1,1);
XPD2:=BACKSET(XD2,REF(BARSLAST(UU),1)+2);
早晨之星:=XPD2>REF(XPD2,1);
DRAWICON(XD2,MACD,10),ALIGN0;
DRAWICON(早晨之星,MACD,10),ALIGN0;
DRAWICON(XL1,MACD,10),ALIGN0;
DRAWICON(UU2,MACD,11),ALIGN0;
DRAWICON(WW2,MACD,10),ALIGN0;
DRAWICON(WW,MACD,11),ALIGN0;
DRAWICON(XD1,MACD,11),ALIGN0;
DRAWLINE(XD2,MACD,XL1,MACD,1),color222222;
DRAWLINE(XD1,MACD,UU2,MACD,1),color990033;
周金▲:DRAWTEXT(CROSS("MACD.DIFF#week"(26,12,9),"MACD.DEA#week"(26,12,9)),"MACD.MACD#week"(26,12,9),'▲周macd'),colorFF;
周死▼:DRAWTEXT(CROSS("MACD.DEA#week"(26,12,9),"MACD.DIFF#week"(26,12,9)),"MACD.MACD#week"(26,12,9),'▼周macd'),color660033;
月金▲:DRAWTEXT(CROSS("MACD.DIFF#MONTH"(26,12,9),"MACD.DEA#MONTH"(26,12,9)),"MACD.MACD#MONTH"(26,12,9),'▲月macd'),colorFF00FF;
月死▼:DRAWTEXT(CROSS("MACD.DEA#MONTH"(26,12,9),"MACD.DIFF#MONTH"(26,12,9)),"MACD.MACD#MONTH"(26,12,9),'▼月macd'),color3366;
DRAWTEXT(CROSS("KDJ.K#week"(9,3,3),"KDJ.D#week"(9,3,3)),"KDJ.K#week"(9,3,3),'▲周KDJ'),colorFF;
DRAWTEXT(CROSS("KDJ.D#week"(9,3,3),"KDJ.K#week"(9,3,3)),"KDJ.K#week"(9,3,3),'▼周KDJ'),color660033;
DRAWTEXT(CROSS("KDJ.K#MONTH"(9,3,3),"KDJ.D#MONTH"(9,3,3)),"KDJ.K#MONTH"(9,3,3),'▲月KDJ'),colorFF00FF;
DRAWTEXT(CROSS("KDJ.D#MONTH"(9,3,3),"KDJ.K#MONTH"(9,3,3)),"KDJ.K#MONTH"(9,3,3),'▼月KDJ'),color3366;
黄昏之星:=REF(CLOSE,2)/REF(OPEN,2)<0.95 AND REF(OPEN,1)<REF(CLOSE,2) AND (ABS(REF(OPEN,1)-REF(CLOSE,1)))/REF(CLOSE,1)<0.03 AND CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2);
长十字:=REF(CLOSE,2)/REF(OPEN,2)>1.03 AND REF(OPEN,1)>REF(CLOSE,2) AND (ABS(REF(OPEN,1)-REF(CLOSE,1)))/REF(CLOSE,1)<0.02 AND CLOSE/OPEN<0.97 AND CLOSE<REF(CLOSE,2);
垂死十字:=CLOSE=OPEN AND HIGH/LOW>1.03;
早晨十字星:=CLOSE=OPEN AND CLOSE=LOW AND CLOSE<>HIGH;
黄昏十字星:=REF(CLOSE,2)/REF(OPEN,2)<0.95 AND REF(OPEN,1)<REF(CLOSE,2) AND REF(OPEN,1 |