涨停回马枪(通达信5.0版本)
涨停板回马枪
均价线:=AMOUNT/V/100;
C2:=REF(C,1);
涨停:=IF(REF(C,1)*1.1-C<0.01 ,1,0);
STICKLINE(涨停,0,5,6,0),COLORYELLOW;
DRAWTEXT(涨停,2.5,'★涨停'),COLORYELLOW;
MA13:=MA(C,13),COLORGRAY;
MA21:=MA(C,21),COLORWHITE;
支撑线:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
LC:=REF(CLOSE,1);
操作线:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100;
趋势线:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;
震仓线:=45;
震仓线2:=50;
逃命线:=80;
抄底线:=20;
绝底线:=5;
PP2:=操作线<震仓线2 AND REF(操作线,1)>震仓线2 ;
PP:=操作线<震仓线 AND REF(操作线,1)>震仓线 ;
PP3:=操作线<抄底线 AND REF(操作线,1)>抄底线;
HH:=COUNT(涨停,13)>=1;
STICKLINE(PP2 AND HH,0,5,3,0),COLOR616161;
STICKLINE(PP AND HH,0,5,3,0),COLOR616161;
STICKLINE(PP3 AND HH,0,5,3,0),COLOR616161;
DRAWTEXT(PP2 AND HH,3.5,'★预警'),COLORFFFF00;
DRAWTEXT(PP AND HH,3.5,'★预警'),COLORFFFF00;
DRAWTEXT(PP3 AND HH,3.5,'★预警'),COLORFFFF00;
A:=SMA(L,4,3) ;
买:IF (((A AND REF(PP,1) AND HH) OR (A AND REF(PP3,1) AND HH)),1,0 ),COLORFF2FFF,STICK;
STICKLINE(A AND REF(PP,1) AND HH ,0,10,1,0),COLORFF2FFF;
DRAWICON(A AND REF(PP,1) AND HH,12,1);
STICKLINE(A AND REF(PP3,1) AND HH ,0,10,1,0),COLORFF2FFF;
DRAWICON(A AND REF(PP3,1) AND HH,12,1);
DRAWTEXT(买>0,6.9,' ★买'),COLOR00FFFF;
DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:= EMA(DIFF,9);
MACD:= 2*(DIFF-DEA);
TS:= BARSLAST(C/REF(C,1)>1.085);{上一个涨停距今天数}
A2:= IF(REF(L,TS)>REF(H,TS+1),REF(C,TS+1),REF(O,TS));{涨停当天最低价}
A3:= BETWEEN(TS,2,13); {天数条件}
A4:= C>=A2 AND BETWEEN(L/A2,1.035,0.97);{价咯条件}
A5:= V<REF(V,1) AND V<MA(V,5);{成交量条件}
A6:= ABS(C/O-1)*100<5;{K线条件}
A7:= LLV(C,TS)>=A2;{单阳不破}
A8:= MACD>-1;{MACD条件}
★低吸: A3 AND A4 AND A5 AND A6 AND A7 AND A8,STICK,LINETHICK3;
DRAWTEXT(★低吸>0,1.3,'★低吸'),COLORFFFFFF;
A9:=MA(C,5)>=A2 AND C>A2 AND C>=MA(C,5) AND REF(C,1)<=REF(MA(C,5),1)
AND LLV(L,TS)<A2*1.045;
★突破: REF(A3,1)>0 AND A9,STICK,LINETHICK3,COLORFFFF00;
DRAWTEXT(★突破>0,1.2,'★突破'),COLORFFFF00;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA30:=MA(C,30);
大阳:=(C-REF(C,1))/REF(C,1)*100>7 AND C>O;
多头排列:=MA5>MA10 AND MA10>MA20 AND MA20>MA30 AND MA20>=REF(MA20,20);
回调:=L<=MA10*1.015 AND COUNT(C>MA10,3)>=2 AND REF(L>MA10,1) AND C>MA20;
缩量:=V<REF(V,1) AND V<MA(V,5);
★回买:EXIST(大阳,60) AND 多头排列 AND 回调 AND 缩量,COLOR00FFFF,STICK,LINETHICK3;
DRAWTEXT(★回买>0,1.9,'★回买'),COLOR00FFFF;
主图:
ZT:=C/REF(C,1)>1.097;
XH:=FILTER(ZT,13);
BH:=BARSLAST(ZT);
CZ:=REF(H,BH)-REF(L,BH);
STICKLINE(C,(REF(L,BH)+CZ*0.5),(REF(L,BH)+CZ*0.5),7,0),COLORRED;
STICKLINE(C,REF(L,BH),REF(L,BH),7,0),COLORBLUE;
STICKLINE(ZT,REF(O,BH),REF(C,BH),7,0),COLORYELLOW;
DRAWTEXT(ZT,L*0.98,'涨停'),COLORFFFFFF;
VARZT:=BARSLAST(C/REF(C,1)>1.097);
STICKLINE(VARZT=2,L*0.97,L*0.98,8,0),COLOR0000FF;
DRAWTEXT(VARZT=2,L*0.95,'3天'),COLORYELLOW;
STICKLINE(VARZT=4,H*1.03,H*1.02,8,0),COLOR9966FF;
DRAWTEXT(VARZT=4,H*1.06,'5天'),COLORYELLOW;
STICKLINE(VARZT=7,L*0.97,L*0.98,8,0),COLOR00FFFF;
DRAWTEXT(VARZT=7,L*0.95,'8天'),COLORYELLOW;
STICKLINE(VARZT=12,H*1.03,H*1.02,8,0),COLORFF33FF;
DRAWTEXT(VARZT=12,H*1.06,'13天'),COLORYELLOW;
STICKLINE(VARZT=20,L*0.97,L*0.98,8,0),COLOR0066FF;
DRAWTEXT(VARZT=20,L*0.95,'21天'),COLORYELLOW;
STICKLINE(VARZT=33,H*1.03,H*1.02,8,0),COLOR9932CD;
DRAWTEXT(VARZT=33,H*1.06,'34天'),COLORYELLOW;
STICKLINE(VARZT=54,L*0.97,L*0.98,8,0),COLOR006600;
DRAWTEXT(VARZT=54,L*0.95,'55天'),COLORYELLOW;
STICKLINE(VARZT=88,H*1.03,H*1.02,8,0),COLOR00FF00;
DRAWTEXT(VARZT=88,H*1.06,'89天'),COLORYELLOW;
STICKLINE(VARZT=143,L*0.97,L*0.98,8,0),COLORCCFFFF;
DRAWTEXT(VARZT=143,L*0.95,'144天'),COLORYELLOW;
STICKLINE(VARZT=232 ,H*1.03,H*1.02,8,0),COLORFF0033;
DRAWTEXT(VARZT=232,H*1.06,'233天'),COLORYELLOW;
STICKLINE(VARZT=376,L*0.97,L*0.98,8,0),COLORFF9966;
DRAWTEXT(VARZT=376,L*0.95,'377天'),COLORYELLOW;
附件里的源码仅仅适合公式管理器5.0版本,如果用低版本的,可以用上面的源码重新编辑一次
|