以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://222.73.7.161/bbs/index.asp)
--  金字塔软件问题提交  (http://222.73.7.161/bbs/list.asp?boardid=2)
----  简单的均线上穿  (http://222.73.7.161/bbs/dispbbs.asp?boardid=2&id=6810)

--  作者:fly
--  发布时间:2011/6/9 11:31:57
--  简单的均线上穿

//一个简单的均线上穿

//一分钟周期,K线走完,逐周期模式

ma5:ma(close,5);
ma15:ma(close,15);

 

if CROSS(ma5,ma15) and time>091500 and time<145000 then
begin
sellshort(holding<0,1,market);
buy(holding=0,1,limit,c+2*mindiff);
end

 

if CROSS(ma15,ma5) and time>091500 and time<145000 then
begin
sell(holding>0,1,market);
buyshort(holding=0,1,limit,c-2*mindiff);
end

 

//收盘前5分钟平仓
if time > 145500 then
 begin
 sell(holding > 0, 0, thisclose);
 sellshort(holding < 0, 0, thisclose);
 end
 


--  作者:jinzhe
--  发布时间:2011/6/9 13:40:05
--  
一个很好的模板哦