当输入公式源码时,提示错误如下,求高手帮忙修改公式,谢谢!

提示错误:
MACD:=2*(DIF-DEA);
A1:=CROSS(DIF,DEA);
A2:=REF(A1,1)
详细信息 : 在变量 A1 前又错误的定义一次变量!
错误起始位置 : 472 ; 长度: 2

公式源码:
{kdj三金叉}
MA5:=EMA(C,5);
MA10:=EMA(C,10);
MV5:=EMA(V,5);
MV10:=EMA(V,10);
K:="KDJ.K"(9,3,3);
D:="KDJ.D"(9,3,3);
V1:=MA5>REF(MA5,1) AND MA10>REF(MA10,1) AND C>REF(C,1) AND C/O>1.01;
VV1:=MA5>REF(MV5,1) AND MV10>=REF(MV10,1) AND V>REF(V,1)*1.2;
KD1:=K>REF(K,1) AND D>=REF(D,1);
VA:=COUNT(CROSS(K,D),4)>=1 AND COUNT(CROSS(MA5,MA10),4)>=1 AND
COUNT(CROSS(MV5,MV10),4)>=1;
{macd二次金叉}
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
A1:=CROSS(DIF,DEA);
A2:=REF(A1,1);
A3:=COUNT(A2,21);{今天之前3个星期以来曾经金叉}
A4:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,30) AND MA(C,30)>=MA(C,60)
AND MA(C,60)>=MA(C,120) AND MA(C,120)>=MA(C,250);{均线多头排列}
{去S.T.停牌}
ST:=STRFIND(stkname,'ST',1)>0;
S:=STRFIND(stkname,'S',1)>0;
停牌:=(DYNAINFO(4)=0);
选股:IF(V1 AND VV1 ADN KD1 ADN VA,1,0) and A1 AND A3 AND A4 and not(ST)
not(停牌)and not(S);

{OK.已改大智慧测试通过}
{KDJ三金叉}
MA5:=EMA(C,5);
MA10:=EMA(C,10);
MV5:=EMA(V,5);
MV10:=EMA(V,10);
K:="KDJ.K"(9,3,3);
D:="KDJ.D"(9,3,3);
V1:=MA5>REF(MA5,1) AND MA10>REF(MA10,1) AND C>REF(C,1) AND C/O>1.01;
VV1:=MA5>REF(MV5,1) AND MV10>=REF(MV10,1) AND V>REF(V,1)*1.2;
KD1:=K>REF(K,1) AND D>=REF(D,1);
VA:=COUNT(CROSS(K,D),4)>=1 AND COUNT(CROSS(MA5,MA10),4)>=1 AND
COUNT(CROSS(MV5,MV10),4)>=1;

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
A1:=CROSS(DIF,DEA);
A2:=REF(A1,1);
A3:=COUNT(A2,21);{今天之前3个星期以来曾经金叉}
A4:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,30) AND MA(C,30)>=MA(C,60)
AND MA(C,60)>=MA(C,120) AND MA(C,120)>=MA(C,250);{均线多头排列}
{去S.T.停牌}
ST:=STRFIND(STKNAME,'ST',1)>0;
S:=STRFIND(STKNAME,'S',1)>0;
停牌:=(DYNAINFO(4)=0);
选股:IF(V1 AND VV1 AND KD1 AND VA,1,0) AND A1 AND A3 AND A4 AND NOT(ST)
AND NOT(停牌)AND NOT(S);追问

我是通达信的,高手改后,发现新的问题:
错误句 : {均线多头排列}
{去S.T.停牌}
ST:=STRFIND(STKNAME,'ST',1)>0
详细信息 : 您在括号前写的不是函数、公式等,
且缺少必要的运算符!
错误起始位置 : 650 ; 长度: 2

追答

{OK.已改通达信测试通过}
{KDJ三金叉}
MA5:=EMA(C,5);
MA10:=EMA(C,10);
MV5:=EMA(V,5);
MV10:=EMA(V,10);
K:="KDJ.K"(9,3,3);
D:="KDJ.D"(9,3,3);
V1:=MA5>REF(MA5,1) AND MA10>REF(MA10,1) AND C>REF(C,1) AND C/O>1.01;
VV1:=MA5>REF(MV5,1) AND MV10>=REF(MV10,1) AND V>REF(V,1)*1.2;
KD1:=K>REF(K,1) AND D>=REF(D,1);
VA:=COUNT(CROSS(K,D),4)>=1 AND COUNT(CROSS(MA5,MA10),4)>=1 AND
COUNT(CROSS(MV5,MV10),4)>=1;

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
A1:=CROSS(DIF,DEA);
A2:=REF(A1,1);
A3:=COUNT(A2,21);{今天之前3个星期以来曾经金叉}
A4:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,30) AND MA(C,30)>=MA(C,60)
AND MA(C,60)>=MA(C,120) AND MA(C,120)>=MA(C,250);{均线多头排列}
{去S.T.停牌}
ST:=IF(NAMELIKE('S'),0,1) AND IF(NAMELIKE('*'),0,1);
停牌:=DYNAINFO(8)>0;
选股:IF(V1 AND VV1 AND KD1 AND VA,1,0) AND A1 AND A3 AND A4 AND ST
AND 停牌;

