Board logo

标题: [金字塔源码] MACD动量突破(源码 主图 贴图) [打印本页]

作者: 龙听    时间: 2019-8-19 11:08     标题: MACD动量突破(源码 主图 贴图)

金字塔交易系统指标 MACD动量突破
很多都是以前写的指标 现在没事拿来分享的,就没精力去做太多说明啦!我大概就在软件上运行下截图给大家吧!
有兴趣的自己拿去优化

  1. runmode:0;
  2. input:p(26,20,100,8);
  3. input:s(12,5,40,4);
  4. input:m(9,2,60,6);
  5. variable:myasset=300000;
  6. diff:=ema(close,s)-ema(close,p);
  7. dea:=ema(diff,m);
  8. macd:=2*(diff-dea);
  9. entertime:=time>=091000 and time<=145500;
  10. exittime:=time>=150000;
  11. buycond:=ref(cross(macd,0),1);
  12. sellcond:=ref(cross(0,macd),1);
  13. if holding=0 then begin
  14. if buycond then
  15.   buy(1,1,limitr,open);
  16. end
  17. if holding=0 then begin
  18. if sellcond then
  19.   buyshort(1,1,limitr,open);
  20. end
  21. if holding>0 then begin
  22. if exittime then
  23.   sell(1,holding,limitr,close);
  24. if sellcond then begin
  25.   sell(1,holding,limitr,open),orderqueue;
  26.   buyshort(1,1,limitr,open),orderqueue;
  27. end
  28. end
  29. if holding<0 then begin
  30. if exittime then
  31.   sellshort(1,holding,limitr,close);
  32.   
  33. if buycond then begin
  34.   sellshort(1,holding,limitr,open),orderqueue;
  35.   buy(1,1,limitr,open),orderqueue;
  36. end
  37. end
  38. if exittime then
  39. myasset:=asset;
  40. 收益:myasset,noaxis,colormagenta;
  41. 次数:totaltrade,linethick0;
  42. 胜率:percentwin,linethick0;
  43. 连亏:maxseqloss,linethick0;
  44. 连赢:maxseqwin,linethick0;
复制代码


201622321512763093.png

图片附件: 201622321512763093.png (2019-8-19 11:07, 78.71 KB) / 下载次数 77
http://www.qhlt.cn/attachment.php?aid=11811&k=19285661e93806fdf157dff6b7f3f388&t=1715353281&sid=EZmcg5


作者: 王雷    时间: 2019-10-13 10:52

好策略
作者: 卓越    时间: 2019-10-23 15:06


作者: 呆哥哥    时间: 2020-1-3 23:27

感謝分享、版主辛苦了




欢迎光临 龙听期货论坛 (http://www.qhlt.cn/) Powered by Discuz! 7.2