开拓者期货期权程序化系统交易论坛

标题: 这段代码为何无法通过编译? [打印本页]

作者: talent900    时间: 2007-12-28 11:09:17     标题: 这段代码为何无法通过编译?

Vars
Numeric Mp(0)
Begin
Mp=marketposion;
if (close>high(1) and close>high(2) and mp<>1)
{buy(1,0,true);
}
if (close<low(1) and close<low(2) and mp<>-1)
{sellshort(1,0,true)
}
While (time>0.145900);
{ buy(1,0);
sellshort(1,0);
}
End
作者: talent900    时间: 2007-12-28 11:10:45     标题: 还有这一段,也不能成功编译?

Vars
Numeric Highprice
Numeric lowprice
Numeric mp
Begin
Mp=marketposion
While (time>0.0900 and time<0.0930)
{
highprice=max(high,highprice);
lowprice=min(low,lowprice);
}
While(time>0.0930)
{if (close>highprice and mp<>1)
{buy(1,0,true)}
If(close<lowprice and mp<>-1)
{sellshort(1,0,true)}
}
While (time>0.145900)
{ buy(1,0);
sellshort(1,0)
}
End
作者: nopain    时间: 2007-12-28 11:16:24

分号
作者: talent900    时间: 2007-12-28 15:53:11

每一行语句,都需要加分号吗?
作者: nopain    时间: 2007-12-28 16:09:52

建议看其他朋友写的例子,也可以参看帮助中关于语句的描述。
作者: talent900    时间: 2007-12-28 16:13:21

老大比我还懒,不愿意帮忙改!




欢迎光临 开拓者期货期权程序化系统交易论坛 (http://bbs.tb18.net/) Powered by Discuz! X2