Rss & SiteMap

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

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

标题:帮忙编写个程序:

1楼
jinzita008 发表于:2016/2/22 10:53:57

帮忙编写个程序:看1分钟K线做股指期货,在13:00-13:30.这个区间中有个高点和低点,破高点就开多,如果下来又破这个区间低点,就平多开空,每天最多两笔交易,收盘前一分钟清仓.

2楼
jinzhe 发表于:2016/2/22 11:07:53
两笔交易是指开仓2次,还是开仓1次平仓一次
3楼
jinzita008 发表于:2016/2/22 11:12:11
最多开仓两次,有时候当天破高点上去了,没下来,那当天就一次交易,收盘前清仓就行了, 
4楼
jinzita008 发表于:2016/2/22 11:14:42
比如13:00-13:30. 最高价是3000.最低价格是2980.从13:30以后,价格先突破2980时,那刻就开空单,后面的时间如果价格一直没有破3000.拿就留到收盘前平仓,如果中间有破3000.的时候,拿就平空反多一次.也是收盘前平仓
5楼
jinzhe 发表于:2016/2/22 11:22:17

也就是多空各开仓一次?如果不反向突破那么就是开多一次或者开空一次?

 

6楼
jinzita008 发表于:2016/2/22 11:29:47

对,就是这样.收盘前一分钟清仓

7楼
jinzhe 发表于:2016/2/22 13:19:22


variable:n=0,m=0;
hh:valuewhen(time=133000,hhv(h,30));
ll:valuewhen(time=133000,llv(l,30));
tt:=time0<timetot0(closetime(0))-60;

if time>133000 and tt and h>hh and n=0 and holding<=0 then begin
 sellshort(1,0,marketr);
 buy(holding=0,1,marketr);
 n:=1;
end

if time>133000 and tt and l<ll and m=0 and holding>=0 then begin
 sell(1,0,marketr);
 buyshort(holding=0,1,marketr);
 m:=1;
end

if time0>=timetot0(closetime(0))-60 then begin
 sell(1,0,marketr);
 sellshort(1,0,marketr);
 n:=0;
 m:=0;
end

 

8楼
jinzita008 发表于:2016/2/22 13:55:20
谢谢,能把时间改下吗?改成突破14:00-14:05这个时间的区间,然后从14:05以后开始交易,别的不变,刚刚我把时间改了,不行,麻烦老师在编写下,
9楼
jinzhe 发表于:2016/2/22 14:01:25
variable:n=0,m=0;
hh:valuewhen(time=140500,hhv(h,5));
ll:valuewhen(time=140500,llv(l,5));
tt:=time0<timetot0(closetime(0))-60;

if time>140500 and tt and h>hh and n=0 and holding<=0 then begin
 sellshort(1,0,marketr);
 buy(holding=0,1,marketr);
 n:=1;
end

if time>140500 and tt and l<ll and m=0 and holding>=0 then begin
 sell(1,0,marketr);
 buyshort(holding=0,1,marketr);
 m:=1;
end

if time0>=timetot0(closetime(0))-60 then begin
 sell(1,0,marketr);
 sellshort(1,0,marketr);
 n:=0;
 m:=0;
end

10楼
jinzita008 发表于:2016/2/22 16:22:52

谢谢 ,这样一个程序,还是交易股指日内:看1分钟K线,昨日的收盘价与今天的开盘价为区间, 两个价格有个高点跟低点, 在当日开盘5分钟后(也就是9:35分).如果价格已经突破区间高点就开始做多,每天做一笔交易, 止损为开仓价格的1%. 收盘前一分钟平仓, 作空相反,

 

共15 条记录, 每页显示 10 条, 页签: [1] [2]


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