M1=5 2 1000 M2=10 2 1000 日期全推10 0 100
{操盘趋势}{海底火山}
DRAWGBK(c, COLORRGB(0,20,40) ,COLORRGB(0,110,150),1);
nnss:=SYSPARAM(3)-SYSPARAM(2)+1;
hhss:=HHV(c,nnss);
llss:=LLV(c,nnss);
最高hh:=hhss[SYSPARAM(3)];
最低ll:=llss[SYSPARAM(3)];
海面:=最低ll+(最高hh-最低ll)*0.1;HHW:=C*0.15;
rsv:=(CLOSE - LLV(LOW,18))/(HHV(HIGH,18) - LLV(LOW,18));
K:=EMA(rsv,3);
D:=EMA(K,3);
j:=3*k-2*d;
HHCA:=海面;
山:=(3*K-2*D);
kdj1:=ref(count(j<ref(j,1),5)>=3,1) and ref(j,1)<0.2;
kdj2:=j>ref(j,1);
限制画线时限:=RANGE(BARPOS,SYSPARAM(3)-120,SYSPARAM(3)+1);
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.90+HHCA),COLORADBA9C;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.77+HHCA),COLOR9CAA8C;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.74+HHCA),COLOR8C9A73;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.70+HHCA),COLOR738A63;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.67+HHCA),COLOR637552;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.63+HHCA),COLOR526542;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.57+HHCA),COLOR425531;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.51+HHCA),COLOR314521;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.45+HHCA),COLOR213010;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.40+HHCA),COLOR102000;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.80+HHCA),COLOR8CCFA5;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.78+HHCA),COLOR7BC79C;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.75+HHCA),COLOR5AB684;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.71+HHCA),COLOR4AA673;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.68+HHCA),COLOR398E63;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.64+HHCA),COLOR39825A;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.58+HHCA),COLOR317552;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.52+HHCA),COLOR29694A;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.46+HHCA),COLOR295D42;
FILLRGN(DATATYPE>5 and 山>0 AND 限制画线时限,HHCA,山*HHW*0.40+HHCA),COLOR215139;
火山:STICKLINE(山<=0 AND 限制画线时限,HHCA,-山*HHW*6.50+HHCA,10,0),COLOR8800AA;
STICKLINE(山<=0 AND 限制画线时限,HHCA,-山*HHW*6.45+HHCA,10,0),COLOR8811AA;
STICKLINE(山<=0 AND 限制画线时限,HHCA,-山*HHW*5.40+HHCA,10,0),Color8800BB;
STICKLINE(山<=0 AND 限制画线时限,HHCA,-山*HHW*6.35+HHCA,10,0),COLOR8811BB;
STICKLINE(山<=0 AND 限制画线时限,HHCA,-山*HHW*4.30+HHCA,10,0),Color8800CC;
STICKLINE(山<=0 AND 限制画线时限,HHCA,-山*HHW*4.25+HHCA,10,0),Color8811CC;
STICKLINE(山<=0 AND 限制画线时限,HHCA,-山*HHW*3.20+HHCA,10,0),Color8800DD;
STICKLINE(山<=0 AND 限制画线时限,HHCA,-山*HHW*3.15+HHCA,10,0),Color8811DD;
STICKLINE(山<=0 AND 限制画线时限,HHCA,-山*HHW*2.10+HHCA,10,0),Color8800EE;
STICKLINE(山<=0 AND 限制画线时限,HHCA,-山*HHW*2.05+HHCA,10,0),Color8811EE;
STICKLINE(山<=0 AND 限制画线时限,HHCA,-山*HHW*1.50+HHCA,10,0),COLOR8800FF;
STICKLINE(山<=0 AND 限制画线时限,HHCA,-山*HHW*1.35+HHCA,10,0),COLOR8811FF;
STICKLINE(C>O ,H,L,0.1,0),COLORRED;
STICKLINE(C>O ,C,O,8.5,1),COLORRED;
STICKLINE(C<=O ,H,L,0.1,0),COLORCYAN;
STICKLINE(C<=O ,C,O,8.5,1),COLORCYAN;
DRAWTEXT(限制画线时限 and FILTER(kdj1 and kdj2,3),HHCA*1.1,'△\n△\n△'),ALIGN,COLORFF00EE;
{股票概况}
流通〖亿〗:CAPITAL/1000000,LINETHICK0;
5换:SUM(100*V/CAPITAL,5),LINETHICK0;
10换:SUM(100*V/CAPITAL,10),LINETHICK0;
20换:SUM(100*V/CAPITAL,20),LINETHICK0;
压力:MA(REF(HHV(C,30),1),2),Color9DFFFF;
支撑:MA(REF(LLV(C,30),1),2),ColorABFF46;
DRAWTEXT((BARPOS = SYSPARAM(2)),HIGH,('所属板块:' + BLKNAME)+ '\n')ALIGN4,colorred;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
A:=HHV(DIFF,300);
B:=MACD-REF(MACD,1);
K1:=SYSPARAM(3)-SYSPARAM(2)+1;
DIFF1:=HHV(DIFF,K1);
DEA1:=HHV(DEA,K1);
MACD1:=HHV(MACD,K1);
DIFF2:=LLV(DIFF,K1);
DEA2:=LLV(DEA,K1);
MACD2:=LLV(MACD,K1);
MXA:=MAX(DIFF1[DATACOUNT],MAX(DEA1[DATACOUNT],MACD1[DATACOUNT]));
MNA:=MIN(DIFF2[DATACOUNT],MIN(DEA2[DATACOUNT],MACD2[DATACOUNT]));
A2:=(MXA+MNA)/2;
A3:=MXA-MNA;
H1:=HHV(HIGH,K1);
L1:=LLV(LOW,K1);
MXB:=H1[DATACOUNT];
MNB:=L1[DATACOUNT];
B2:=(MXB+MNB)/2;
B3:=MXB-MNB;
DIFFA:=(DIFF-A2)*B3/A3+B2;
DEAA:=(DEA-A2)*B3/A3+B2;
MACDA:=(MACD-A2)*B3/A3+B2;
B4:=-A2*B3/A3+B2;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,B4,B4+B3/20,6,0),colorFFFF;
DRAWTEXT(低位金叉,B4+B3/20,' 低位金叉'),colorFFFF;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,B4,B4-B3/40,2,0),colorFF00FF;
DRAWTEXT(二次金叉,B4-B3/40,' 二次金叉'),ALIGN0,colorFF00FF;
{操盘线}
MAA:=MA(C,3);
MAB:=MA(C,8);
FILLRGN(MAA<MAB,MAA,MAB),COLORGREEN;
FILLRGN(MAA>MAB,MAA,MAB),color4440FF;
{立体K线}
STICKLINE(CLOSE>OPEN,OPEN,LOW,0.5,0 ),COLOR0000ff;
STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.5 ,0 ),COLOR0000ff;
STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0.5 ,0 ),colorcyan;
STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0.5 ,0 ),colorcyan;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLORff7700;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLORff9900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLORffbb00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLORffcc00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLORffdd00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLORffee00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLORffFF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR000055;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR000066;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR000077;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000bb;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000dd;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000ff;
MA1:MA(CLOSE,M1),COLORYELLOW,LINETHICK0;
MA2:MA(CLOSE,M2),COLORWHITE,LINETHICK0;
{加仓}
TYP_D:=(HIGH+LOW+CLOSE)/3;
CCI_D:=(TYP_D-MA(TYP_D,14))/(0.015*AVEDEV(TYP_D,14));
CCI1_D:=EMA(EMA(EMA(CCI_D,2),2),2);
CCI2_D:=EMA(EMA(EMA(CCI_D,3),2),2);
X_D:=(CROSS(CCI1_D,CCI2_D) OR (CCI1_D >=CCI2_D))
AND CCI1_D>=-101 AND CCI1_D>=REF(CCI1_D,1)
AND REF(CCI1_D,1)<-101 ;
RSV_D:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K_D:=SMA(RSV_D,3,1);
D_D:=SMA(K_D,3,1);
J_D:=3*K_D-2*D_D;
K1_D:= EMA(EMA(EMA(K_D,2),2),2);
D1_D:= EMA(EMA(EMA(D_D,2),2),2);
J1_D:= EMA(EMA(EMA(J_D,2),2),2);
Y_D:= J1_D > REF(J1_D,1) ;
加仓:=X_D AND Y_D;
STI |