设为首页 - 收藏本站 欢迎访问: 股粉帮(www.guofenb.com) - 免费下载通达信大智慧等股票公式,指标,股池并进行投资交流!交流QQ群:891842347
热搜: 副图选股主图文华公式
当前位置:首页 >>公式股池 >>其它公式 >> 金字塔MACD动量突破系统指标

金字塔MACD动量突破系统指标

2018年08月16日 [其它公式] 浏览:3297 评论:0
金字塔MACD动量突破系统指标 :
runmode:0;
input:p(26,20,100,8);
input:s(12,5,40,4);
input:m(9,2,60,6);
variable:myasset=300000;
diff:=ema(close,s)-ema(close,p);
dea:=ema(diff,m);
macd:=2*(diff-dea);
entertime:=time>=091000 and time<=145500;
exittime:=time>=150000;
buycond:=ref(cross(macd,0),1);
sellcond:=ref(cross(0,macd),1);
if holding=0 then begin
if buycond then
buy(1,1,limitr,open);
end
if holding=0 then begin
if sellcond then
buyshort(1,1,limitr,open);
end
if holding>0 then begin
if exittime then
sell(1,holding,limitr,close);
if sellcond then begin
sell(1,holding,limitr,open),orderqueue;
buyshort(1,1,limitr,open),orderqueue;
end
end
if holding<0 then begin
if exittime then
sellshort(1,holding,limitr,close);
if buycond then begin
sellshort(1,holding,limitr,open),orderqueue;
buy(1,1,limitr,open),orderqueue;
end
end
if exittime then
myasset:=asset;
收益:myasset,noaxis,colormagenta;
次数:totaltrade,linethick0;
胜率:percentwin,linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;

(编辑:股粉帮)

发表我的评论换个身份
取消评论

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
热评文章
二维码