金字塔决策交易系统

 找回密码
 

微信登录

微信扫一扫,快速登录

搜索
查看: 3739|回复: 12

debugfile 同时输出多个参数

[复制链接]

6

主题

35

帖子

35

积分

Rank: 1

等级: 新手上路

注册:
2023-1-19
曾用名:
发表于 2023-2-16 16:11 | 显示全部楼层 |阅读模式
老师好,请教我想在下面语句中增加输出即时的5日十日二十日均线值,该怎么写?

begin
平预警:1;//预警条件1
   extgbdataset(str1,date);
    DEBUGFILE('D:\AAA\AAA L.TXT',stklabel&'   sellcond:%.0f'&' 周期类型='&NUMTOSTR(datatype,0),sellcond);
end

回复

使用道具 举报

21

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-2-16 16:14 | 显示全部楼层
DEBUGFILE('D:\AAA\AAA L.TXT',stklabel&'   sellcond:%.0f'&' 周期类型=%.2f'&NUMTOSTR(datatype,0)' ma5:'&NUMTOSTR(ma5,3)&' ma10:'&NUMTOSTR(ma10,3)&' ma20:'&NUMTOSTR(ma20,3),sellcond);
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

6

主题

35

帖子

35

积分

Rank: 1

等级: 新手上路

注册:
2023-1-19
曾用名:
 楼主| 发表于 2023-2-16 16:17 | 显示全部楼层
好的 ,谢谢
回复

使用道具 举报

6

主题

35

帖子

35

积分

Rank: 1

等级: 新手上路

注册:
2023-1-19
曾用名:
 楼主| 发表于 2023-2-16 16:36 | 显示全部楼层
编译错误,无法判断该表达式的意图,  这是什么地方的问题呢
回复

使用道具 举报

6

主题

35

帖子

35

积分

Rank: 1

等级: 新手上路

注册:
2023-1-19
曾用名:
 楼主| 发表于 2023-2-16 16:36 | 显示全部楼层
ma5:=ma(c,5);

ma10:=ma(c,10);

ma20:=ma(c,20);

ma30:=ma(c,30);

ma60:=ma(c,60);

l1:=min(min(min(ma10,ma20),ma30),ma60) ;

l2:=max(max(max(ma10,ma20),ma30),ma60) ;

a:ma5>l1&&(c< ref(c,1) || ref(c,1)< ref(c,2)
|| ma5<ma10 )&&(ma5>ma20
|| ma5>ma60) &&(( ( l1>( l-(hhv(h,5)-l)*0.15) and  ref(c,1)> ref(l1,1) )
||( l<l1 and (ref(c,1)> ref(l1,1) || c>l1)))) ;

b:ma5<l2&&(c> ref(c,1) || ref(c,1)> ref(c,2)
|| ma5>ma10 )&&(ma5<ma20
|| ma5<ma60) &&(( ( l2<( h+(h-llv(l,5))*0.15) and  ref(c,1)< ref(l2,1) )
||( h>l2 and (ref(c,1)< ref(l2,1) || c<l2)))) ;


sellcond:=a;
buycond:=b;

str1:STKLABEL&' '&NUMTOSTR(datatype,0)&' t11';
str2:STKLABEL&' '&NUMTOSTR(datatype,0)&' t22';
t11:extgbdata(str1);
t22:extgbdata(str2);

IF DATE<>REF(DATE,1) THEN BEGIN
   extgbdataset(str1,0);
   extgbdataset(str2,0);
   END       

if  sellcond and t11<TIME  then

begin
平预警:1;//预警条件1
extgbdataset(str1,TIME);
DEBUGFILE('D:\AAA\AAA L.TXT',stklabel&'   sellcond:%.0f'&' 周期类型=%.2f'&NUMTOSTR(datatype,0)'  ma5:'&NUMTOSTR(ma5,3)&' ma10:'&NUMTOSTR(ma10,3)&' ma20:'&NUMTOSTR(ma20,3),sellcond);
end

if  buycond and t22<TIME then
begin
开预警:1;//预警条件2
extgbdataset(str2,TIME);
DEBUGFILE('D:\AAA\UMS###.TXT',stklabel&'  BUYCON:%.0f'&' 周期类型='&NUMTOSTR(datatype,0)',buycond);
回复

使用道具 举报

6

主题

35

帖子

35

积分

Rank: 1

等级: 新手上路

注册:
2023-1-19
曾用名:
 楼主| 发表于 2023-2-16 16:37 | 显示全部楼层
这是整段逻辑
回复

使用道具 举报

6

主题

35

帖子

35

积分

Rank: 1

等级: 新手上路

注册:
2023-1-19
曾用名:
 楼主| 发表于 2023-2-16 16:37 | 显示全部楼层
显示新改那一段编译错误
回复

使用道具 举报

21

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-2-16 16:38 | 显示全部楼层
漏了一个连接符,补上就行了。

DEBUGFILE('D:\AAA\AAAL.TXT',stklabel&'   sellcond:%.0f'&' 周期类型='&NUMTOSTR(datatype,0)&' ma5:'&NUMTOSTR(ma5,3)&' ma10:'&NUMTOSTR(ma10,3)&' ma20:'&NUMTOSTR(ma20,3),sellcond);
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

6

主题

35

帖子

35

积分

Rank: 1

等级: 新手上路

注册:
2023-1-19
曾用名:
 楼主| 发表于 2023-2-16 16:49 | 显示全部楼层
begin语句缺少end?我查了几遍,不缺啊,麻烦您帮我看看

sellcond:=a;
buycond:=b;

str1:STKLABEL&' '&NUMTOSTR(datatype,0)&' t11';
str2:STKLABEL&' '&NUMTOSTR(datatype,0)&' t22';
t11:extgbdata(str1);
t22:extgbdata(str2);

IF DATE<>REF(DATE,1) THEN BEGIN
   extgbdataset(str1,0);
   extgbdataset(str2,0);
   END       

if  sellcond and t11<TIME  then

begin
平预警:1;//预警条件1
extgbdataset(str1,TIME);
DEBUGFILE('D:\AAA\AAAL.TXT',stklabel&'   sellcond:%.0f'&' 周期类型='&NUMTOSTR(datatype,0)
&' ma5:'&NUMTOSTR(ma5,3)&' ma10:'&NUMTOSTR(ma10,3)&' ma20:'&NUMTOSTR(ma20,3),sellcond);

end

if  buycond and t22<TIME then
begin
开预警:1;//预警条件2
extgbdataset(str2,TIME);
DEBUGFILE('D:\AAA\UMS###.TXT',stklabel&'  BUYCON:%.0f'&' 周期类型='&NUMTOSTR(datatype,0)',buycond);

end
回复

使用道具 举报

21

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-2-16 16:50 | 显示全部楼层
我是说  &  缺了一个,我不是已经补上了么。
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 微信登录

本版积分规则

手机版|小黑屋|上海金之塔信息技术有限公司 ( 沪ICP备13035422号 )

GMT+8, 2025-6-9 20:32 , Processed in 0.162284 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表