- 注册时间
- 2013-1-10
- 最后登录
- 2017-12-15
- 阅读权限
- 0
- 积分
- 262
- 精华
- 0
- 帖子
- 63
|
1,判断相等的话,可以用ROUND函数把精度搞到一致
2,time 取的是K线的时分秒,在日线及以上周期,time都返回0,
试下这个公式在1分钟,周线上跑的log
#Run_By_Bar
variable:New_Time(0);
//New_Time := 0;
Print('##',New_Time);
Print('&&',time/100);
if New_Time = time/100 then
begin
Print(New_Time, '++',time/100);
exit;
end;
ma1: Average(c,5);
New_Time := Time/100;
Print(New_Time, '--',time/100);
然后就知道原因了。我也是发现的,至于为啥还没搞明白。
log:
11-14:25:14 testsell 输出:##1424
11-14:25:14 testsell 输出:&&1425
11-14:25:14 testsell 输出:1425--1425
11-14:25:14 testsell 输出:##1424
11-14:25:14 testsell 输出:&&1425
11-14:25:14 testsell 输出:1425--1425
11-14:25:15 testsell 输出:##1424
11-14:25:15 testsell 输出:&&1425
11-14:25:15 testsell 输出:1425--1425
11-14:25:15 testsell 输出:##1424
11-14:25:15 testsell 输出:&&1425
11-14:25:15 testsell 输出:1425--1425
11-14:25:16 testsell 输出:##1424
11-14:25:16 testsell 输出:&&1425
11-14:25:16 testsell 输出:1425--1425
11-14:25:16 testsell 输出:##1424
11-14:25:16 testsell 输出:&&1425
11-14:25:16 testsell 输出:1425--1425
为啥
11-14:25:16 testsell 输出:##1424
11-14:25:16 testsell 输出:&&1425
得研究一下。。 |
|