Board logo

标题: [金字塔源码] 克罗均线交易系统策略源码[金字塔模型] [打印本页]

作者: 龙听    时间: 2020-5-5 08:00     标题: 克罗均线交易系统策略源码[金字塔模型]

  1. runmode:0;
  2. input:n1(4,1,100,1);
  3. input:n2(9,1,100,1);
  4. input:n3(18,1,100,1);
  5. ma1:=ma(close,n1);
  6. ma2:=ma(close,n2);
  7. ma3:=ma(close,n3);
  8. if holding=0 then begin
  9.     if close>ma1 and ma1>ma2 and ma2>ma3 then
  10.        buy(1,1,limitr,close);
  11. end
  12. //if holding=0 then begin
  13. //     if close
  14. //       buyshort(1,1,limitr,close);
  15. //end
  16. if holding>0 then begin
  17.     if ma1
  18.        sell(1,holding,limitr,close);
  19. end
  20. //if holding<0 then begin
  21. //     if ma1>ma2 then
  22. //       sellshort(1,holding,limitr,close);
  23. //end
  24. 资产:asset,noaxis,colormagenta;
  25. 次数:totaltrade,linethick0;
  26. 收益:(asset-30000)/30000,linethick0;
  27. 胜率:percentwin,linethick0;
  28. 出击:totaltrade/(count(date<>ref(date,1),0) 1),linethick0;
  29. 连亏:maxseqloss,linethick0;
  30. 连赢:maxseqwin,linethick0;
复制代码





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