出现红柱后涨幅超过5%
-
相关简介:编写要求: www.guhai.com.cn 股海网解答: 网友求助: 以下代码出现红柱是买入信号,我想编写一个出现红柱后涨幅超过5%卖出,如何编写 VARF1:=MA(HHV(HIGH,485),17); VARF2:=MA(HHV(HIGH,222),17); VARF3:=MA(HHV(HIGH,96),17); VARF4:=MA(LLV(LOW,485),17); VARF5:=MA(LLV(LOW,222),17); VARF6:=MA(LLV(LOW,96),17); VARF7
-
文章来源:股海网作者:股海网发布时间:2015-08-04浏览次数:
编写要求:
www.guhai.com.cn股海网解答:
网友求助:
以下代码出现红柱是买入信号,我想编写一个出现红柱后涨幅超过5%卖出,如何编写
VARF1:=MA(HHV(HIGH,485),17);
VARF2:=MA(HHV(HIGH,222),17);
VARF3:=MA(HHV(HIGH,96),17);
VARF4:=MA(LLV(LOW,485),17);
VARF5:=MA(LLV(LOW,222),17);
VARF6:=MA(LLV(LOW,96),17);
VARF7:=MA((VARF4*0.96+VARF5*0.96+VARF6*0.96+VARF1*0.558+VARF2*0.558+VARF3*0.558)/6,17);
VARF8:=MA((VARF4*1.25+VARF5*1.23+VARF6*1.2+VARF1*0.55+VARF2*0.55+VARF3*0.65)/6,17);
VARF9:=MA((VARF4*1.3+VARF5*1.3+VARF6*1.3+VARF1*0.68+VARF2*0.68+VARF3*0.68)/6,17);
VARFA:=MA((VARF7*3+VARF8*2+VARF9)/6*1.738,17);
VAFF := EMA(CLOSE,12) - EMA(CLOSE,26);
VAA :=EMA(VAFF,9);
JC:=CROSS(VAFF,Vaa);
VARFB:=IF(C=C,VARFA,VARFA*DAY);
VARFC:=LOW;
VARFD:=REF(LOW,1);
VARFE:=SMA(ABS(VARFC-VARFD),3,1)/SMA(MAX(VARFC-VARFD,0),3,1)*100;
VARFF:=MA(IF(CLOSE*1.35<=VARFB,VARFE*10,VARFE/10),3);
VARF10:=LLV(LOW,30);
VARF11:=HHV(VARFF,30);
mdzb:=IF(C=C,MA(IF(LOW<=VARF10,(VARFF+VARF11*2)/2,0),3),100000000)/(200),colorred,LINETHICK2;
zq:=SUMBARS(CROSS(mdzb,0.5),1);
xmdgs:= jc AND COUNT(jc,zq)=1;
STICKLINE(xmdgs,60,1,7,1),colorred;
VARF1:=MA(HHV(HIGH,485),17);
VARF2:=MA(HHV(HIGH,222),17);
VARF3:=MA(HHV(HIGH,96),17);
VARF4:=MA(LLV(LOW,485),17);
VARF5:=MA(LLV(LOW,222),17);
VARF6:=MA(LLV(LOW,96),17);
VARF7:=MA((VARF4*0.96+VARF5*0.96+VARF6*0.96+VARF1*0.558+VARF2*0.558+VARF3*0.558)/6,17);
VARF8:=MA((VARF4*1.25+VARF5*1.23+VARF6*1.2+VARF1*0.55+VARF2*0.55+VARF3*0.65)/6,17);
VARF9:=MA((VARF4*1.3+VARF5*1.3+VARF6*1.3+VARF1*0.68+VARF2*0.68+VARF3*0.68)/6,17);
VARFA:=MA((VARF7*3+VARF8*2+VARF9)/6*1.738,17);
VAFF := EMA(CLOSE,12) - EMA(CLOSE,26);
VAA :=EMA(VAFF,9);
JC:=CROSS(VAFF,Vaa);
VARFB:=IF(C=C,VARFA,VARFA*DAY);
VARFC:=LOW;
VARFD:=REF(LOW,1);
VARFE:=SMA(ABS(VARFC-VARFD),3,1)/SMA(MAX(VARFC-VARFD,0),3,1)*100;
VARFF:=MA(IF(CLOSE*1.35<=VARFB,VARFE*10,VARFE/10),3);
VARF10:=LLV(LOW,30);
VARF11:=HHV(VARFF,30);
mdzb:=IF(C=C,MA(IF(LOW<=VARF10,(VARFF+VARF11*2)/2,0),3),100000000)/(200),colorred,LINETHICK2;
zq:=SUMBARS(CROSS(mdzb,0.5),1);
xmdgs:= jc AND COUNT(jc,zq)=1;
STICKLINE(xmdgs,60,1,7,1),colorred;
解答如下:
VARF1:=MA(HHV(HIGH,485),17);
VARF2:=MA(HHV(HIGH,222),17);
VARF3:=MA(HHV(HIGH,96),17);
VARF4:=MA(LLV(LOW,485),17);
VARF5:=MA(LLV(LOW,222),17);
VARF6:=MA(LLV(LOW,96),17);
VARF7:=MA((VARF4*0.96+VARF5*0.96+VARF6*0.96+VARF1*0.558+VARF2*0.558+VARF3*0.558)/6,17);
VARF8:=MA((VARF4*1.25+VARF5*1.23+VARF6*1.2+VARF1*0.55+VARF2*0.55+VARF3*0.65)/6,17);
VARF9:=MA((VARF4*1.3+VARF5*1.3+VARF6*1.3+VARF1*0.68+VARF2*0.68+VARF3*0.68)/6,17);
VARFA:=MA((VARF7*3+VARF8*2+VARF9)/6*1.738,17);
VAFF := EMA(CLOSE,12) - EMA(CLOSE,26);
VAA :=EMA(VAFF,9);
JC:=CROSS(VAFF,VAA);
VARFB:=IF(C=C,VARFA,VARFA*DAY);
VARFC:=LOW;
VARFD:=REF(LOW,1);
VARFE:=SMA(ABS(VARFC-VARFD),3,1)/SMA(MAX(VARFC-VARFD,0),3,1)*100;
VARFF:=MA(IF(CLOSE*1.35<=VARFB,VARFE*10,VARFE/10),3);
VARF10:=LLV(LOW,30);
VARF11:=HHV(VARFF,30);
MDZB:=IF(C=C,MA(IF(LOW<=VARF10,(VARFF+VARF11*2)/2,0),3),100000000)/(200);
ZQ:=SUMBARS(CROSS(MDZB,0.5),1);
XMDGS:= JC AND COUNT(JC,ZQ)=1;
卖出:XMDGS AND C/REF(C,1)>1.05;
VARF2:=MA(HHV(HIGH,222),17);
VARF3:=MA(HHV(HIGH,96),17);
VARF4:=MA(LLV(LOW,485),17);
VARF5:=MA(LLV(LOW,222),17);
VARF6:=MA(LLV(LOW,96),17);
VARF7:=MA((VARF4*0.96+VARF5*0.96+VARF6*0.96+VARF1*0.558+VARF2*0.558+VARF3*0.558)/6,17);
VARF8:=MA((VARF4*1.25+VARF5*1.23+VARF6*1.2+VARF1*0.55+VARF2*0.55+VARF3*0.65)/6,17);
VARF9:=MA((VARF4*1.3+VARF5*1.3+VARF6*1.3+VARF1*0.68+VARF2*0.68+VARF3*0.68)/6,17);
VARFA:=MA((VARF7*3+VARF8*2+VARF9)/6*1.738,17);
VAFF := EMA(CLOSE,12) - EMA(CLOSE,26);
VAA :=EMA(VAFF,9);
JC:=CROSS(VAFF,VAA);
VARFB:=IF(C=C,VARFA,VARFA*DAY);
VARFC:=LOW;
VARFD:=REF(LOW,1);
VARFE:=SMA(ABS(VARFC-VARFD),3,1)/SMA(MAX(VARFC-VARFD,0),3,1)*100;
VARFF:=MA(IF(CLOSE*1.35<=VARFB,VARFE*10,VARFE/10),3);
VARF10:=LLV(LOW,30);
VARF11:=HHV(VARFF,30);
MDZB:=IF(C=C,MA(IF(LOW<=VARF10,(VARFF+VARF11*2)/2,0),3),100000000)/(200);
ZQ:=SUMBARS(CROSS(MDZB,0.5),1);
XMDGS:= JC AND COUNT(JC,ZQ)=1;
卖出:XMDGS AND C/REF(C,1)>1.05;
上一篇:前日高开3%以上且收上涨的假阴线选股指标
下一篇:做两个预警指标