妖周引用MACD 源码如下:
DRAWGBK(OPEN>0,RGB(0,0,0),RGB(33,47,58),0,6,0);周K:="MACD.DIF#WEEK"(12,26,9),NODRAW;
周D:="MACD.DEA#WEEK"(12,26,9),NODRAW;
DRAWBAND(周K,RGB(150,0,150),周D,RGB(0,100,200));
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9),COLORWHITE;
MACD:(DIF-DEA)*2,COLORSTICK;
金叉CORO:=CROSS(DIF,DEA);
DRAWICON(金叉CORO,DIF,1);
VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5);
QG:=DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1);
W3:STICKLINE(MACD>QG,MACD,QG,1,0),COLORYELLOW;
入1:=IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK2;
入2:=IF(DIF<REF(DIF,1),DIF,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWTEXT(REF(MACD,1)>0 AND MACD<0,MACD-0.01,'1')COLORCDCDB4
;
DRAWTEXT(REF(MACD,2)>0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'2')COLORCDCDB4
;
DRAWTEXT(REF(MACD,3)>0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'3')COLORCDCDB4
;
DRAWTEXT(REF(MACD,4)>0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'4')COLORCDCDB4
;
DRAWTEXT(REF(MACD,5)>0 AND REF(MACD,4)<0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'5')COLORCDCDB4
;
DRAWTEXT(REF(MACD,6)>0 AND REF(MACD,5)<0 AND REF(MACD,4)<0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'6')COLORCDCDB4
;
DRAWTEXT(REF(MACD,1)<0 AND MACD>0,MACD-0.01,'1')COLORRED;
DRAWTEXT(REF(MACD,2)<0 AND REF(MACD,1)>0 AND MACD>0,MACD-0.01,'2')COLORRED;
DRAWTEXT(REF(MACD,3)<0 AND REF(MACD,2)>0 AND REF(MACD,1)>0 AND MACD>0,MACD-0.01,'3')COLORRED;
DRAWTEXT(REF(MACD,4)<0 AND REF(MACD,3)>0 AND REF(MACD,2)>0 AND REF(MACD,1)>0 AND MACD>0,MACD-0.01,'4')COLORRED;
DRAWTEXT(REF(MACD,5)<0 AND REF(MACD,4)>0 AND REF(MACD,3)>0 AND REF(MACD,2)>0 AND REF(MACD,1)>0 AND MACD>0,MACD-0.01,'5')COLORRED;
DRAWTEXT(REF(MACD,6)<0 AND REF(MACD,5)>0 AND REF(MACD,4)>0 AND REF(MACD,3)>0 AND REF(MACD,2)>0 AND REF(MACD,1)>0 AND MACD>0,MACD-0.01,'6')COLORRED;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA21:=MA(C,21);
MA60:=MA(C,60);
B3:=MAX(MA(C,5),MAX(MA(C,10), MA(C,20)));
B31:=MIN(MA(C,5),MIN(MA(C,10), MA(C,20)));
A3:=C>B3 AND L<B31 AND C>REF(C,1) AND C>O;
强势:= C/REF(C,1)>1.07;
涨幅:=IF(C>1.07*REF(C,1),1,0);
均价:=(HIGH+LOW+OPEN+CLOSE)/4;
分水岭:=MA(3*均价-2*SMA(均价,2,1),12);
P:=1;
A01:=(C-LLV(LOW,3))/(HHV(HIGH,3)-LLV(LOW,3));
A11:=SMA(A01,2,1);
A21:=SMA(A11,2,1);
A31:=3*A11-2*A21 ;
A41:=2*A31-0.5;
乾坤线:=C*(1-(A41-A21)/15);
A:=(L+H)/2;
VARR2:=(H+L+O+2*C)/5;
CHH低吸线:=EMA(SLOPE(VARR2,21)*20+VARR2,55);
BB:=LLV(H,1);
逃顶线:=FORCAST(FORCAST(BB,15),15);
做多趋势:=IF(均价>分水岭,均价,分水岭);
支撑:=REVERSE(做多趋势)+2*分水岭;
FF:=EMA(CLOSE,3);
VAR1:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;
VAR2:=SMA(VAR1,9,1)+100;
VAR3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR4:=SMA(VAR3,3,1);
VAR5:=SMA(VAR4,3,1)+100;
VAR6:=VAR5-VAR2;
动能:=IF(VAR6>45,VAR6-45,0);
MA15:=EMA(CLOSE,21);
建仓1:=((CROSS(FF,MA15) AND CROSS(C,分水岭) AND CROSS(C,逃顶线) AND
CROSS(C,乾坤线) AND O>支撑) OR (CROSS(FF,MA15) AND 涨幅) OR
(CROSS(FF,MA15) AND (CROSS(H,乾坤线) OR CROSS(H,逃顶线) OR CROSS(H,分水岭) AND 涨幅))) AND 强势
,COLORYELLOW;
主力建仓:IF(建仓1>0,建仓1,0),COLORYELLOW,NODRAW;
STICKLINE(建仓1>0,0,建仓1*0.375,3,0),COLORYELLOW;
DRAWTEXT(建仓1>0,建仓1*0.375,'主力建仓'),COLORYELLOW;
AA:=IF(NAMELIKE('ST'),0,1) AND IF(NAMELIKE('*ST'),0,1);
GH1:=ABS(((3.48*CLOSE+HIGH+LOW)/4-EMA(CLOSE,20))/EMA(CLOSE,20));
GH2:=DMA(((2.11*CLOSE+LOW+HIGH)/4),GH1);
GHH:=EMA(GH2,200)*1.118;
GH3:=(MA(C,3));
GH4:=(MA(C,5));
GH5:=(MA(C,8));
GH6:=(MA(C,13));
GH7:=(((((MA(C,3)) > (REF(MA(C,3),1))) AND ((MA(C,5)) > (REF(MA(C,5),1)))) AND (C > (MA(C,3)))) AND ((MA(C,3)) > (MA(C,5))));
GH8:=(((ATAN(((GH3 / (REF(GH3,1))) - 1) * 100)) * 180) / (3.1416));
GH9:=(((ATAN(((GH4 / (REF(GH4,1))) - 1) * 100)) * 180) / (3.1416));
GH10:=(((ATAN(((GH5 / (REF(GH5,1))) - 1) * 100)) * 180) / (3.1416));
GH11:=(((ATAN(((GH6 / (REF(GH6,1))) - 1) * 100)) * 180) / (3.1416));
GH12:=IF(GH7 AND GH8>45 AND GH9>45 AND GH10>60 AND GH11>45 AND MA(C,250)>REF(MA(C,250),1),1,0);
乘胜追击:GH12 AND SUM(GH12,2)=1 AND C/GHH>1.03 AND C/GHH<1.2,NODRAW;
STICKLINE(乘胜追击,0,乘胜追击*0.125,3,0), COLORGREEN;
STICKLINE(乘胜追击,乘胜追击*0.25,乘胜追击*0.125,2,0),COLORYELLOW;
STICKLINE(乘胜追击,乘胜追击*0.25,乘胜追击*0.375,1,0), COLORMAGENTA;
妖股炸裂主图源码:
中轴:=MA(C,21),COLORFFCC33;
压力:=中轴 + 2*STD(C,21),COLORRED,LINETHICK2;
支撑:=中轴 - 2*STD(C,21),COLORRED,LINETHICK2;
压力1:=CONST(HHV(压力,60));
支撑1:=CONST(LLV(支撑,60));
TT:=IF(ISLASTBAR,240/FROMOPEN,1);
NN:=30;
最高2:=CONST(HHV(H,NN));
最低2:=CONST(LLV(L,NN));
PP:=IF((最高2*0.9-(最高2-最低2)*0.5)>CONST(LLV(L,20)),0.9,IF((最高2*0.9-(最高2-最低2)*0.5)>CONST(LLV(L,50)),0.7,0.6)),NODRAW;
RCC1:=最高2*0.9-(最高2-最低2)*PP;
最低R:=MIN(RCC1,最低2);
高:=MAX(最高2,压力1);
低:=MIN(最低R,支撑1);
差:=(高-低);
色彩峰:=高-低;
STICKLINE(色彩峰>0,低,低+色彩峰*1.02,10,0),COLOR00AAC0;
STICKLINE(色彩峰>0,低,低+色彩峰*0.92,10,0),COLOR0099B0;
STICKLINE(色彩峰>0,低,低+色彩峰*0.85,10,0),COLOR0088A0;
STICKLINE(色彩峰>0,低,低+色彩峰*0.8,10,0),COLOR007790;
STICKLINE(色彩峰>0,低,低+色彩峰*0.75,10,0),COLOR006680;
STICKLINE(色彩峰>0,低,低+色彩峰*0.7,10,0),COLOR005570;
STICKLINE(色彩峰>0,低,低+色彩峰*0.65,10,0),COLOR004460;
STICKLINE(色彩峰>0,低,低+色彩峰*0.6,10,0),COLOR003350;
STICKLINE(色彩峰>0,低,低+色彩峰*0.55,10,0),COLOR002240;
STICKLINE(色彩峰>0,低,低+色彩峰*0.5,10,0),COLOR001130;
STICKLINE(色彩峰>0,低,低+色彩峰*0.45,10,0),COLOR000020;
A:=EMA((EMA(C,29)+EMA(C,31)+EMA(C,33))/3,3);
A99:=EMA((EMA(C,17)+EMA(C,19)+EMA( C,21))/3,3),COLOR1090FF;
A233:=A-(A99-A),COLORFF9010;
DRAWBAND(A99,RGB(130,100,50),A,RGB(130,100,50));
DRAWBAND(A,RGB(110,130,80),A233,RGB(110,130,80));
中轴 + 2*STD(C,21),COLORRED,LINETHICK2;
中轴 - 2*STD(C,21),COLORRED,LINETHICK2;
A1:EMA((EMA(C,1)+EMA(C,3)+EMA(C,5))/3,3),COLOR1010FF;
A2:=EMA((EMA(C,3)+EMA(C,5)+EMA( C,7))/3,3),COLOR1020FF;
A3:EMA((EMA(C,5)+EMA(C,7)+EMA( C,9))/3,3),COLOR1030FF;
A4:=EMA((EMA(C,7)+EMA(C,9)+EMA( C,11))/3,3),COLOR1040FF;
A5:EMA((EMA(C,9)+EMA(C,11)+EMA( C,13))/3,3),COLOR1050FF;
A6:=EMA((EMA(C,11)+EMA(C,13)+EMA( C,15))/3,3),COLOR1060FF;
A7:EMA((EMA(C,13)+EMA(C,15)+EMA( C,17))/3,3),COLOR1070FF;
A8:=EMA((EMA(C,15)+EMA(C,17)+EMA( C,19))/3,3),COLOR1080FF;
A9:EMA((EMA(C,17)+EMA(C,19)+EMA( C,21))/3,3),COLOR1090FF;
A10:=EMA((EMA(C,19)+EMA(C,21)+EMA( C,23))/3,3),COLOR10C0FF;
A11:EMA((EMA(C,21)+EMA(C,23)+EMA( C,25))/3,3),COLOR10E0FF;
A15:A-(A1-A*0.997),COLORFF1010;
A16:=A-(A2-A),COLORFF2010;
A17:A-(A3-A),COLORFF3010;
A18:=A-(A4-A),COLORFF4010;
A19:A-(A5-A),COLORFF5010;
A20:=A-(A6-A),COLORFF6010;
A21:A-(A7-A),COLORFF7010;
A22:=A-(A8-A),COLORFF8010;
A23:A-(A9-A),COLORFF9010;
A24:=A-(A10-A),COLORFFC010;
A25:A-(A11-A*0.997),COLORFFE010;
IF(A15<A11,A15,A11),COLORFF1010;
IF(A17<A9,A17,A9),COLORFF3010;
IF(A19<A7,A19,A7),COLORFF5010;
IF(A21<A5,A21,A5),COLORFF7010;
IF(A23<A3,A23,A3),COLORFF9010;
IF(A25<A1,A25,A1),COLORFFE010;
IF(A1<A25,A1,A25),COLOR1010FF;
IF(A3<A23,A3,A23),COLOR1030FF;
IF(A5<A21,A5,A21),COLOR1050FF;
IF(A7<A19,A7,A19),COLOR1070FF;
IF(A9<A17,A9,A17),COLOR1090FF;
IF(A11<A15,A11,A15),COLOR10E0FF;
DRAWTEXT(C>=MA(C,20) ,MA(C,20) ,'◎' ),COLOR0000FF;
DRAWTEXT(C<MA(C,20) ,MA(C,20) ,'◎' ),COLOR00FF00;
FD:=(H-L)/3;
OPEN1:=O>FD*2+L;
OPEN3:=O<FD+L;
OPEN2:=NOT(OPEN1 OR OPEN3);
CLOSE1:=C>FD*2+L;
CLOSE3:=C<FD+L;
CLOSE2:=NOT(CLOSE1 OR CLOSE3);
DFZD:=CLOSE1 OR (OPEN3 AND CLOSE2);
WQS1:=OPEN2 AND CLOSE2;
KFZD:=NOT(DFZD OR WQS1);
ZD:=(H+L)/2;
QSXS:=ZD>REF(H,1);
QSXX:=ZD<REF(L,1);
WQS2:=NOT(QSXS OR QSXX);
ZTDL:=V>REF(V,1)*1.1;
FTDL:=V<REF(V,1)*0.7;
ZTDL2:=ZTDL AND FTDL<1;
FTDL2:=FTDL AND ZTDL<1;
MFI1:=(H-L)/(V/10000);
MFI2:=(H-L)/(V/1000000);
ZMFI1:=MFI1>REF(MFI1,1);
ZMFI2:=MFI2>REF(MFI2,1);
ZMFI:=ZMFI1 OR ZMFI2;
FMFI:=NOT(ZMFI);
LD:=ZTDL2 AND ZMFI;
ST:=FTDL2 AND FMFI;
WZ:=FTDL2 AND ZMFI;
QF:=ZTDL2 AND FMFI;
S1:=DFZD AND QSXS ;
S2:=KFZD AND QSXX ;
S3:=DFZD AND QSXX;
S4:=KFZD AND QSXS;
S5:=DFZD AND WQS2;
S6:=KFZD AND WQS2;
S7:=WQS1 AND (QSXS OR QSXX OR WQS2);
DRAWKLINE(H,O,L,C);
STICKLINE(S2 ,C ,O,3,0 ),COLORFF2020;
STICKLINE(S1,C,O,3 ,0 ),COLOR2020FF;
STICKLINE(S3,C,O,3,0),COLORYELLOW;
STICKLINE(S4,C,O,3,0),COLORFFCC66;
STICKLINE(S5,C,O,3,0),COLORFF00FF;
STICKLINE(S6,C,O,3,0),COLOR00FF00;
STICKLINE(S7,C,O,3,0),COLORGRAY;
STICKLINE(1,C,O,0,0),COLOREEEEEE;
炸裂能量源码如下:
DRAWGBK(OPEN>0,RGB(0,0,0),RGB(33,47,58),0,6,0);
获利30:=10*WINNER(CLOSE*0.9*0.9*0.9),COLORYELLOW;
STICKLINE(获利30>=2,0,-获利30/20,8,0),COLORRED;
换手:=V*100/CAPITAL;
主力:=MA(换手,4);
大户:=MA(换手,9);
中户:=MA(换手,17);
散户:=MA(换手,34);
均量:=(主力+大户+中户+散户)/4;
主力能量:=(主力-均量);
操盘:STICKLINE(主力能量>=0 AND 主力能量>=REF(主力能量,1),0+2.2,主力能量/5+2.2,3,3),COLORRED;
减仓:STICKLINE(主力能量>=0 AND 主力能量< REF(主力能量,1),0+2.2,主力能量/5+2.2,3,3),COLORYELLOW;
反弹:STICKLINE(主力能量<0 AND 主力能量>=REF(主力能量,1),0+2.2,主力能量/5+2.2,3,0),COLORGREEN;
寻底:STICKLINE(主力能量<0 AND 主力能量< REF(主力能量,1),0+2.2,主力能量/5+2.2,3,3),COLORGREEN;
ACB1:=CLOSE/REF(CLOSE,1)>=1.098;
ACB22:=COUNT(ACB1,2)>=1 AND NOT(COUNT(ACB1,3)>=2);
炸裂能量:FILTER(ACB22,13),COLORDDDDDD;
DRAWICON(炸裂能量,1.01,5);
ACB23:=COUNT(ACB1,3)>=2 AND NOT(COUNT(ACB1,4)>=3);
妖股大龙:FILTER(ACB23,13),COLORGREEN;
ACB24:=COUNT(ACB1,4)>=3 AND NOT(COUNT(ACB1,5)>=4);
妖股翱翔:FILTER(ACB24,11),COLOR9933FF;
妖股决战:COUNT(ACB1,8)>=6.5,COLORRED;
STICKLINE(炸裂能量 AND COUNT(炸裂能量,18)=1,0,2,3,0),COLORDDDDDD;
STICKLINE(妖股大龙 AND COUNT(妖股大龙,18)=1,0,2,3,0),COLORGREEN;
STICKLINE(妖股翱翔 AND COUNT(妖股大龙,18)=1,0,1,3,0),COLOR9933FF;
STICKLINE(妖股决战 AND COUNT(妖股大龙,18)=1,0,1
,3,0),COLORRED;
ABC3:=MA(CLOSE,13);
ABC4:=100-ABS((CLOSE-ABC3)/ABC3*100);
筹码:=MA(WINNER(CLOSE*0.95)*100,1),COLORRED;
CBAD:=筹码>ABC4;
DRAWNUMBER(CBAD AND ABC4>REF(ABC4,1) AND REF(CBAD,1)>0,(ABC4+20-30)/80-1.2,ROUND(ABC4)) COLORCYAN;
DRAWNUMBER(CBAD,(ABC4+20-30)/80-1.2,ROUND(ABC4)) COLORCYAN;
STICKLINE(CBAD,(ABC4-30)/80-1.2,5/80-1.2,2,0),COLORMAGENTA;
STICKLINE(CBAD AND ABC4>REF(ABC4,1) AND REF(CBAD,1)>0,(ABC4-30)/80-1.2,5/80-1.2,2,0),COLORGREEN;
DRAWTEXT(CBAD AND ABC4>REF(ABC4,1) AND REF(CBAD,1)>0,(ABC4+30-30)/80-1.2,'风险'),COLORGREEN;
DRAWTEXT(CBAD AND ABC4>REF(ABC4,1) AND REF(CBAD,1)>0,(ABC4+60-30)/80-1.2,'注意'),COLORGREEN;
FFD:=EMA((C - REF(C,1)) / REF(C,3),10) * 100;
KJHU:=EMA(EMA(EMA(EMA(FFD,2),2),2),3);
A1:=SMA(MAX(C - REF(C,1),0),24,1) / SMA(ABS(C - REF(C,1)),24,1) * 100;
龙头启动:=(A1 > 65) * (A1 - 65) / 10 + 2,LINETHICK0;
控盘度:=CYW / 100,COLORSTICK,LINETHICK2,COLORRED;
STICKLINE(KJHU >= REF(KJHU,1) AND FFD>2,2.2,2.05,2,0),COLORRED;
STICKLINE(KJHU < REF(KJHU,1) AND KJHU > EMA(KJHU,4) AND FFD>2,2.2,2.05,2,0),COLOR00BBFF;
STICKLINE(KJHU < REF(KJHU,1) AND KJHU < EMA(KJHU,4) AND FFD>2,2.2,2.05,2,0),COLORGREEN;
DRAWTEXT(ISLASTBAR, 2.2,' 机构持仓'),COLORFF00FF;