{量价共振副图源码如下}
DIFF:=EMA(CLOSE,8)-EMA(CLOSE,13);
DEA:=EMA(DIFF,5);
DRAWICON(DIFF>DEA,1,1);
DRAWICON(DIFF<DEA,1,2);
DRAWTEXT(ISLASTBAR=1,1,'. MACD'),COLORFFFFFF;
ABC1:=DIFF>DEA;
好股网1:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
K:=SMA(好股网1,3,1);
D:=SMA(K,3,1);
DRAWICON(K>D,2,1);
DRAWICON(K<D,2,2);
DRAWTEXT(ISLASTBAR=1,2,'. KDJ'),COLORFFFFFF;
ABC2:=K>D;
六指标共振:=REF(CLOSE,1);
RSI1:=(SMA(MAX(CLOSE-六指标共振,0),5,1))/(SMA(ABS(CLOSE-六指标共振),5,1))*100;
RSI2:=(SMA(MAX(CLOSE-六指标共振,0),13,1))/(SMA(ABS(CLOSE-六指标共振),13,1))*100;
DRAWICON(RSI1>RSI2,3,1);
DRAWICON(RSI1<RSI2,3,2);
DRAWTEXT(ISLASTBAR=1,3,'. RSI'),COLORFFFFFF;
ABC3:=RSI1>RSI2;
好股网:=-(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*100;
LWR1:=SMA(好股网,3,1);
LWR2:=SMA(LWR1,3,1);
DRAWICON(LWR1>LWR2,4,1);
DRAWICON(LWR1<LWR2,4,2);
DRAWTEXT(ISLASTBAR=1,4,'. LWR'),COLORFFFFFF;
ABC4:=LWR1>LWR2;
BBI:=(MA(CLOSE,3)+MA(CLOSE,5)+MA(CLOSE,8)+MA(CLOSE,13))/4;
DRAWICON(CLOSE>BBI,5,1);
DRAWICON(CLOSE<BBI,5,2);
DRAWTEXT(ISLASTBAR=1,5,'. BBI'),COLORFFFFFF;
ABC10:=7;
ABC5:=CLOSE>BBI;
MTM:=CLOSE-REF(CLOSE,1);
MMS:=100*EMA(EMA(MTM,5),3)/EMA(EMA(ABS(MTM),5),3);
MMM:=100*EMA(EMA(MTM,13),8)/EMA(EMA(ABS(MTM),13),8);
DRAWICON(MMS>MMM,6,1);
DRAWICON(MMS<MMM,6,2);
DRAWTEXT(ISLASTBAR=1,6,'. ZLMM'),COLORFFFFFF;
ABC6:=MMS>MMM;
买入:IF(ABC1 AND ABC2 AND ABC3 AND ABC4 AND ABC5 AND ABC6=1
AND REF(ABC1 AND ABC2 AND ABC3 AND ABC4 AND ABC5 AND ABC6,1)=0,6,0),COLORYELLOW,LINETHICK2;
持有:IF(ABC1 AND ABC2 AND ABC3 AND ABC4 AND ABC5 AND ABC6,6,0),COLORMAGENTA,LINETHICK2;
共振:=ABC1 AND ABC2 AND ABC3 AND ABC4 AND ABC5 AND ABC6 ;
STICKLINE(共振,0,6,0.6,1),COLORMAGENTA;
STICKLINE(买入,0,6,0.6,0),COLORYELLOW;
DRAWICON(DIFF>DEA,1,1);
DRAWICON(DIFF<DEA,1,2);
DRAWICON(K>D,2,1);
DRAWICON(K<D,2,2);
DRAWICON(RSI1>RSI2,3,1);
DRAWICON(RSI1<RSI2,3,2);
DRAWICON(LWR1>LWR2,4,1);
DRAWICON(LWR1<LWR2,4,2);
DRAWICON(CLOSE>BBI,5,1);
DRAWICON(CLOSE<BBI,5,2);
DRAWICON(MMS>MMM,6,1);
DRAWICON(MMS<MMM,6,2);
DRAWICON(买入,6.6,9);
{量价共振主图源码如下}
DRAWTEXT_FIX(1,0.005,0,0,'所属风格:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.06,0,0,FGBLOCK),COLORYELLOW;
DRAWTEXT_FIX(1,0.005,0.05,0,'所属概念:'),COLORMAGENTA;
DRAWTEXT_FIX(1,0.06,0.05,0,GNBLOCK),COLORYELLOW;
DIFF:=EMA(C,8)-EMA(C,13);
DEA:=EMA(DIFF,5);
CTA1:=DIFF>DEA;
WU1:=(C-LLV(LOW,8))/(HHV(H,8)-LLV(LOW,8))*100;
K:=SMA(WU1,3,1);
D:=SMA(K,3,1);
CTA2:=K>D;
ZS:=REF(C,1);
NS1:=(SMA(MAX(C-ZS,0),5,1))/(SMA(ABS(C-ZS),5,1))*100;
NS2:=(SMA(MAX(C-ZS,0),13,1))/(SMA(ABS(C-ZS),13,1))*100;
CTA3:=NS1>NS2;
WU:=-(HHV(H,13)-C)/(HHV(H,13)-LLV(LOW,13))*100;
CTB5:MA(C,5)DOTLINE;CTB10:
MA(C,13)LINETHICK2;
机构共振1:=SMA(WU,3,1);
机构共振2:=SMA(机构共振1,3,1);
CTA4:=机构共振1>机构共振2;
BBI:=(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4;
CTA5:=C>BBI;
擒牛:=C-REF(C,1);
擒牛J:=100*EMA(EMA(擒牛,5),3)/EMA(EMA(ABS(擒牛),5),3);
擒牛M:=100*EMA(EMA(擒牛,13),8)/EMA(EMA(ABS(擒牛),13),8);
CTA6:=擒牛J>擒牛M;
擒牛S:=(C*2+H+L)/4;
DT:=EMA(擒牛S,13)-EMA(擒牛S,34);
ZT:=EMA(DT,5);空头:=(-2*(DT-ZT))*3.8,COLORGREEN;
多头:=(2*(DT-ZT))*3.8,COLORRED;
CTA7:=多头>空头;
MA11:=MA(C,5);
MA22:=REF(MA(C,5),1);
CTD2:=IF(MONTH< 12,1,1);
CTD3:=(2*C+H+LOW)/4;
CTD4:=LLV(LOW,34);
CTD5:=HHV(H,34);
主力:=EMA((CTD3-CTD4)/(CTD5-CTD4)*100,13)*CTD2;
散户:=EMA(0.667*REF(主力,1)+0.333*主力,2);
CTA9:=主力>散户;
CTA10:=(多头>空头) AND (主力>散户);CTA11:=(多头>空头) AND (主力>散户) AND (DIFF>DEA) AND (K>D) AND (NS1>NS2) AND (机构共振1>机构共振2) AND (C>BBI) AND (擒牛J>擒牛M);
量价共振:=BARSLASTCOUNT((CTA1 AND CTA2 AND CTA3 AND CTA4 AND CTA5 AND CTA6 AND CTA7 AND CTA9 AND CTA10 AND CTA11))=1;DRAWICON((CTA1 AND CTA2 AND CTA3 AND CTA4 AND CTA5 AND CTA6 AND CTA7 AND CTA9 AND CTA10 AND CTA11),L,1);STICKLINE((CTA1 AND CTA2 AND CTA3 AND CTA4 AND CTA5 AND CTA6 AND CTA7 AND CTA9 AND CTA10 AND CTA11),OPEN,C,2,0),COLORYELLOW;STICKLINE((CTA1 AND CTA2 AND CTA3 AND CTA4 AND CTA5 AND CTA6 AND CTA7 AND CTA9 AND CTA10 AND CTA11),OPEN,C,1,0),COLORFF00FF;
DRAWICON(量价共振,L,25);DRAWTEXT(量价共振,L*0.96,'★量价共振'),COLORYELLOW;