以下是通达信阴线淘金之量价齐升(鹏腾2009版本)源码 主图幅图选股 贴图(无源码的请下载附件导入)
思路分享:阳线量价齐升之阴线反思维选股。取最后两个最大实体阴线,阴线最低价下移但最高价不脱离倒数第二根阴线最低价,如果发生在下跌未端可以看成是主力砸盘行为。如果发生在上升途中,可以看成是主力的洗盘行为。
最后修正并增加了红进绿出画线,最后一幅图可以预览效果
{主图}
AT:=FINDHIGHBARS(REF(C,1)/C,2,60,1);
BT:=FINDHIGHBARS(REF(C,1)/C,2,60,2);
TJ:=BACKSET(BT>AT AND ISLASTBAR,BT+1);
W1:=(CONST(AT)+1=CURRBARSCOUNT)*TJ;
W2:=(CONST(BT)+1=CURRBARSCOUNT)*TJ;
O1:=REF(O,BARSLAST(W1));
H1:=REF(H,BARSLAST(W1));
L1:=REF(L,BARSLAST(W1));
L2:=REF(L,BARSLAST(W2));
H2:=REF(H,BARSLAST(W2));
V1:=REF(V,BARSLAST(W1));
V2:=REF(V,BARSLAST(W2));
A:IF(V1>V2 AND BARSLAST(W2)-BARSLAST(W1)<15 AND H1>=L2 AND L1<L2,O1,DRAWNULL),COLORRED,LINETHICK2;
STICKLINE(BARSLAST(W1)=0,C,O,2,0),COLORGREEN;
STICKLINE(BARSLAST(W2)=0,C,O,2,0),COLORGREEN;
红进:IF(C>A,A,DRAWNULL),COLORRED,LINETHICK2;
绿出:IF(C<A,A,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWTEXT(BARSLAST(W1)=0,H,'量价齐跌'),DRAWABOVE;
DRAWICON((COUNT(C>A,A)=1 AND C>A OR CROSS(C,A)) AND BARSLAST(W1)<15,L,1);
{副图}
VOL,VOLSTICK;
AT:=FINDHIGHBARS(REF(C,1)/C,2,60,1);
BT:=FINDHIGHBARS(REF(C,1)/C,2,60,2);
TJ:=BACKSET(BT>AT AND ISLASTBAR,BT+1);
W1:=(CONST(AT)+1=CURRBARSCOUNT)*TJ;
W2:=(CONST(BT)+1=CURRBARSCOUNT)*TJ;
STICKLINE(BARSLAST(W1)=0,0,V,2,0),COLORGREEN;
STICKLINE(BARSLAST(W2)=0,0,V,2,0),COLORGREEN;
{选股}
AT:=FINDHIGHBARS(REF(C,1)/C,2,60,1);
BT:=FINDHIGHBARS(REF(C,1)/C,2,60,2);
TJ:=BACKSET(BT>AT AND ISLASTBAR,BT+1);
W1:=(CONST(AT)+1=CURRBARSCOUNT)*TJ;
W2:=(CONST(BT)+1=CURRBARSCOUNT)*TJ;
O1:=REF(O,BARSLAST(W1));
H1:=REF(H,BARSLAST(W1));
L1:=REF(L,BARSLAST(W1));
L2:=REF(L,BARSLAST(W2));
H2:=REF(H,BARSLAST(W2));
V1:=REF(V,BARSLAST(W1));
V2:=REF(V,BARSLAST(W2));
A:=IF(V1>V2 AND BARSLAST(W2)-BARSLAST(W1)<15 AND H1>=L2 AND L1<L2,O1,DRAWNULL);
XG:=(COUNT(C>A,A)=1 AND C>A OR CROSS(C,A)) AND BARSLAST(W1)<15;
COUNT(XG,5);
625433927.jpg
625488519.jpg
625533071.jpg
625577903.jpg
|