首页 > 软件 > Z1:=STRCAT(DYBLOCK,' ');行244: 语法错误, 变量未定义

Z1:=STRCAT(DYBLOCK,' ');行244: 语法错误, 变量未定义

软件 2024-04-19

行1: 语法错误, 变量未定义?

在这段代码中,出现了语法错误,提示变量未定义。这是因为在Pascal中,没有名为的函数或变量。

根据代码的结构,可能是想要使用字符串拼接函数的功能,应该使用Pascal中的StrUtils单元中的Concat函数,而不是C语言中的strcat函数。

因此,将代码中的STRCAT替换为Concat函数即可,示例如下:

uses StrUtils;var
Z1, Z2: string;
begin
Z1 := '[' + CODE + STKNAME + ']';
Z2 := ' 行业:' + HYBLOCK;
Z1 := Concat(Z1, Z2); // ...end.

这个示例中,我们通过uses语句引入了StrUtils单元,然后使用Concat函数实现字符串拼接。Concat函数接受两个字符串参数,并返回一个新的字符串,其中包含这两个字符串的内容。最后,我们将拼接后的结果存储在Z1变量中。

通达信私募内部专用指标公式

以下是私募操盘手内部专用指标:
一、Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED;
HAN:=DATE<1141230;
当前获利筹码:=IF(WINNER(CLOSE),WINNER(CLOSE)*100,0);
DRAWKLINE(H,O,L,C);
九十成本集中:=(COST(95)-COST(5))/(COST(95)+COST(5))*100;
成本价:COST(九十成本集中),LINETHICK2,COLORMAGENTA;
入1:IF(成本价>REF(成本价,1),成本价,DRAWNULL),COLORRED,LINETHICK2;
出1:IF(成本价二、STICKLINE(成本价>LOW AND 成本价STICKLINE(成本价>LOW AND 成本价STICKLINE(成本价>LOW AND 成本价STICKLINE(成本价>LOW AND 成本价STICKLINE(成本价>LOW AND 成本价三、STICKLINE(成本价>MIN(C,O) AND 成本价STICKLINE(成本价>MIN(C,O) AND 成本价STICKLINE(成本价>MIN(C,O) AND 成本价STICKLINE(成本价>MIN(C,O) AND 成本价STICKLINE(成本价>MIN(C,O) AND 成本价四、STICKLINE(成本价>HIGH,CLOSE,OPEN,3.2,0)*HAN,COLOR0077FF;
STICKLINE(成本价>HIGH,CLOSE,OPEN,2.5,0)*HAN,COLOR0099FF;
STICKLINE(成本价>HIGH,CLOSE,OPEN,1.9,0)*HAN,COLOR00BBFF;
STICKLINE(成本价>HIGH,CLOSE,OPEN,1.2,0)*HAN,COLOR00DDFF;
STICKLINE(成本价>HIGH,CLOSE,OPEN,0.3,0)*HAN,COLOR00FFFF;
STICKLINE(成本价>HIGH,HIGH,LOW,0,0),COLORGREEN;
DF2:=(C-REF(C,1))/REF(C,1)*100>5;
DF3:=(C-O)/O*100>4;
当天涨幅:(C-O)/O*100,NODRAW;
V型反转:=L<成本价 AND DF2;
V型反转2:=CROSS(C,成本价) AND DF2;
V型反转3:=L<成本价 AND DF3;
DRAWTEXT(V型反转,L*0.98,'_狙击'),COLORCYAN;
DRAWTEXT(V型反转2,L*0.98,'_狙击'),COLORCYAN;
DRAWTEXT(V型反转3,L*0.98,'_狙击'),COLORCYAN;
STICKLINE(V型反转=1,C,O,3.2,0),COLORRED;
STICKLINE(V型反转2=1,C,O,3.2,0),COLORRED;
STICKLINE(V型反转3=1,C,O,3.2,0),COLORRED;

通达信金牛判势指标源码和机构震仓指标怎么写,如下图效果

  1. 金牛判势主图公式:

  • DRAWGBK(C>O,RGB(60,0,0),RGB(0,0,0),1,2,1);

  • DRAWTEXT_FIX(1,0.88,5,0,'~☆~皓天~☆~'),COLORBLUE;

  • Z1:=STRCAT(HYBLOCK,' ');

  • Z2:=STRCAT(Z1,DYBLOCK);

  • Z3:=STRCAT(Z2,' ');

  • DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED;

  • 金牛:(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),DOTLINE,COLORYELLOW;

  • 金钻趋势:XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,LINETHICK2,COLORRED;

  • 金牛2:EMA(金钻趋势,25)COLORCYAN,LINETHICK2;

  • DRAWBAND(金钻趋势,RGB(55,0,0),金牛2,RGB(0,91,0));

  • DRAWKLINE(H,O,L,C);

  • STICKLINE(金钻趋势>LOW AND 金钻趋势

  • STICKLINE(金钻趋势>MIN(C,O) AND 金钻趋势

  • STICKLINE(金钻趋势>HIGH,OPEN,CLOSE,2,0),COLORYELLOW;

  • STICKLINE(金钻趋势>HIGH,HIGH,LOW,0,0),COLORYELLOW;

  • VAR23:=100*XMA(XMA((C-REF(C,1)),6),6)/XMA(XMA(ABS((C-REF(C,1))),6),6);

  • 回调买:=LLV(VAR23,2)=LLV(VAR23,7) AND COUNT(VAR23<0,2) AND CROSS(VAR23,MA(VAR23,2));

  • XG:=金钻趋势>HIGH AND 回调买 AND L<=金钻趋势;

  • DRAWTEXT(XG,L,'▲买入'),COLORRED;

  • JJ:=(HIGH+LOW+CLOSE)/3;

  • QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);

  • QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));

  • QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));

  • QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));

  • QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));

  • DDX:=((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,10000,10000),COLOR00AAAA,LINETHICK;

  • V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);

  • V5:=SMA(V2*120/FROMOPEN*5,2,1);

  • V10:=SMA(V5,5,1);

  • V20:=SMA(V10,5,1);

  • DY:=CURRBARSCOUNT=1 AND C

  • DY2:=REF(V2,1)-DY;

  • XG2:=C>O AND DY2<0.02 AND MA(C,5)>MA(C,60) AND C/REF(C,1)>=1.02 AND H<金牛;

  • {DRAWTEXT(XG2,L,'▲抓牛'),COLORYELLOW;}

  • DRAWTEXT(XG2 AND L<金钻趋势,L,'↖金钻起涨'),COLORMAGENTA;


2机构震仓副图公式:


  • VAR1:=(CLOSE+HIGH+LOW)/3;

  • VAR2:=EMA(VAR1,10);

  • VAR3:=REF(VAR2,1);

  • 绿探底震仓:IF(VAR2,10,DRAWNULL),COLORGREEN,LINETHICK9;

  • 红买: IF(VAR2>VAR3,10,DRAWNULL), COLORRED,LINETHICK9;

  • 蓝卖: IF(VAR2

  • RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;

  • 上穿买:SMA(RSV,3,1),COLORRED;

  • 下穿卖:SMA(上穿买,3,1),COLORFFFF00;

希望我的回答能使你满意。

‘乾坤决策眼’在通达信、同花顺中提示‘语法错误, 变量未定义’请高手完整修改这个公式,谢谢!

无需修改,直接通过!通达信测试通过,如下图


标签:股票 证券 信息技术 通达信 CC++

大明白知识网 Copyright © 2020-2022 www.wangpan131.com. Some Rights Reserved. 京ICP备11019930号-18