主图
主线:=(MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24)+MA(CLOSE,36))/4,COLORFF00FF,LINETHICK2;
股价重心:=DMA(AMOUNT/VOL/100,VOL/CAPITAL),COLORGREEN,LINETHICK2;
MA14:=EMA(CLOSE,14);
MA34:=EMA(CLOSE,26);
MA54:=EMA(CLOSE,54);
MA90:=EMA(CLOSE,90);
MA120:EMA(CLOSE,120),POINTDOT,LINETHICK2,COLORWHITE;
年线:EMA(C,250),COLORYELLOW,LINETHICK2;
{中短波}
HZ:=EMA(CLOSE,13);
短波:EMA(HZ,1),COLOR00DD00,LINETHICK1;
中波:EMA(HZ,26),COLORRED,LINETHICK1;
均线148天:=EMA(C,148),POINTDOT,LINETHICK1,COLORGREEN;
成本:=SUM(AMOUNT,0)/SUM(VOL,0)/100,COLORYELLOW ,LINETHICK2 ;
HZ2:EMA(HZ,8),COLORGREEN,LINETHICK2;
HZ4:EMA(HZ,39),COLORFF00FF,LINETHICK2;
A1:STICKLINE(HZ2<HZ4,短波,HZ4,0.1,0),COLORBLUE ;
A2:STICKLINE(短波>HZ2,短波,HZ2,0.1,0),COLORGREEN;
A3:STICKLINE(中波>HZ4,中波,HZ4,0.1,0),COLORFF00FF;
{慢速KDJ}
RSV:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
FASTK:=SMA(RSV,12,1);
K:=SMA(FASTK,9,1),COLORYELLOW;
D:=SMA(K,3,1),LINETHICK2,COLORBLUE;
J:=3*K-2*D,LINETHICK1,COLORGREEN;
{中波}
VAR11:=3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)-2*SMA(SMA((CLOSE-LLV(LOW,75))
/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR22:=100-VAR11;
中势线:=(-1)*(EMA(VAR22,1)-50)+42,COLORYELLOW,LINETHICK2;
TZ:=(CLOSE-LLV(LOW,331))/(HHV(HIGH,331)-LLV(LOW,331))*100;
强势线:=SMA(TZ,5,1),LINETHICK2,COLORRED;
大盘线:=70*(HHV(HIGH,39)-CLOSE)/(HHV(HIGH,39)-LLV(LOW,39)),COLOR009900,LINETHICK1;
{量选}
AA:=VOL/SUM(VOL,13);
BB:=DMA(C,AA);
CC:=VOL/SUM(VOL,34);
DD:=DMA(C,CC);
{背离}
VAR00:=WINNER(CLOSE);
VAR1:=FORCAST(VAR00,10);
VAR2:=MA(VAR1,3);
VAR3:=MA(VAR2,12);
VAR4:=MA(VAR3,16);
VAR5:=MA(VAR4,31);
VAR6:=MA(VAR5,55);
VAR7:=VAR5;
VAR8:=VAR4>VAR2*1.11 AND VAR3>VAR2*1.095;
A:=VAR4/VAR2;
B:=VAR3/VAR2;
VAR9:=VAR2>VAR1*0.95;
TD:=VAR2/VAR1;
VAR1H:=INDEXC;
VAR2H:=MA(VAR1H,6);
VAR3H:=MA(VAR1H,24);
VAR4H:=MA(VAR1H,32);
VAR5H:=MA(VAR1H,62);
VAR6H:=MA(VAR1H,105);
VAR7H:=VAR5H;
VAR8H:=VAR4H>VAR2H*1.11 AND VAR3H>VAR2H*1.095;
VAR9H:=VAR2H>VAR1H*0.95;
PT:=(IF(H=L AND C=O AND L=C AND C>0 AND REF(H,1)=REF(L,1) AND REF(C,1)=REF(O,1)
AND REF(H,1)=REF(C,1) AND REF(C,1)>0,0,1))>0;
G:=(VAR7H AND VAR8H AND VAR9H AND CLOSE/COST(8)<=0.7985
AND (COUNT(C=L,4)<3 OR C>REF(C,1)))AND PT OR
VAR7 AND VAR8 AND VAR9 AND CLOSE/COST(5)<=0.8 AND
((VAR1>OPEN OR VAR1>REF(OPEN,1) OR
REF(VAR1,1)));
背离:=VAR2<REF(VAR2,1) AND A>REF(A,1);
买入信号1:=VAR1>A AND VAR2>B;
买入信号2:=B>A AND 1>B AND A<1 AND H=HHV(H,21);
BUY2:=COUNT(背离,20)>1 AND 买入信号2=1 AND C>O OR CROSS(BB,DD);
DRAWICON(CROSS(短波,HZ2),中波-0.08,9);
DRAWTEXT(CROSS(短波,HZ2) AND C>O AND J>K AND J>D AND 大盘线<36 AND C>HZ4,L*1.09,'●'),COLORYELLOW;
DRAWTEXT(CROSS(短波,HZ2) AND C>O AND J>K AND J>D AND 大盘线<36 AND C>HZ4,L*1.12,'做趋势'), COLORYELLOW;
DRAWTEXT(CROSS(短波,HZ2),C,'♂');
DRAWTEXT(CROSS ( 中波,HZ4),C,'♂');
DRAWTEXT(CROSS ( 中波,MA120),C,'♂');
DRAWTEXT(CROSS (HZ4,MA120),C,'♂');
副图1
参数 P1 1 100 90
F:=COST(5);
J:=COST(95);
M:=COST(15);
N:=COST(85);
获利比例:WINNER(CLOSE)*100,NODRAW;
STICKLINE(获利比例,获利比例,0,2,1),COLORLIGRAY;
STICKLINE(获利比例>=70,获利比例,0,1,0),COLORLIGRAY;
STICKLINE(获利比例>=80,获利比例,0,1,0),COLORGREEN;
STICKLINE(获利比例>=90,获利比例,0,1,0),COLORRED;
A:=P1+(100-P1)/2;
B:=(100-P1)/2;
CC:=COST(A);
DD:=COST(B);
筹码集中度:(CC-DD)/(CC+DD)*100,NODRAW;
STICKLINE(筹码集中度<=10,获利比例/2,0,1,0),COLORYELLOW;
DRAWTEXT_FIX(1,0.1,0,0,'使用方法'),COLORYELLOW;
DRAWTEXT_FIX(1,0.005,0.1,0,'【1】灰色空心柱代表获利比例,其长短代表获利比例的大小'),COLORCYAN;
DRAWTEXT_FIX(1,0.005,0.2,0,'【2】灰色实柱代表获利比例在70%~80%之间,预备阶段'),COLORCYAN;
DRAWTEXT_FIX(1,0.005,0.3,0,'【3】绿色实柱代表获利比例在80%~90%之间,具备走牛条件'),COLORGREEN;
DRAWTEXT_FIX(1,0.005,0.4,0,'【4】红色实柱代表获利比例在90%以上,拉升阶段'),COLORRED;
DRAWTEXT_FIX(1,0.005,0.5,0,'【5】黄色实柱代表筹码集中度小于10,具备走牛条件'),COLORYELLOW;
DRAWTEXT_FIX(1,0.005,0.6,0,'【6】黄色+不同颜色混合柱代表二者特性兼有'),COLORMAGENTA;
副图2
GL:=IF(NAMELIKE('ST') OR NAMELIKE('*ST'),0,1) AND IF(CODELIKE('688'),0,1);
JJ:=(H+L+C)/3;
AD0:=VOL/IF(H=L,4,H-L);
J:="KDJ.J";
AD1:=IF(CAPITAL=0,AD0*(JJ-MIN(C,O)),AD0*(MIN(O,C)-L));
AD2:=IF(CAPITAL=0,AD0*(MIN(O,C)-L),AD0*(JJ-MIN(C,O)));
AD3:=AD0*(H-MAX(O,C));
AD4:=AD0*(MAX(C,O)-JJ);
AD5:=AD1+AD2;
AD6:=AD3+AD4;
YF:=(AD5-AD6)/(AD5+AD6)*100;
YF1:=((AD1+AD2)-(AD3+AD4))/SUM(VOL,10)*100;
YF2:=YF*17;
YF3:=((AD2+AD4)-(AD1+AD3))/SUM(VOL,10)*100;
XG1:=CROSS(J,0) AND ((YF1>0 AND YF3>0) OR YF2>400);
VAR1:=LLV(LOW,13);
VAR2:=HHV(HIGH,13);
VAR3:=SMA((CLOSE-VAR1)/(VAR2-VAR1)*100,5,1);
VAR4:=SMA((VAR2-CLOSE)/(VAR2-VAR1)*100,5,1);
VAR5:=SMA(MAX(CLOSE-REF(CLOSE,1),0),5,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),5,1)*100;
XG2:=CROSS(EMA(VAR5,3), VAR3) AND VAR4>65;
XG3:=CROSS(0.9,1/VOL*1000>0.01 AND "KDJ.J"<0);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
XG4:=MACD>REF(MACD,1);
XG:=XG1 AND XG2 AND XG3 AND C>REF(C,1) AND GL AND XG4;
{-----------------------------------------}
STICKLINE(XG=1,0,1,4.0,0),COLORFFBBFF;
STICKLINE(XG=1,0,1,3.5,0),COLORFF00FF;
STICKLINE(XG=1,0,1,3.0,0),COLORFF22FF;
STICKLINE(XG=1,0,1,2.5,0),COLORFF44FF;
STICKLINE(XG=1,0,1,2.0,0),COLORFF66FF;
STICKLINE(XG=1,0,1,1.5,0),COLORFF88FF;
STICKLINE(XG=1,0,1,1.0,0),COLORFF99FF;
STICKLINE(XG=1,0,1,0.5,0),COLORFFAAFF;
{----------------------------------------}
DRAWTEXT(XG=1,0.8,' 小试'),COLORYELLOW;
副图3
DIFF: EMA(CLOSE,12) - EMA(CLOSE,26);
DEA: EMA(DIFF,9);
MACD: 2*(DIFF-DEA), COLORSTICK;
STICKLINE(MACD>0,MACD,0,2,1),COLOR0000DC;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,2,1),COLOR00B400;
STICKLINE(MACD<=0,MACD,0,2,1),COLORGRAY;
STICKLINE(MACD<=0 AND MACD>REF(MACD,1),MACD,0,2,1),COLORC800C8;
XX0:=BARSLAST((CROSS(MACD,REF(MACD,1)) AND MACD>0) OR CROSS(MACD,0));
XX1:=BARSLAST(CROSS(0.5,COUNT(MACD>REF(MACD,1),XX0+1)=XX0+1));{回}
XX2:=COUNT(MACD<REF(MACD,1),XX1+1)=XX1+1 AND COUNT(MACD<0,XX1+1)<=2;
XX3:=REF(XX2,1) AND MACD>REF(MACD,1) AND C>O AND C>REF(C,1);
STICKLINE(XX1=0 AND MACD>0,MACD,0,2,0),COLORDCDC00;
STICKLINE(XX3,MACD,0,2,0),COLOR0854FF;
ER:=VOL/CAPITAL*100;
ZD:=C/REF(C,1)*100-100;
AA0:=BARSLAST(CROSS(0.5,COUNT(MACD<0,3)>=3) AND (MACD>=1 OR DIFF>=2));
AA1:=CROSS(0.5,COUNT(MACD>REF(MACD,1),AA0+1)=AA0+1);
AA2:=REF(HHV(ER,AA0+1),1)>=3 AND REF(HHV(ZD,AA0+3),1)>=5;
BB0:=BARSLAST(AA1 AND AA2);
BB1:=COUNT(MACD<REF(MACD,1),BB0+1)=BB0+1;
BB2:=COUNT(MACD<0,BB0+1)<=2 AND (COUNT(C<O AND ZD<0,2)=2 OR BB0>=1);
BB3:=BB1 AND BB2;
BB4:=REF(BB3,1) AND MACD>REF(MACD,1) AND C>O AND ZD>0;
DRAWBAND(DIFF,RGB(200,50,55),DEA,RGB(50,100,10));
TRIX:=(DIFF-REF(DIFF,1))/REF(DIFF,1)*100;
J1:=0.7*(26-12)/2*EMA((C-REF(C,1)),12);
J2:EMA(EMA(J1,3),3);
J3:EMA(J1,3);
DRAWBAND(J3,RGB(155,50,50),J2,RGB(0,100,50));
JC:CROSS(DIFF,DEA) ,NODRAW;
DRAWICON(JC,DIFF*0.9,1);
副图4
换手率%:100*VOL/(FINANCE(7)/100),NODRAW,COLORYELLOW;
低迷:IF(换手率%<=1,换手率%,DRAWNULL),NODRAW,COLORFF9900;
温和放量:IF(换手率%>1 AND 换手率%<=3,换手率%,DRAWNULL),NODRAW,COLORBBBBBB;
异动:IF(换手率%>3 AND 换手率%<=5,换手率%,DRAWNULL),NODRAW;
活跃:IF(换手率%>5 AND 换手率%<=8,换手率%,DRAWNULL),NODRAW,COLORMAGENTA;
非常活跃:IF(换手率%>8 AND 换手率%<=10,换手率%,DRAWNULL),NODRAW,COLORYELLOW;
高度活跃:IF(换手率%>10 AND 换手率%<=15,换手率%,DRAWNULL),NODRAW,COLOR0077FF;
极度活跃:IF(换手率%>15 AND 换手率%<=25,换手率%,DRAWNULL),NODRAW,COLORRED;
巨量换手:IF(换手率%>25,换手率%,DRAWNULL),NODRAW,COLOR000099;
STICKLINE(低迷,换手率%,0,2.8,0),COLORBLUE;
STICKLINE(低迷,换手率%,0,2.3,0),COLORFF3300;
STICKLINE(低迷,换手率%,0,1.7,0),COLORFF5500;
STICKLINE(低迷,换手率%,0,1,0),COLORFF7700;
STICKLINE(低迷,换手率%,0,0.3,0),COLORFF9900;
STICKLINE(温和放量,换手率%,0,2.8,0),COLOR555555;
STICKLINE(温和放量,换手率%,0,2.3,0),COLOR777777;
STICKLINE(温和放量,换手率%,0,1.7,0),COLOR999999;
STICKLINE(温和放量,换手率%,0,1,0),COLORBBBBBB;
STICKLINE(温和放量,换手率%,0,0.3,0),COLORMAGENTA;
STICKLINE(异动,换手率%,0,2.8,0),COLOR004400;
STICKLINE(异动,换手率%,0,2.3,0),COLOR006600;
STICKLINE(异动,换手率%,0,1.7,0),COLOR009900;
STICKLINE(异动,换手率%,0,1,0),COLOR00CC00;
STICKLINE(异动,换手率%,0,0.3,0),COLORGREEN;
STICKLINE(活跃,换手率%,0,2.8,0),COLOR880088;
STICKLINE(活跃,换手率%,0,2.3,0),COLORAA00AA;
STICKLINE(活跃,换手率%,0,1.7,0),COLORCC00CC;
STICKLINE(活跃,换手率%,0,1,0),COLOREE00EE;
STICKLINE(活跃,换手率%,0,0.3,0),COLORFF33FF;
STICKLINE(非常活跃,换手率%,0,2.8,0),COLOR008888;
STICKLINE(非常活跃,换手率%,0,2.3,0),COLOR00AAAA;
STICKLINE(非常活跃,换手率%,0,1.7,0),COLOR00CCCC;
STICKLINE(非常活跃,换手率%,0,1,0),COLOR00EEEE;
STICKLINE(非常活跃,换手率%,0,0.3,0),COLOR44FFFF;
STICKLINE(高度活跃,换手率%,0,2.8,0),COLOR0000AA;
STICKLINE(高度活跃,换手率%,0,2.3,0),COLOR0022CC;
STICKLINE(高度活跃,换手率%,0,1.7,0),COLOR0044DD;
STICKLINE(高度活跃,换手率%,0,1,0),COLOR0055FF;
STICKLINE(高度活跃,换手率%,0,0.3,0),COLOR0099FF;
STICKLINE(极度活跃,换手率%,0,2.8,0),COLOR000066;
STICKLINE(极度活跃,换手率%,0,2.3,0),COLOR000088;
STICKLINE(极度活跃,换手率%,0,1.7,0),COLOR0000AA;
STICKLINE(极度活跃,换手率%,0,1,0),COLOR0000CC;
STICKLINE(极度活跃,换手率%,0,0.3,0),COLOR2222FF;
STICKLINE(巨量换手,换手率%,0,2.8,0),COLOR000022;
STICKLINE(巨量换手,换手率%,0,2.3,0),COLOR000033;
STICKLINE(巨量换手,换手率%,0,1.7,0),COLOR000055;
STICKLINE(巨量换手,换手率%,0,1,0),COLOR000077;
STICKLINE(巨量换手,换手率%,0,0.3,0),COLOR000099;
X_1:=REF(CLOSE,1)*1.1-CLOSE<0.01 AND HIGH=CLOSE;
前高量:REF(HHV(换手率%,60),REF(X_1,1)),COLORGREEN;
成交量:VOL,NODRAW;{分析家公式网WWW.FXJGSW.COM}
X_2:=90;
后量超前量:VOL>=HHV(VOL,X_2);
DRAWICON(后量超前量,前高量,13);
X_3:=MA(VOL,5);
X_4:=MA(VOL,35);
X_5:=MA(VOL,135);
X_6:=CROSS(X_3,X_4) AND VOL>X_3 AND VOL>X_5*2;
牛股启动:FILTER(X_6,20),NODRAW,COLORRED,LINETHICK3;
DRAWTEXT(牛股启动,前高量,21),COLORYELLOW;
DRAWICON(牛股启动,前高量,34);
量比:VOL/REF(MA(VOL,5),1),NODRAW,COLORWHITE;
X_7:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL);
X_8:=MA(X_7,5);
X_9:=MA(X_7,60);
均量金叉:CROSS(X_8,X_9);
DRAWICON(均量金叉,5,11);