发个珍藏的老鸭均线交易系统
-
相关简介:发个珍藏的老鸭均线交易系统 源码 MA5 := MA(close,5); MA10 := MA(close,10); MA60 := MA(close,60); pday1 := barslast(cross(ma60,ma5));{5日均线下穿60日均线} pday2 := barslast(cross(ma60,ma10));{10日均线下穿60日均线,至此形成鸭颈部} pday3 := barslast(low=llv(low,pday2));{形成头部,要反弹} pday4 := bar
-
文章来源:股海网作者:股海网发布时间:2016-07-16浏览次数:
发个珍藏的老鸭均线交易系统
源码
MA5 := MA(close,5);
MA10 := MA(close,10);
MA60 := MA(close,60);
pday1 := barslast(cross(ma60,ma5));{5日均线下穿60日均线}
pday2 := barslast(cross(ma60,ma10));{10日均线下穿60日均线,至此形成鸭颈部}
pday3 := barslast(low=llv(low,pday2));{形成头部,要反弹}
pday4 := barslast(cross(ma5,ma10));{反弹后,5日均线和10日均线金叉}
pday5 := barslast(cross(ma10,ma5));{反弹不久,5日均线和10日均线形成死叉,形成嘴部}
a1:= pday1>pday2 and pday2>pday3 and pday3>pday4 and pday4>pday5 and pday5<5;
a2:= count(cross(ma10,ma5),pday2)=1;
xg:=A1 AND A2;
laoya:=xg;
ENTERLONG:CROSS(MA(CLOSE,1),MA(CLOSE,4)) and laoya;
EXITLONG:CROSS(MA(CLOSE,4),MA(CLOSE,1));