以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  交易策略发布专区  (http://weistock.com/bbs/list.asp?boardid=10)
----  [原创]三层滤网  (http://weistock.com/bbs/dispbbs.asp?boardid=10&id=31742)

--  作者:Q1304230834
--  发布时间:2012/12/20 0:03:06
--  [原创]三层滤网

//三层滤网
//第一层:上一根15分钟K线对应的macd值>=0为多头,<0为空头.
//第二层:上一根5分钟K线对应的macd 值>=0为多头,<0 为空头
//第三层:1分钟当前K线对应macd值>=0为多头,<0为空头
//开多:三层滤网均为多头开多.
//平多:第二,三层滤网为空时平多
//开空:三层滤网均为空头开空
//平空:第二,三层滤网为多头时平空
//09:25后才开始开仓,14:40后停止开新仓
//15:05后尾盘强制平仓
//level1
macd15:"macd.macd1##min15",linethick0;
//level2
macd5:"macd.macd1##min5",linethick0;
//level3
macd:"macd.macd1",linethick0;

long:=macd15>=0 and macd5>=0 and macd>=0;
longend:=macd5<0 and macd<0;

short:=macd15<0 and macd5<0 and macd<0;
shortend:=macd5>=0 and macd>=0;

t1:=time>=092500 and time<=144000;
t2:=time>=150500;

if holding>0 and longend then sell(1,1,thisclose);
if holding<0 and shortend then sellshort(1,1,thisclose);

if holding=0 and t1 then begin
buy(long,1,thisclose);
buyshort(short,1,thisclose);
end

if t2 then begin
sell(holding>0,1,thisclose);
sellshort(holding<0,1,thisclose);
end

--  作者:shy508
--  发布时间:2012/12/20 23:55:15
--  
图片点击可在新窗口打开查看
--  作者:allanhoo
--  发布时间:2013/1/13 20:59:14
--  
不错,精彩!
--  作者:cgysdf
--  发布时间:2014/5/12 14:14:38
--  
有未来,鉴定完毕
--  作者:chengyang
--  发布时间:2014/6/16 13:25:03
--  

小引大,必须引用上个周期,另外 macd柱状的收缩方向也是一个考虑而不仅仅是零轴。

这个信号闪的应该很多