当输入公式源码时,提示错误如下,求高手帮忙修改公式,谢谢!
提示错误:MACD:=2*(DIF-DEA);A1:=CROSS(DIF,DEA);A2:=REF(A1,1)详细信息:在变量A1前又错误的定义一次变量!错误起始位置:4...
提示错误:
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); 展开
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);
{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 停牌;
展开全部
{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 停牌;
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 停牌;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
{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
请教高手如果办?
{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
请教高手如果办?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询