//三层滤网
//第一层:上一根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
小引大,必须引用上个周期,另外 macd柱状的收缩方向也是一个考虑而不仅仅是零轴。
这个信号闪的应该很多