Rss & SiteMap

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

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

标题:如何过滤重复的信号?

1楼
豆芽 发表于:2011/2/25 14:57:40

在使用buy,sell等时如何过滤重复的信号?

例如:sell(a,0,market)

        buyshort(b,1,market)

        sellshort(c,0,market)

        buy(d,1,market)

2楼
fly 发表于:2011/2/25 15:07:21

希望楼主可以学习一下置顶的视频教程http://www.weistock.com/bbs/dispbbs.asp?boardid=2&Id=185

金字塔公式编写与程式化交易设计指南http://www.weistock.com/bbs/dispbbs.asp?boardid=2&Id=370

系统全面的学习一下

 

提供个简单的均线例子,供楼主参考.

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

 

if CROSS(ma5,ma15) and time>090100 and time<145000 then
begin
sellshort(holding<0,1,thisclose);
buy(holding=0,1,thisclose);
end

if CROSS(ma15,ma5) and time>090100 and time<145000 then
begin
sell(holding>0,1,thisclose);
buyshort(holding=0,1,thisclose);
end

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

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


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