Rss & SiteMap

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

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

标题:[交易系统]波动突破

1楼
z7c9 发表于:2011/2/6 12:21:46

图片点击可在新窗口打开查看

 

以下内容为程序代码:

1 runmode:0;
2
3 input:volatility(20,5,100,5);
4
5 variable:myasset=30000;
6
7 entertime:=time>=092500 and time<=145500;
8 exittime:=time>=150000;
9
10 dist:=barslast(date<>ref(date,1));
11 oo:=ref(open,dist);
12
13 highest:=oo+volatility*mindiff;
14 lowest:=oo-volatility*mindiff;
15
16 buycond:=entertime and high>=highest;
17 buyprice:=max(open,highest);
18
19 buyshortcond:=entertime and low<=lowest;
20 buyshortprice:=min(open,lowest);
21
22 if holding=0 and buycond then begin
23     buy(1,1,limitr,buyprice);
24 end
25
26 if holding=0 and buyshortcond then begin
27     buyshort(1,1,limitr,buyshortprice);
28 end
29
30 if holding>0 and exittime then begin
31     sell(1,holding,limitr,close);
32 end
33
34 if holding<0 and exittime then begin
35     sellshort(1,holding,limitr,close);
36 end
37
38 if exittime then
39     myasset:=asset;
40     
41 资产:myasset,noaxis,colormagenta;
42 次数:totaltrade,linethick0;
43 收益:(myasset-30000)/30000,linethick0;
44 胜率:percentwin,linethick0;
45 出击:totaltrade/(count(date<>ref(date,1),0)+1),linethick0;
46 连亏:maxseqloss,linethick0;
47 连赢:maxseqwin,linethick0;
48

[此贴子已经被作者于2011-10-3 11:29:50编辑过]
2楼
xian_0_9 发表于:2011/2/6 12:45:40
...春节巨献啊!!!!谢谢!!图片点击可在新窗口打开查看
3楼
szstock2002 发表于:2011/2/12 20:48:34

 runmode:0;
input:volatility(20,5,100,5);
 variable:myasset=30000;
entertime:=time>=092500 and time<=145500;   //这一句为什么编译有错误???
 exittime:=time>=150000;
 
dist:=barslast(date<>ref(date,1));
oo:=ref(open,dist);
 
 highest:=oo+volatility*mindiff;
 lowest:=oo-volatility*mindiff;

 buycond:=entertime and high>=highest;
 buyprice:=max(open,highest);
 
 buyshortcond:=entertime and low<=lowest;
 buyshortprice:=min(open,lowest);
 
 if holding=0 and buycond then begin
     buy(1,1,limitr,buyprice);
 end
 
if holding=0 and buyshortcond then begin
     buyshort(1,1,limitr,buyshortprice);
 end
 
if holding>0 and exittime then begin
    sell(1,holding,limitr,close);
end

 if holding<0 and exittime then begin
     sellshort(1,holding,limitr,close);
 end
 
 if exittime then
     myasset:=asset;
     
 资产:myasset,noaxis,colormagenta;
 次数:totaltrade,linethick0;
 收益:(myasset-30000)/30000,linethick0;
 胜率:percentwin,linethick0;
 出击:totaltrade/(count(date<>ref(date,1),0)+1),linethick0;
 连亏:maxseqloss,linethick0;
 连赢:maxseqwin,linethick0;

4楼
阿火 发表于:2011/2/12 21:04:00

字体问题。要用英文半角输入

 

把 < 、> 重新输入即可

5楼
stocker 发表于:2011/2/16 20:21:52

兄弟:

 

这些模型的时间周期怎么设置啊?用多少分钟。

 

6楼
lanshan 发表于:2011/2/17 23:22:19
5min
7楼
lanshan 发表于:2011/2/17 23:23:34
yexu 1min 也可以
8楼
淡定688 发表于:2011/4/28 15:17:45
谢谢分享!图片点击可在新窗口打开查看
9楼
淡定688 发表于:2011/4/28 17:34:10
5min  时间周期怎么设置?
10楼
a7777 发表于:2013/1/29 21:15:06
图片点击可在新窗口打开查看
共10 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in .15625 s, 2 queries.