以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  一个简单的交易系统模型编写问题  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=31183)

--  作者:gongxiangban
--  发布时间:2012/12/5 14:16:35
--  一个简单的交易系统模型编写问题

VARIABLE:t1=0;
VARIABLE:t2=0;

if time>090000 and time <091000 then 
begin 
t1 := close;
end;

if time>093000 and time < 093400 then 
begin 
t2: = close;
end; 

if time >095000 and t1<t2 and t1<>0 and t2<>0 then 
begin
BUY(HOLDING=0,LOTS,THISCLOSE);
end;


大致意思是,记录开盘9点左右的一个价格,然后到了9点30左右再记录一个价格, 如果比前者小,则做空,比前者大,则做多, 可是我的代码为什么一直不能显示于图,无法做单呢? 求专业人士解答。
--  作者:jinzhe
--  发布时间:2012/12/5 14:29:21
--  
首先,你这样写必须是一分钟k线
然后 if time>090000 and time <091000 then 要改成if time>090000 and time <=091000 then