Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:请问下面的功能应当怎样写

1楼
izhangmh 发表于:2016/2/29 11:23:52
希望将最后的动作写入文件,通过action_note全局变量保证只写入一次,但实际上每TICK都会重写一次。

请问正确的方法是什么呢?
debugfile2提示在本模式下不能正确工作,我先忽略了。

运行模式:逐K(仅刷新最后一根)

variable : action_note = 0;

if islastbar() and action_note = 0 then begin
 action_note := 1;
 debugfile2('e:\latest_action.txt', latest_action, 0, 1);
end
2楼
jinzhe 发表于:2016/2/29 11:28:19
globalvariable : action_note = 0,bj=0;

if islastbar() and action_note = 0 and bj=0 then begin
 debugfile('e:\latest_action.txt', 'latest_atciont = %.2f',latest_action);
 ac tion_note := 1;
 bj:=1;
end
试试看这个
用在后台比较好
共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.03125 s, 3 queries.