Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:一个简单的交易系统模型编写问题

1楼
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左右再记录一个价格, 如果比前者小,则做空,比前者大,则做多, 可是我的代码为什么一直不能显示于图,无法做单呢? 求专业人士解答。
2楼
jinzhe 发表于:2012/12/5 14:29:21
首先,你这样写必须是一分钟k线
然后 if time>090000 and time <091000 then 要改成if time>090000 and time <=091000 then 
共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.02246 s, 3 queries.