以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://222.73.7.161/bbs/index.asp)
--  策略编写求助区  (http://222.73.7.161/bbs/list.asp?boardid=11)
----  求助老师给编写模型  (http://222.73.7.161/bbs/dispbbs.asp?boardid=11&id=74118)

--  作者:春天
--  发布时间:2015/1/7 16:44:20
--  求助老师给编写模型
MAH:MA(HIGH,30);最高价均线
MAL:MA(LOW,30);最低价均线
MAC:MA(CLOSE,30);收盘价均线
开仓定在早上9点25分以后开仓,定义最高价均线之上开多单平空单最低价均线之下开空单平多单条件是必须在60日均线才可以开多开空,
止损设置股指期货6个点止损止盈设置20点止盈,收盘15点11分全部平仓

--  作者:pyd
--  发布时间:2015/1/8 10:24:22
--  

条件是必须在60日均线才可以开多开空

这句怎么理解,在60日均线的什么位置做什么操作?


--  作者:春天
--  发布时间:2015/1/8 15:16:53
--  
意思是价格必须在60日均线之上并站稳最高价均线开多达不到此条件不开多单,反之价格必须在60日均线之下并下破最低价均线开空达不到此条件不开空单.
--  作者:春天
--  发布时间:2015/1/8 17:22:37
--  
意思是价格必须在60日均线之上并站稳最高价均线开多达不到此条件不开多单,反之价格必须在60日均线之下并下破最低价均线开空达不到此条件不开空单.


--  作者:pyd
--  发布时间:2015/1/9 10:36:00
--  

MAH:MA(HIGH,30);
MAL:MA(LOW,30);
MAC:MA(CLOSE,30);
ma60:ma(c,60);
kd1:cross(h,mah);
kk1:cross(mal,l);
if time>092500 and kd1 then begin
sellshort(holding<0,holding,market);
buy(h>ma60 and holding=0,1,market);
end
if time>092500 and kk1 then begin
sell(holding>0,holding,market);
buyshort(l<ma60 and holding=0,1,market);
end
//止损
if enterprice-l>=6 and holding>0 then sell(1,holding,market);
if h-enterprice>=6 and holding<0 then sellshort(1,holding,market);
//止盈
if h-enterprice>=20 and holding>0 then sell(1,holding,market);
if enterprice-l>=20 and  holding<0 then sellshort(1,holding,market);

//收盘前平仓
if time>=151100 then begin
sell(holding>0,holding,market);
sellshort(holding<0,holding,market);
end


--  作者:春天
--  发布时间:2015/1/9 14:25:21
--  
谢谢老师