源码(未做优化,可以根据自己习惯进行整理,解盘部分可从操盘手中导出修改):
用法:
一、红买,绿卖,黄注意,机构建仓区要等待。
二、牛市中如果13、18均线平行向上,如果收盘价不跌破两条线,而出现卖出信号可继续持股,如果跌破就此卖出,错了也要卖,然后再等出现买入或加仓后再行买入,前提是两条线平行向上。
三、白色突破,可以追涨,但一定要注意,股价位置及股价走势,以防套牢。
四、注意出现后,第二天阴线卖出,如第二天为阳可持股。
删除'加仓'语句,更改IF语句中最后参数“0”的大小可改进压缩。
{n(5,250,14)}
N1:=6;
N2:=12;
N3:=26;
MA6:MA(CLOSE,6),COLORWHITE{,LINETHICK2};
MA18:MA(CLOSE,18),COLORBLUE{,LINETHICK2};
a:=(3*c+l+o+h)/6;
X:=(20*a+19*ref(a,1)+18*ref(a,2)+17*ref(a,3)+16*ref(a,4)+15*ref(a,5)+
14*ref(a,6)+13*ref(a,7)+12*ref(a,8)+11*ref(a,9)+10*ref(a,10)+9*ref(a,11)+8*ref(a,12)
+7*ref(a,13)+6*ref(a,14)+5*ref(a,15)+4*ref(a,16)+3*ref(a,17)+2*ref(a,18)+
ref(a,20))/210;
庄成本:eMA(X,13),COLORRED,LINETHICK2;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
{买卖}
买:IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0),COLORRED;
卖:IF(HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX),1,0),COLOR00FF00;
DRAWTEXT(filter(买=1,5),LOW-0.03,'买'),COLORRED;
STICKLINE(filter(买=1,5),HIGH,LOW,0,1),COLORRED{,LINETHICK2};
STICKLINE(filter(买=1,5),OPEN,CLOSE,4,1),COLORRED{,LINETHICK2};
DRAWTEXT(filter(卖=1,1),HIGH*1.02,'卖'),COLORBLUE;
STICKLINE(filter(卖=1,1),HIGH,LOW,0,1),COLORBLUE{,LINETHICK2};
STICKLINE(filter(卖=1,1),OPEN,CLOSE,4,1),COLORBLUE{,LINETHICK2};
{加仓}
加仓A:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10;
加仓B:=加仓A;{白K突破压力位要用}
DRAWTEXT(FILTER((CROSS(加仓A,0) OR CROSS(CLOSE,庄成本)) {AND MA18>REF(MA18,1)} AND 买<>1,3),LOW-0.03,'加'),COLORFF00FF;
STICKLINE(FILTER((CROSS(加仓A,0) OR CROSS(CLOSE,庄成本)) {AND MA18>REF(MA18,1)} AND 买<>1,3),HIGH,LOW,0,1),COLORFF00FF{,LINETHICK2};
STICKLINE(FILTER((CROSS(加仓A,0) OR CROSS(CLOSE,庄成本)) {AND MA18>REF(MA18,1)} AND 买<>1,3),OPEN,CLOSE,4,1),COLORFF00FF{,LINETHICK2};
加仓:FILTER((CROSS(加仓A,0) OR CROSS(CLOSE,庄成本)) {AND MA18>REF(MA18,1)} AND 买<>1,3),COLORFF00FF;
{追加}
追:IF(MA18>=REF(MA18,3) AND CROSS(CLOSE,MA18),1,0),COLOR006633;
DRAWTEXT(MA18>=REF(MA18,3) AND CROSS(CLOSE,MA18),LOW*0.96,'追'),COLOR006633;
STICKLINE(MA18>=REF(MA18,3) AND CROSS(CLOSE,MA18),HIGH,LOW,0,1),COLOR006633{,LINETHICK2};
STICKLINE(MA18>=REF(MA18,3) AND CROSS(CLOSE,MA18),OPEN,CLOSE,4,1),COLOR006633{,LINETHICK2};
{注意}
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1),COLORFFFFFF;
D:=SMA(K,3,1),COLOR00FFFF;
J:=3*K-2*D,COLORFF00FF;
BDGD:=HHV(J,2)=HHV(J,8) AND J>80;
注意:IF(CROSS(REF(J-0.01,1),J) AND REF(BDGD,1),1,0),COLORYELLOW;
DRAWTEXT(注意 AND 卖<>1,HIGH*1.02,'减'),COLORYELLOW;
STICKLINE(注意 AND 卖<>1,HIGH,LOW,0,1),COLORYELLOW{,LINETHICK2};
STICKLINE(注意 AND 卖<>1,OPEN,CLOSE,4,1),COLORYELLOW{,LINETHICK2};
{买跌}
{N:5,250,14;}
KA:=N/2;
DTPL:=MA(C,N)>MA(C,N*1.5) AND MA(C,N*1.5)>MA(C,N*3) AND MA(C,3)>MA(C,N*6);
连续走强:=COUNT(C>MA(C,N),KA)=KA;
ZQSJ:=BARSLAST(连续走强);
下穿:=CROSS(MA(C,N),C);
GL:=MA(C,N/2)/MA(C,N*2)>=1.05;
买跌A:=(下穿 AND ZQSJ<=3 AND DTPL AND GL)*N;
DRAWTEXT(买跌A>0,LOW*0.98 , '买'),COLOR00FF00;
STICKLINE(买跌A>0,HIGH,LOW,0,1),COLOR00FF00{,LINETHICK2};
STICKLINE(买跌A>0,OPEN,CLOSE,4,1),COLOR00FF00{,LINETHICK2};
买跌:IF((下穿 AND ZQSJ<=3 AND DTPL AND GL)*N,1,0),COLOR00FF00;
RSV1:=(c-LLV(low,13))/(HHV(h,13)-LLV(l,13))*100;
K1:=SMA(RSV1,3,1),COLORFFFFFF;
D1:=SMA(K1,3,1),COLOR00FFFF;
J1:=3*K1-2*D1,COLORFF00FF;
RSV2:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
K2:=SMA(RSV2,3,1);
D2:=SMA(K2,3,1);
J2:=3*K2-2*D2;
支撑:=IF(CROSS(J1,J2),L,REF(L,BARSLAST(CROSS(J1,J2)))),COLORRED;
压力:=IF(CROSS(J2,J1),H,REF(H,BARSLAST(CROSS(J2,J1)))),COLOR00FF00;
DRAWTEXT(支撑=压力 AND REF(支撑,1)<>REF(压力,1),LOW*0.99,'●'),COLOR3300FF;
DRAWTEXT(支撑=压力 AND REF(支撑,1)<>REF(压力,1),LOW*0.97,'优'),COLOR3300FF;
DRAWTEXT((CROSS(C,压力) AND 加仓B<>加仓A) OR (CROSS(C,压力) AND 买<>1) OR (C=压力 AND OPEN>CLOSE),LOW*0.98,'突'),COLORWHITE;
STICKLINE((CROSS(C,压力) AND 加仓B<>加仓A) OR (CROSS(C,压力) AND 买<>1) OR (C=压力 AND OPEN>CLOSE),HIGH,LOW,0,1),COLORWHITE{,LINETHICK2};
STICKLINE((CROSS(C,压力) AND 加仓B<>加仓A) OR (CROSS(C,压力)AND 买<>1) OR (C=压力 AND OPEN>CLOSE),OPEN,CLOSE,4,1),COLORWHITE{,LINETHICK2};
突破压力位:IF((CROSS(C,压力) AND 加仓B<>加仓A) OR (CROSS(C,压力)AND 买<>1) OR (C=压力 AND OPEN>CLOSE),1,0),COLORWHITE;
TY:=C;
HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),10),10+1),10);
LD:=FILTER(BACKSET(FILTER(REF(TY,10)=LLV(TY,2*10+1),10),10+1),10);
A2:=REF(C,BARSLAST(HD));
B2:=REF(C,BARSLAST(LD));
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
波浪顶:IF(T1,A2,A2),COLOR00FF00,POINTDOT,LINETHICK2;
STICKLINE(T1,A2,A2,9,0),COLOR00FF00;
波浪底:IF(T2,B2,B2),COLORFF00FF,POINTDOT,LINETHICK2;
20106181038325059.jpg
|