追问

谢谢高手,但仍然错误提示如下:(这个条件是否太苛刻,很难选出股票?)
错误句 : {均线多头排列}
{去S.T.停牌}
ST:=IF(NAMELIKE('S'),0,1) AND IF(NAMELIKE('*'),0,1)
详细信息 : 您在括号前写的不是函数、公式等,
且缺少必要的运算符!
错误起始位置 : 650 ; 长度: 2

追答

我的已测试通过

温馨提示:内容为网友见解,仅供参考
第1个回答  2011-06-04
{KDJ三金叉}
MA5:=EMA(C,5);
MA10:=EMA(C,10);
MV5:=EMA(V,5);
MV10:=EMA(V,10);
K:="KDJ.K"(9,3,3);
D:="KDJ.D"(9,3,3);
V1:=MA5>REF(MA5,1) AND MA10>REF(MA10,1) AND C>REF(C,1) AND C/O>1.01;
VV1:=MA5>REF(MV5,1) AND MV10>=REF(MV10,1) AND V>REF(V,1)*1.2;
KD1:=K>REF(K,1) AND D>=REF(D,1);
VA:=COUNT(CROSS(K,D),4)>=1 AND COUNT(CROSS(MA5,MA10),4)>=1 AND
COUNT(CROSS(MV5,MV10),4)>=1;

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
A1:=CROSS(DIF,DEA);
A2:=REF(A1,1);
A3:=COUNT(A2,21);{今天之前3个星期以来曾经金叉}
A4:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,30) AND MA(C,30)>=MA(C,60)
AND MA(C,60)>=MA(C,120) AND MA(C,120)>=MA(C,250);{均线多头排列}
{去S.T.停牌}
ST:=IF(NAMELIKE('S'),0,1) AND IF(NAMELIKE('*'),0,1);
停牌:=DYNAINFO(8)>0;
选股:IF(V1 AND VV1 AND KD1 AND VA,1,0) AND A1 AND A3 AND A4 AND ST
AND 停牌;
第2个回答  2013-01-13
{OK.已改通达信测试通过}
{KDJ三金叉}
MA5:=EMA(C,5);
MA10:=EMA(C,10);
MV5:=EMA(V,5);
MV10:=EMA(V,10);
K:="KDJ.K"(9,3,3);
D:="KDJ.D"(9,3,3);
V1:=MA5>REF(MA5,1) AND MA10>REF(MA10,1) AND C>REF(C,1) AND C/O>1.01;
VV1:=MA5>REF(MV5,1) AND MV10>=REF(MV10,1) AND V>REF(V,1)*1.2;
KD1:=K>REF(K,1) AND D>=REF(D,1);
VA:=COUNT(CROSS(K,D),4)>=1 AND COUNT(CROSS(MA5,MA10),4)>=1 AND
COUNT(CROSS(MV5,MV10),4)>=1;

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
A1:=CROSS(DIF,DEA);
A2:=REF(A1,1);
A3:=COUNT(A2,21);{今天之前3个星期以来曾经金叉}
A4:=MA(C,5)>=MA(C,10) AND MA(C,10)>=MA(C,30) AND MA(C,30)>=MA(C,60)
AND MA(C,60)>=MA(C,120) AND MA(C,120)>=MA(C,250);{均线多头排列}
{去S.T.停牌}
ST:=IF(NAMELIKE('S'),0,1) AND IF(NAMELIKE('*'),0,1);
停牌:=DYNAINFO(8)>0;
选股:IF(V1 AND VV1 AND KD1 AND VA,1,0) AND A1 AND A3 AND A4 AND ST
AND 停牌;
当前公式 : KDJ三金叉+MAC (条件选股公式)
错误句 : VA:=COUNT(CROSS(K,D),4)>=1 AND COUNT(CROSS(MA5,MA10),4)>=1 ANDCOUNT(CROSS(MV5,MV10),4)>=1
详细信息 : 您在括号前写的不是函数、公式等,
且缺少必要的运算符!
错误起始位置 : 322 ; 长度: 5
请教高手如果办?

