以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  请教Debugout ,Sendmail的问题。  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=391)

--  作者:bhwhui
--  发布时间:2009/12/7 12:33:28
--  请教Debugout ,Sendmail的问题。

在监控中选取1秒周期监控。我想每5分钟监控一次,发一次邮件。代码如下:

 

l4:INTPART(CurrentTIME/100)+1;
r2:Currenttime-INTPART(CurrentTIME/100)*100;
//ok:=(l4>0900 and l4<=1015 or l4>1030 and l4<=1130 or l4>1330 and l4<=1500);
ok:=1;
if (60-r2)<=3 and ok and l4/5=intpart(l4/5) then   //5min显示一次
begin
ts:=NUMTOSTR(currenttime(),0)+\' 资产:\'+numtostr(Tasset,0)+\' 持仓:\'+numtostr(Tholding,0)+\' 均价:\'+numtostr(TAVGENTERPRICE,0)+\' 现价:\'+numtostr(c,0)+\' 止损:\';
Debugout(ts,1);
Sendmail(1,\'380777985@qq.com\',\'金字塔提示\',ts);
end;

现在的问题是:

1:每1秒,监控的小窗口就会自动输出一行字,例如:

09.12.07 12:12:21 M09
运行结束
09.12.07 12:12:22 M09
运行结束
09.12.07 12:12:23 M09
运行结束
09.12.07 12:12:24 M09
运行结束
09.12.07 12:12:25 M09
运行结束

 

没办法控制不让每秒输出?而仅每5min和有成交的时候输出(以上程序控制的是每5min,没控制成交时间)?

 

2:Sendmail 需要调通什么环节?Outlook?以上语句有错误么?

 

谢谢。

[此贴子已经被作者于2009-12-7 12:33:57编辑过]

--  作者:admin
--  发布时间:2009/12/7 13:50:16
--  

09.12.07 12:12:25 M09
运行结束

 

表示本次遍历预警结束,因为你选的是每隔1秒预警一次.

这个消息只是告诉你系统已经在你预定的时间内完成了一遍扫描