这是我的bugfile2中的记录,
2012-10-19 13:06:23.625 open_close_min2320.20
2012-10-19 13:06:23.640 open_close_max2323.00
2012-10-19 13:06:23.625 open_close_min2318.60
2012-10-19 13:06:23.625 open_close_max2320.20
这是怎么回事
两个绿色 时间点相同,但是同一个变量却相差很大,达2320.20-2318.60=1.6
能发一下公式吗?
ref_close := close[barpos-1];
ref_open := open[barpos-1];
open_close_min := min(ref_close,ref_open);
open_close_max := max(ref_close,ref_open);
k线模式下运行代码
另外,模拟环境下,后台运行,tholding读不到仓位?
后台运行,采用5min钟周期,固定轮询,
2012-10-19 14:52:43.453 2012-10-19 14:52:43.468 , 时间间隔为15毫秒
同时为了测试open能否在后台中运行,
2012-10-19 14:52:43.468 kaipanjia2351.80
2012-10-19 14:52:43.468 kaipanjia2349.20
2012-10-19 14:52:43.484 kaipanjia2351.40
kaipanjia := open;
为什么在5min中周期下,open不是固定的价格,而是不断变化的?
给我程序造成啦很大困难,希望解决。
怎么输出的,输出变量的代码是什么
可否给出一个能复现该问题的公式代码,便于我们进行问题的排查
2012-10-22 11:11:05.283 zuigaozhi2316.40
2012-10-22 11:11:05.283 zuigaozhi2316.40
2012-10-22 11:11:05.283 kaipanjia2315.40
2012-10-22 11:11:05.283 shoupanjia2313.60
2012-10-22 11:11:05.283 开仓以来根数0
2012-10-22 11:11:05.283 zuixiaozhi2311.20
红色显示, 同一时刻,zuixiaozhi有不同的值
你们用这个简单的后台代码测试下吧
1 support := ma(high, 40);
2 resistance := ma(low, 40);
3 bccond := high > ref(support , 1);
4 spcond := low < ref(resistance, 1);
5 if tholding = 0 then begin
6 if bccond then tbuy(1,1,lmt,high+mindiff,0);
7 if spcond then tbuyshort(1,1, lmt, low-mindiff, 0);
8 end
9
10 if tholding > 0 then begin
11 if spcond then begin
12 tsell(1,1, lmt, low-mindiff, 0);
13 tbuyshort(1,1, lmt, low-mindiff, 0);
14 end
15 end
16
17 if tholding < 0 then begin
18 if bccond then begin
19 tsellshort(1,1,lmt,high+mindiff,0);
20 tbuy(1,1,lmt,high+mindiff,0);
21 end
22 end
23
24 debugfile2('f:\file\strategy\interval\houtai\debugfile.txt','开仓以来根数%.0f',tenterbars,1);
25 debugfile2('f:\file\strategy\interval\houtai\debugfile.txt','zuixiaozhi%.2f',low,1);
26 debugfile2('f:\file\strategy\interval\houtai\debugfile.txt','zuigaozhi%.2f',high,1);
27 debugfile2('f:\file\strategy\interval\houtai\debugfile.txt','kaipanjia%.2f',open,1);
28 debugfile2('f:\file\strategy\interval\houtai\debugfile.txt','shoupanjia%.2f',close,1);