当输入公式源码时,提示错误如下,求高手帮忙修改公式,谢谢!
{OK.已改大智慧测试通过} {KDJ三金叉} MA5:=EMA(C,5);MA10:=EMA(C,10);MV5:=EMA(V,5);MV10:=EMA(V,10);K:="KDJ.K"(9,3,3);D:="KDJ.D"(9,3,3);V1:=MA5>REF(MA5,1) AND MA10>REF(MA10,1) AND C>REF(C,1) AND C\/O>1.01;VV1:=MA5>REF(MV5,1) AND...

通信达软件,当输入公式源码时,提示错误如下,求高手帮忙修改公式,谢谢...
如是这个公式你私聊联系我一下吧,我看能不能给你发私聊里,因为代码过长,字数限制,发不了.

当输入公式源码时,提示错误如下,求高手帮忙...
中期大底:LLV(J,AA),LINETHICK2,COLOR0000FF;

通达信源代码导入提示错误
少了一个运算符号:> 或 < 或=,至于哪个才是正确,要看你的要求了,不过,按原公式来看,属于大于号的多点,改正如下:站上三线:=REF(C,1)>MA(C,5) AND C>MA(C,10) AND C>MA(C,21) ;晕,怎么漏这么多,还有一处错误:连续下跌:=COUNT(C=3;修改如下:连续下跌:=COUNT(C<ref(c,...

通达信DDX公式显示错误,求高手帮忙纠正
V4:=IF(H=L,1,WJ-MIN(C,O));V5:=VOL\/IF(H=L,4,H-L);V6:=(V1*V5);V7:=(V2*V5);V8:=(V3*V5);V9:=(V4*V5);买盘:=(V9+V8);卖盘:=(V6+V7);买卖差:=买盘-卖盘;DDX:=买卖差;DX:=MA(买卖差,5)*20;N:=5;M:=13;N日内净流入:=SUM(DDX,N)*3;流入:=IF(N日内净...

excel 表格公式,自己手写输入的,就是不对,请求高手帮忙!
使用row(A1)或row(1:1),公式可改为下面方式:=INDEX(凭证!B:B,SMALL(IF(凭证!$K$3:$K$1317=明细账!$A$1,ROW(凭证!$K$3:$K$1317)-2,65536),ROW(1:1)))=INDEX(凭证!$B$3:$B$1317,SMALL(IF(凭证!$K$3:$K$1317=明细账!$A$1,ROW($1:$1315),4^8),ROW(A1)))...

求高手帮忙改下指标公式
OK:=EMA(O,60); CG:=EMA(C,60);PDU:=IF(OK>REF(OK,1) AND CG>REF(CG,1),1,0); Z1:=MA(C,13);ZX:=REF(Z1,13\/2+1); LIFE:=(EMA(C,60)+EMA(C,90))\/2;VAR1:=(2*C+H+L)\/4; SNOOK:=EMA(VAR1,99)*0.91;A1:=(C-REF(C,1))\/REF(C,1)*100; MA5:...

急急 跪求高手老师帮忙把通达信修改公式
M1:=5; M2:=60;VOLUME:VOL,VOLSTICK;MAVOL1:MA(VOLUME,M1);MAVOL2:MA(VOLUME,M2);VVOL:IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240\/FROMOPEN,DRAWNULL),NODRAW;STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,VVOL,0,-1,-1),COLOR00C0C0;AA:=VOL>REF(V,1)*1.9;AA1:=VOL<REF(LLV(VOL,13)...

求高手帮忙把以下指标公式改成选股公式
VAR6:=(CLOSE-LLV(CLOSE,530))\/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)\/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)\/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;VARA:=BARSCOUNT(CLOSE);...

麻烦哪位高手帮忙修改一个选股公式,要求选股当日操盘线由绿色变为紫色...
A:=EMA(JJ,6);B:=EMA(JJ,2);操盘线:=(20*B+19*REF(B,1)+18*REF(B,2)+17*REF(B,3)+16*REF(B,4)+15*REF(B,5)+14*REF(B,6)+13*REF(B,7)+12*REF(B,8)+11*REF(B,9)+10*REF(B,10)+9*REF(B,11)+8*REF(B,12)+7*REF(B,13)+6*REF(B,14)+5*REF(B,15...

相似回答