打印本文打印本文 关闭窗口关闭窗口

请老师帮忙写个程序

作者:金字塔 来源:cxh99.com 发布时间:2016年07月30日
  • 咨询内容:

    1,均线交叉类,10日金叉20日做多,10日死叉20日做空

    2价格突破类,突破4日高点做多,跌破3日低点做空

    谢谢老师

     

  • 金字塔客服: 处理中,请稍等

     

  • 用户回复: 用在什么周期交易?

     

  • 网友回复: 日线级别的

     

  • 网友回复:

    ma10:ma(c,10);
    ma20:ma(c,20);
    jc:cross(ma10,ma20);
    sc:cross(ma20,ma10);
    if jc  then BEGIN
    sellshort(holding<0,holding,market);
    buy(holding=0,1,market);
    end
    if sc then BEGIN
    sell(holding>0,holding,market);
    buyshort(1,1,market);
    end

    hh:hhv(h,4);
    ll:llv(l,3);
    if h>=hh then begin
    sellshort(holding<0,holding,market);
    buy(holding=0,1,market);
    end
    if l<=ll then begin
    sell(holding>0,holding,market);
    buyshort(1,1,market);
    end

打印本文打印本文 关闭窗口关闭窗口