PVBS量价
参数:UPDOWN 默认=5
VARIABLE:VERSION='1.0',B=1,S=0,FASTSELL=0,BARPOSREC=0; {B=1:表示可买;S=1:表示可卖;FASTSELL=1:表示之前出现的卖点是因涨幅过大而导致的止盈卖点。}
{调试开始}
IF DATE = 1130516 THEN
B := B;
{调试结束}
{新增开始}
MA3 : MA(CLOSE,3),DOTLINE,COLORYELLOW;{3日均线}
MA6 : MA(CLOSE,6),DOTLINE,COLORGREEN;{6日均线}
{新增结束}
MA18 : MA(CLOSE,18),COLORWHITE;{18日均线}
{新增开始}
MA34 : MA(CLOSE,34),DASHLINE,COLORBLUE;{34日均线}
MA144 : MA(CLOSE,144),DASHLINE,COLOR9900CC;{144日均线}
MA244 : MA(CLOSE,244),DASHLINE,COLORRED;{244日均线}
{新增结束}
CLOSECOND := CLOSE>MA18;{条件1:当天收盘价在18日均线之上}
MA18COND1 := ALL(MA18>REF(MA18,1),UPDOWN) AND (MA18/REF(MA18,UPDOWN)>1.01);{条件2:18日均线在 UPDOWN 天内走多,且上涨超过 1.5%}
MA18COND2 := ALL(MA18<REF(MA18,1),UPDOWN) AND (MA18/REF(MA18,UPDOWN)<0.99);{条件3:18日均线在 UPDOWN 天内走空,且下跌超过 1.5%}
MA18COND3 := (MA18COND1 = 0) AND (MA18COND2 =0);{条件4:18日均线在 UPDOWN 天内走平。即:既不走多,也不走空}
VOL6 := MA(VOL, 6);{成交量6日均线}
VOL18 := MA(VOL,18);{成交量18日均线}
VOL6CRS18 := ANY(CROSS(VOL6,VOL18),UPDOWN) AND (VOL6 > VOL18);{条件5:成交量6日均线在 UPDOWN 天内上穿成交量18日均线,且仍保持在成交量18日均线之上}
VOL6UP18 := ALL(VOL6>VOL18,UPDOWN);{条件6:成交量6日均线与成交量18日均线在 UPDOWN 天内成多头排列}
UPNOTFAST := REF(CLOSE,1)/REF(CLOSE,4) < 1.15;{条件7:前三天涨幅过大(>15%)的去掉}
ADDPOS := CLOSE/MA18 < 1.02 AND CLOSE/MA18 >= 1;
BUYSIGN := CLOSECOND AND (MA18COND1 OR MA18COND3) AND (VOL6CRS18 OR VOL6UP18) AND UPNOTFAST;
IF B AND BUYSIGN THEN BEGIN
IF BARPOS-BARPOSREC > UPDOWN THEN FASTSELL := 0;
IF FASTSELL THEN
BEGIN
IF ADDPOS THEN
BEGIN
DRAWBMP(BUYSIGN, LOW, 'buy1'),ALIGN1;
B := 0;
S := 1;
FASTSELL := 0;
BARPOSREC := BARPOS;
END
END
ELSE
BEGIN
DRAWBMP(BUYSIGN, LOW, 'buy1'),ALIGN1;
B := 0;
S := 1;
FASTSELL := 0;
BARPOSREC := BARPOS;
END
END
DRAWBMP(S AND ADDPOS, LOW, 'bs'),ALIGN1;
CLOSEMA2 := ALL(CLOSE<MA18,2);{条件8:连续2天收盘价跌破至18日均线以下}
VOL18CRS6 := ANY(CROSS(VOL18,VOL6),UPDOWN) AND (VOL6 < VOL18);{条件9:5日内成交量6日均线有下穿成交量18日均线,且仍保持在成交量18日均线之下}
VOL6DN18 := ALL(VOL6<VOL18,UPDOWN);{条件10:成交量6日均线与成交量18日均线在 UPDOWN 天内成空头排列}
DAYS3UP := REF(CLOSE,1)/REF(CLOSE,4) - 1;
TODAYDOWN := CLOSE/REF(CLOSE,1) - 1;
UPTOOFAST := 0;
IF DAYS3UP > 0.25 AND TODAYDOWN < -0.05 THEN
UPTOOFAST := 1;
ELSE IF DAYS3UP > 0.2 AND TODAYDOWN < -0.035 THEN
UPTOOFAST := 1;
ELSE IF DAYS3UP > 0.15 AND TODAYDOWN < -0.02 THEN
UPTOOFAST := 1;
SELLSIGN := (CLOSEMA2 AND (MA18COND2 OR MA18COND3) AND (VOL18CRS6 OR VOL6DN18)) OR UPTOOFAST;
IF S AND SELLSIGN THEN BEGIN
DRAWBMP(SELLSIGN, HIGH, 'sell1'),ALIGN1,VALIGN2;
S := 0;
B := 1;
BARPOSREC := BARPOS;
IF UPTOOFAST THEN FASTSELL := 1;
END;
REDUCEPOS := CLOSE/MA18 > 0.98 AND CLOSE/MA18 <= 1;
DRAWBMP(B AND REDUCEPOS, HIGH, 'ss'),ALIGN1,VALIGN2;
DRAWTEXTABS(0,25,'版本号:'+VERSION),COLORYELLOW;
DRAWTEXTABS(0,10,BKNAME),COLORWHITE;
- 上一篇:绝密跟庄买卖 加强版 (指标主图 源码 通达信 贴图) 2016/7/13
- 下一篇:简化金牌黑马 {大智慧I副图} 2016/7/13