思路分享:取两根涨跌幅大于4%的K线,两根K线区间小于15天,区间振幅小于10%,两根K线可根据需要任意更换,基本有四种:阴阳组合、双阳组合、双阴组合、阳阴组合。大于最后一根4%K线的收盘价为买入信号。当收盘价大于该线为红色,当收盘价小于该线为绿色。参数设置见第5与第6两幅图,主图与选股公式设置同理
{主图}
T1:=IF(1*大阳1,C REF(C,1)*1.04,IF(1*大阴1,REF(C,1)/C 1.04,0));
T2:=IF(1*大阳2,C REF(C,1)*1.04,IF(1*大阴2,REF(C,1)/C 1.04,0));
TT:=BARSLAST(T1);
ZF:=HHV(H,TT+1)/LLV(L,TT+1);
A1:=REF(ZF,1) 1.10;
A2:=BETWEEN(REF(TT,1),1,15);
A3:=T2 AND H REF(REF(L,TT),1);
XG:=CURRBARSCOUNT=CONST(BARSLAST(A1 AND A2 AND A3))+2;
A:=DRAWLINE(REF(XG,1),C,REF(REF(XG,1),1),REF(C,1),1);
A4:=BARSLAST(XG);
B:=IF(A4 15,A,DRAWNULL);
红进:IF(C A,B,DRAWNULL),COLORRED,LINETHICK2;
绿出:IF(C A,B,DRAWNULL),COLORGREEN,LINETHICK2;
A5:=BACKSET(XG=1,TT+1);
A6:=BARSLAST(CROSS(A5=1,0.5));
STICKLINE(A6=0,H*1.01,L*0.99,4,-1),COLORWHITE;
STICKLINE(REF(XG,1),H*1.01,L*0.99,4,-1),COLORWHITE;
DRAWTEXT(A6=0,H*1.02,'阴阳互换'),COLORYELLOW;
DRAWKLINE(H,O,L,C);
STICKLINE(A6=0 AND 大阳1,C,O,2.5,0),COLORRED;
STICKLINE(A6=0 AND 大阴1,C,O,2.5,0),COLORGREEN;
STICKLINE(REF(XG,1) AND 大阳2,C,O,2.5,0),COLORRED;
STICKLINE(REF(XG,1) AND 大阴2,C,O,2.5,0),COLORGREEN;
DRAWICON((COUNT(C A,A4-1)=1 AND C A OR CROSS(C,A)) AND A4-1 15,L,1);
DRAWTEXT_FIX(ISLASTBAR,0,10,0,'鹏腾2009版本'),COLORWHITE;
{选股}
T1:=IF(1*大阳1,C REF(C,1)*1.04,IF(1*大阴1,REF(C,1)/C 1.04,0));
T2:=IF(1*大阳2,C REF(C,1)*1.04,IF(1*大阴2,REF(C,1)/C 1.04,0));
TT:=BARSLAST(T1);
ZF:=HHV(H,TT+1)/LLV(L,TT+1);
A1:=REF(ZF,1) 1.10;
A2:=BETWEEN(REF(TT,1),5,15);
A3:=T2 AND H REF(REF(L,TT),1);
XG:=CURRBARSCOUNT=CONST(BARSLAST(A1 AND A2 AND A3))+2;
A:=DRAWLINE(REF(XG,1),C,REF(REF(XG,1),1),REF(C,1),1);
A4:=BARSLAST(XG);
XG1:=(COUNT(C A,A4)=1 AND C A OR CROSS(C,A)) AND A4
COUNT(XG1,5);