Rss & SiteMap

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

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

标题:简单的均线上穿

1楼
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
 

2楼
jinzhe 发表于:2011/6/9 13:40:05
一个很好的模板哦
共2 条记录, 每页显示 10 条, 页签: [1]


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