投资者咨询:帮忙改下 谢谢 (文华财经wh7睿期)
来源:文华财经 日期:2018-8-15 17:13
runmode:0;
variable:cc=0;
ma5:=ma(c,5);
ma20:=ma(c,20);
entertime:=time>100000 and time<144500;
exitlong:cc<>1,tfilter;
exitshort:cc<>-1,tfilter;
enterlong:ref(cc,1)<>1 and cc=1,tfilter;
entershort:ref(cc,1)<>-1 and cc=-1,tfilter;
if cc>0 and ma5<ma20 then cc:=0;
if cc<0 and ma5>ma20 then cc:=0;
if cc=0 and ma5>ma20 and entertime then cc:=1;
if cc=0 and ma5<ma20 and entertime then cc:=-1;
if time>=150000 then cc:=0;
{ 原文链接:http://www.goodgupiao.com/gupiaogongshi/40750.html }
variable:cc=0;
ma5:=ma(c,5);
ma20:=ma(c,20);
entertime:=time>100000 and time<144500;
exitlong:cc<>1,tfilter;
exitshort:cc<>-1,tfilter;
enterlong:ref(cc,1)<>1 and cc=1,tfilter;
entershort:ref(cc,1)<>-1 and cc=-1,tfilter;
if cc>0 and ma5<ma20 then cc:=0;
if cc<0 and ma5>ma20 then cc:=0;
if cc=0 and ma5>ma20 and entertime then cc:=1;
if cc=0 and ma5<ma20 and entertime then cc:=-1;
if time>=150000 then cc:=0;
{ 原文链接:http://www.goodgupiao.com/gupiaogongshi/40750.html }
技术人员回复
日期:2018-8-15 17:20
您这个代码用了变量引用变量自身,需要在WH8上改编,如下
VARIABLE:CC:=0;
但如果您要看盘,请您继续使用WH7,因为这个指标对您看盘没有用处,您没必要研究
MA5:MA(C,5);
MA20:MA(C,20);
ENTERTIME:=TIME>1000 AND TIME<1445;
IF CC>0 AND MA5<MA20 THEN CC:=0;
IF CC<0 AND MA5>MA20 THEN CC:=0;
IF CC=0 AND MA5>MA20 AND ENTERTIME THEN CC:=1;
IF CC=0 AND MA5<MA20 AND ENTERTIME THEN CC:=-1;
C1:CC;