我想引用,当国内3点收盘之后,到夜市开盘之前,伦铜价格是涨还是跌,代码如下:
运行不正确,请问哪里没写对?
if time = 1459 then
tongP1:= CALLSTOCKEX('LMCDE',vtclose,1,0,30000) ;
if time = 2050 then
tongP2:= CALLSTOCKEX('LMCDE',vtclose,1,0,30000) ;
tongRise:= (tongP2-tongP1)/tongP1*1.0;
if time=2101 && tongRise >0 then
.....
if time = 1459 then
if time = 2050 then
你上面的代码time的格式是xxxxxx。这样就恒不成里。另外,你的时间点要注意,你使用的是北京时区还是金字塔时区。
if time = 2050 then 这个不管是什么时区都不成立。
[此贴子已经被作者于2016-7-5 17:02:21编辑过]
但是时间的比较格式不对,不要省略。205000这种格式试下
你好,对铜连续1分钟k线,执行以下代码,没有任何结果,能帮忙看下吗:
VARIABLE:tongP1 =0;
VARIABLE:tongP2 =0;
if time = 145900 then
tongP1:= CALLSTOCKEX('LMCDE',vtclose,1,0,30000) ;
if time = 205000 then
tongP2:= CALLSTOCKEX('LMCDE',vtclose,1,0,30000) ;
tongRise:= (tongP2-tongP1)/tongP1*1.0;
if time = 210100 && tongRise >0 then begin
MSGOUT(1,"aa");
buy(1,1,thisclose);
end
sell(time>=215000 ,1,THISCLOSE);
自己吧变量在K线上输出出来。LMCDE品种没有205000,210100 这个时间。
什么意思啊。 这个时间在k线上看了下是有的啊。我 已经调成了北京时间的