Rss & SiteMap

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

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

标题:[原创]出问题了怎么写啊。帮忙看看

1楼
xian_0_9 发表于:2013/3/22 13:27:06

3个品种比较,9点45开仓,哪个品种的涨幅最高,哪个品种开多。涨幅最低的,开空。

//涨幅公式

最高:=hhv(h,barslast(date<>ref(date,1))+1);
最低:=llv(l,barslast(date<>ref(date,1))+1);
开盘:=VALUEWHEN(DATE<>REF(DATE,1),OPEN);
涨幅:=最高-开盘;

/////模型

VARIABLE: X[3]=0;
X[1]:=STKINDI('TA00','跌幅涨幅.涨幅',0,1,0);
X[2]:=STKINDI('SR00','跌幅涨幅.涨幅',0,1,0);
X[3]:=STKINDI('RB00','跌幅涨幅.涨幅',0,1,0);
ta排名:HOD2(X,3,X[1]),LINETHICK0;
sr排名:HOD2(X,3,X[2]),LINETHICK0;
rb排名:HOD2(X,3,X[3]),LINETHICK0;
jysd:=time>=093000 and time<=144500;
if time=CLOSETIME(0) and holding>0 then sell(1,1,limitr,o);
if time=CLOSETIME(0) and holding<0 then sellshort(1,1,limitr,o);



IF ta排名=1 and holding=0 and jysd and STRCMP( stklabel,'ta00' )=0  then buy(1,1,market);
IF ta排名=3 and holding=0 and jysd and STRCMP( stklabel,'ta00' )=0  then buyshort(1,1,market);
IF sr排名=1 and holding=0 and jysd and STRCMP( stklabel,'sr00' )=0  then buy(1,1,market);
IF sr排名=3 and holding=0 and jysd and STRCMP( stklabel,'sr00' )=0  then buyshort(1,1,market);
IF rb排名=1 and holding=0 and jysd and STRCMP( stklabel,'rb00' )=0  then buy(1,1,market);
IF rb排名=3 and holding=0 and jysd and STRCMP( stklabel,'rb00' )=0  then buyshort(1,1,market);

现在表现不是我想要的啊。
 

2楼
jinzhe 发表于:2013/3/22 13:42:44
判断涨幅的公式设置成逐k线计算
3楼
xian_0_9 发表于:2013/3/22 14:25:41
是逐K也没好使:(
共3 条记录, 每页显示 10 条, 页签: [1]


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