N:=20;
N1:=7;
N2:=69;
T1:=IF((DATE<=9990314),1,0);
M3:=EMA(CLOSE,3);
M8:EMA(CLOSE,8),COLOR008000;
M13:EMA(M8,13),COLOR0000FF;
M62:EMA(M8,55),COLORF0F000;
VAR1:=EMA(M13,62);
M81:EMA(M62,81),COLOR00FFFF;
M144:EMA(VAR1,144),LINETHICK2,COLOR0000FF;
M250:EMA(VAR1,250),POINTDOT,LINETHICK2,COLORF00FF0;
VAR2:=(CLOSE+HIGH+LOW)/(3);
VAR3:=(EMA(VAR2,10))*(T1);
VAR4:=(REF(VAR3,1))*(T1);
STICKLINE((VAR3>VAR4),VAR3,VAR4,4,0),COLOR00FFFF;
STICKLINE((VAR3<VAR4),VAR3,VAR4,4,0),COLORFF0000;
VAR5:=((REF(HIGH,1)+REF(LOW,1))/(2))*(T1);
VAR6:=MA(CLOSE,N)+((2)*(STD(CLOSE,N)))*(T1);
DRAWTEXT(CROSS(VAR3,VAR4),(VAR3)*(0.98),'★'),COLOR00FFFF;
DRAWTEXT(CROSS(VAR5,VAR6),(HIGH)*(1.04),'↓卖'),COLOR008000;
VAR7:=REF(CLOSE,1);
VAR8:=((SMA(MAX(CLOSE-VAR7,0),N1,1))/(SMA(ABS(CLOSE-VAR7),N1,1)))*(100);
VAR9:=CROSS(N2,VAR8);
VARA:=(FILTER(VAR9,4))*(T1);
DRAWTEXT(VARA,(HIGH)*(1.04),'↓卖'),COLORFFFFFF;
VARB:=((2)*(CLOSE)+HIGH+LOW)/(4);
VARC:=LLV(LOW,34);
VARD:=HHV(HIGH,34);
VARE:=(EMA(((VARB-VAR1)/(VAR5-VAR1))*(100),7))*(T1);
VARF:=(EMA((0.667)*(REF(VARE,1))+(0.333)*(VARE),5))*(T1);
DRAWTEXT(IF(((COUNT((CLOSE<REF(CLOSE,1)),8))/(8)>0.6) AND (VOL>=(1.5)*(MA(VOL,5))) AND COUNT((VARE>=VARF),3) AND (REF(LOW,1)=LLV(LOW,120)),1,0),LOW,'●买进'),COLORFF00FF;
DRAWTEXT(IF(((COUNT((CLOSE<REF(CLOSE,1)),13))/(13)>0.6) AND COUNT((VARE>VARF),6) AND (REF(LOW,5)=LLV(LOW,120)) AND REF((CLOSE>=OPEN),4) AND REF((CLOSE>OPEN),3) AND REF((CLOSE>OPEN),2) AND REF((OPEN>CLOSE),1) AND (OPEN>REF(CLOSE,1)),1,0),LOW,'●买进'),COLOR00FFFF;
VAR10:=(MA(CLOSE,80)-(MA(CLOSE,10))/(3))*(T1);
DRAWTEXT(IF((CLOSE<VAR10) AND ((VOL)/(240)>(MA(VOL,5))/(240)) AND (CLOSE>(REF(CLOSE,1))*(1.08)) AND (CLOSE<(MA(CLOSE,13))*(1.3)),1,0),LOW,'●抄底'),COLOR0000FF;
CCI资金运作 副图 源码
input:N(34,1,100),M(3,1,100);
个股资金指数:EMA(((100 * (CLOSE - LLV(LOW,N))) / (HHV(HIGH,N) - LLV(LOW,N))),M);
FILLRGN((个股资金指数 > (0 - 5)),100,(0 - 5)),color5500;
FILLRGN((个股资金指数 > 20),个股资金指数,20),colorFF00FF;
DRAWICON(CROSS(个股资金指数,50),个股资金指数,10),ALIGN4;
DRAWICON(CROSS(50,个股资金指数),个股资金指数,11),ALIGN4;
市场资金指数:EMA(((100 * (INDEXC - LLV(INDEXL,N))) / (HHV(INDEXH,N) - LLV(INDEXL,N))),M),colorFFFF;
DRAWICON(CROSS(50,市场资金指数),50,5);
DRAWICON(CROSS(市场资金指数,50),50,4);
资金运作安全区:FILLRGN((市场资金指数 > 50),20,(0 - 5)),color55;
博弈线:80;
20;
50;
{cci}
{cci卖点对于短期内暴涨的股票卖出非常适合}
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORRED,LINETHICK0;
cci高度关注:if(ref(cci,1)<-99 and cci >-98,1,0),colorwhite;
stickline(cci高度关注,20,40,6,1),linethick3,colorwhite;
cci逃逸:if(ref(cci,1)>99 and cci <98 and 个股资金指数 >45,1,0),colorgreen;
stickline(cci逃逸,80,95,6,1),linethick3,colorgreen;
弱势1:=if(cci<-100,cci/5+20,20);
stickline(弱势1,20,弱势1,1,0),linethick1,colorgreen;
弱势2:=if(cci<-50 and cci >-101,cci/5+20,20);
stickline(弱势2,20,弱势2,1,0),linethick1,coloryellow;
买入1:if(ref(cci高度关注,1)=1 and cci>-50,1,0);
买入2:if(ref(cci高度关注,2)=1 and cci>-50 and ref(cci,1)>-50,1,0);
买入3:if(ref(cci高度关注,3)=1 and cci>-50 and ref(cci,1)>-50,1,0);
买入4:if(ref(cci高度关注,4)=1and cci>-50 and ref(cci,1)>-50 and ref(cci,2)>-50,1,0);
stickline(买入1,20,60,1,0),linethick1,colorred;
stickline(买入2,20,60,3,0),linethick1,colorred;
stickline(买入3,20,60,5,0),linethick1,colorred;
stickline(买入4,20,60,6,0),linethick1,colorred;
买入选股:if(买入1 or 买入2 or 买入3 or 买入4,1,0);
|