Rss & SiteMap

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

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

标题:开盘分钟数

1楼
flushentity 发表于:2015/6/4 13:24:18
请教一段代码

当最新价高于当日开盘~开盘后10分钟内的最高价,开多,收盘前五分钟平仓。
当最新价低于当日开后~开盘后10分钟内的最低价,开空,收盘前五分钟平仓。

金字塔时间,用在1分钟周期的K线上。
2楼
flushentity 发表于:2015/6/4 13:27:42
忘记了还有止损,做多,以当日最低价止损。做空,以当日最高价止损。
3楼
jinzhe 发表于:2015/6/4 13:34:13
处理中,请稍等
4楼
pyd 发表于:2015/6/4 13:48:35

止损条件不合理吧,收盘前怎么知道当天已经最低最高价。

止损条件重新描述下(一般是多少个点止损)

 

[此贴子已经被作者于2015/6/4 13:49:04编辑过]
5楼
flushentity 发表于:2015/6/4 13:54:00
做多,以开仓前的最低价止损。做空,以开仓前的最高价止损。
6楼
pyd 发表于:2015/6/4 15:02:50

hh:VALUEWHEN(todaybar=10,hhv(h,10));
ll:VALUEWHEN(todaybar=10,llv(l,10));
gg:hhv(h,todaybar);//当天最高价
dd:llv(l,todaybar);//当天最低价
if c>hh then buy(holding=0,1,market);
if c<ll then buyshort(holding=0,1,market);

//多损
la:ref(llv(l,todaybar-enterbars),enterbars);//开仓前最低价
if l<=la then sell(holding>0,holding,market);
//空损
ha:ref(hhv(h,todaybar-enterbars),enterbars);//开仓前最高价
if h>ha then sellshort(holding<0,holding,market);

//收盘前5分钟平仓
m5:=(t0totime(timetot0(closetime(0))-60*5));
if time>=m5 then begin
Sell( holding>0,1,market);
sellshort(holding<0,1,market);
end

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


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