文华财经指标提示 试图从不是字符串的变量中提取字符串 [文华财经]
- 咨询内容:
AA:=REF(HIGH,n)=HHV(HIGH,2*n+1);
AAA:=FILTER(AA,n);
BB:=BACKSET(AAA,n+1);
CC1:=FILTER(BB,n);
CC:=CC1 OR ISLASTBAR;
AA2:=REF(LOW,10)=LLV(LOW,2*101+1);
AAA2:=FILTER(AA2,n);
BB2:=BACKSET(AAA2,n+1);
CC22:=FILTER(BB2,n);
CC2:=CC22 AND NOT(CC1);
EA:=BACKSET(CC,REF(BARSLAST(CC2),1)+1);
EB:=EA>REF(EA,1);
EE:=BACKSET(EB,2);
FF1:=EE>REF(EE,1);
EE2:=BACKSET(FF1 AND COUNT(CC,REF(BARSLAST(CC2),1)+2)=0,REF(BARSLAST(CC2),1)+2);
FF2:=EE2>REF(EE2,1);
EE3:=BACKSET(FF2 AND COUNT(CC,REF(BARSLAST(CC2),1)+2)=0,REF(BARSLAST(CC2),1)+2);
FF3:=EE3>REF(EE3,1);
JS:=IFELSE(CC,COUNT(CC2,REF(BARSLAST(CC),1)+1),0);
G1:=IFELSE(JS=1 AND CC,BARSLAST(FF1),0);
GA:=IFELSE(CC AND REF(LOW,BARSLAST(FF1))>=REF(LOW,BARSLAST(FF2)),BARSLAST(FF2),BARSLAST(FF1));
G2:=IFELSE(JS=2 AND CC,GA,0);
G3:=IFELSE(JS>=3 AND CC,IFELSE(CC AND REF(LOW,GA)>=REF(LOW,BARSLAST(FF3)),BARSLAST(FF3),GA),0);
GG:=G1+G2+G3;
JA:=BACKSET(CC,GG);
JB:=JA>REF(JA,1);
JJ:=BACKSET(JB,2);
LD:=JJ>REF(JJ,1);
LD1:=LD OR ISLASTBAR;
HEA:=BACKSET(LD1,REF(BARSLAST(CC),1)+1);
HEB:=HEA>REF(HEA,1);
HEE:=BACKSET(HEB,2);
HFF1:=HEE>REF(HEE,1);
HEE2:=BACKSET(HFF1 AND COUNT(LD1,REF(BARSLAST(CC),1)+2)=0,REF(BARSLAST(CC),1)+2);
HFF2:=HEE2>REF(HEE2,1);
HEE3:=BACKSET(HFF2 AND COUNT(LD1,REF(BARSLAST(CC),1)+2)=0,REF(BARSLAST(CC),1)+2);
HFF3:=HEE3>REF(HEE3,1);
HJS:=IFELSE(LD1,COUNT(CC1,REF(BARSLAST(LD1),1)+1),0);
HG1:=IFELSE(HJS=1 AND LD1,BARSLAST(HFF1),0);
HGA:=IFELSE(LD1 AND REF(HIGH,BARSLAST(HFF1))<=REF(HIGH,BARSLAST(HFF2)),BARSLAST(HFF2),BARSLAST(HFF1));
HG2:=IFELSE(HJS=2 AND LD1,HGA,0);
HG3:=IFELSE(HJS>=3 AND LD1,IFELSE(LD1 AND REF(HIGH,HGA)<=REF(HIGH,BARSLAST(HFF3)),BARSLAST(HFF3),HGA),0);
HGG:=HG1+HG2+HG3;
HJA:=BACKSET(LD1,HGG);
HJB:=HJA>REF(HJA,1);
HJJ:=BACKSET(HJB,2);
HD:=HJJ>REF(HJJ,1);
X1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
X2:=X1>REF(X1,1);
Y1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
Y2:=Y1>REF(Y1,1);
Z1:=IFELSE(BARSLAST(X2)<BARSLAST(Y2),X2,Y2);
Z2:=IFELSE(BARSLAST(X2)<BARSLAST(Y2),LOW,HIGH);
//DRAWLINE(Z1,Z2,ISLASTBAR,CLOSE,0),COLORGREEN;//下跌符号
UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
//DRAWLINE(XX,LOW,VV,LOW,1),COLORRED ; //上涨符号
UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
DRAWLINE(XX2,HIGH,VV2,HIGH,1);
DRAWICON(HD AND XX2,HIGH*1.002,12);
DRAWICON(LD AND XX,LOW*1.002,10);
GAO1:REF(HIGH,BARSLAST(VV2)),COLORGREEN;// 高1
GAO2:REF(HIGH,BARSLAST(XX2)),COLORCYAN; // 高2
DI1:REF(LOW,BARSLAST(VV)),COLORYELLOW;// 低1
DI2:REF(LOW,BARSLAST(XX)),COLORRED;//低2这个指标老版本能用/现在提示:试图从不是字符串的变量中提取字符串
- 赢顺技术人员:
您设置的n为10的参数吗?需要对n进行定义(建议使用半角大写英文);
为您修改如下,您看看是否您要的效果:
n:=10;
AA:=REF(HIGH,n)=HHV(HIGH,2*n+1);
AAA:=FILTER(AA,n);
BB:=BACKSET(AAA,n+1);
CC1:=FILTER(BB,n);
CC:=CC1 OR ISLASTBAR;
AA2:=REF(LOW,10)=LLV(LOW,2*10+1);
AAA2:=FILTER(AA2,n);
BB2:=BACKSET(AAA2,n+1);
CC22:=FILTER(BB2,n);
CC2:=CC22 AND NOT(CC1);
EA:=BACKSET(CC,REF(BARSLAST(CC2),1)+1);
EB:=EA>REF(EA,1);
EE:=BACKSET(EB,2);
FF1:=EE>REF(EE,1);
EE2:=BACKSET(FF1 AND COUNT(CC,REF(BARSLAST(CC2),1)+2)=0,REF(BARSLAST(CC2),1)+2);
FF2:=EE2>REF(EE2,1);
EE3:=BACKSET(FF2 AND COUNT(CC,REF(BARSLAST(CC2),1)+2)=0,REF(BARSLAST(CC2),1)+2);
FF3:=EE3>REF(EE3,1);
JS:=IFELSE(CC,COUNT(CC2,REF(BARSLAST(CC),1)+1),0);
G1:=IFELSE(JS=1 AND CC,BARSLAST(FF1),0);
GA:=IFELSE(CC AND REF(LOW,BARSLAST(FF1))>=REF(LOW,BARSLAST(FF2)),BARSLAST(FF2),BARSLAST(FF1));
G2:=IFELSE(JS=2 AND CC,GA,0);
G3:=IFELSE(JS>=3 AND CC,IFELSE(CC AND REF(LOW,GA)>=REF(LOW,BARSLAST(FF3)),BARSLAST(FF3),GA),0);
GG:=G1+G2+G3;
JA:=BACKSET(CC,GG);
JB:=JA>REF(JA,1);
JJ:=BACKSET(JB,2);
LD:=JJ>REF(JJ,1);
LD1:=LD OR ISLASTBAR;
HEA:=BACKSET(LD1,REF(BARSLAST(CC),1)+1);
HEB:=HEA>REF(HEA,1);
HEE:=BACKSET(HEB,2);
HFF1:=HEE>REF(HEE,1);
HEE2:=BACKSET(HFF1 AND COUNT(LD1,REF(BARSLAST(CC),1)+2)=0,REF(BARSLAST(CC),1)+2);
HFF2:=HEE2>REF(HEE2,1);
HEE3:=BACKSET(HFF2 AND COUNT(LD1,REF(BARSLAST(CC),1)+2)=0,REF(BARSLAST(CC),1)+2);
HFF3:=HEE3>REF(HEE3,1);
HJS:=IFELSE(LD1,COUNT(CC1,REF(BARSLAST(LD1),1)+1),0);
HG1:=IFELSE(HJS=1 AND LD1,BARSLAST(HFF1),0);
HGA:=IFELSE(LD1 AND REF(HIGH,BARSLAST(HFF1))<=REF(HIGH,BARSLAST(HFF2)),BARSLAST(HFF2),BARSLAST(HFF1));
HG2:=IFELSE(HJS=2 AND LD1,HGA,0);
HG3:=IFELSE(HJS>=3 AND LD1,IFELSE(LD1 AND REF(HIGH,HGA)<=REF(HIGH,BARSLAST(HFF3)),BARSLAST(HFF3),HGA),0);
HGG:=HG1+HG2+HG3;
HJA:=BACKSET(LD1,HGG);
HJB:=HJA>REF(HJA,1);
HJJ:=BACKSET(HJB,2);
HD:=HJJ>REF(HJJ,1);
X1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
X2:=X1>REF(X1,1);
Y1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
Y2:=Y1>REF(Y1,1);
Z1:=IFELSE(BARSLAST(X2)<BARSLAST(Y2),X2,Y2);
Z2:=IFELSE(BARSLAST(X2)<BARSLAST(Y2),LOW,HIGH);
//DRAWLINE(Z1,Z2,ISLASTBAR,CLOSE,0),COLORGREEN;//下跌符号
UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
//DRAWLINE(XX,LOW,VV,LOW,1),COLORRED ; //上涨符号
UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
DRAWLINE(XX2,HIGH,VV2,HIGH,1);
DRAWICON(HD AND XX2,HIGH*1.002,'12');
DRAWICON(LD AND XX,LOW*1.002,'10');
GAO1:REF(HIGH,BARSLAST(VV2)),COLORGREEN;// 高1
GAO2:REF(HIGH,BARSLAST(XX2)),COLORCYAN; // 高2
DI1:REF(LOW,BARSLAST(VV)),COLORYELLOW;// 低1
DI2:REF(LOW,BARSLAST(XX)),COLORRED;//低2 - 赢顺客服:
谢谢老师OK
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 262069696 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容