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

求程序纠错

作者:金字塔 来源:cxh99.com 发布时间:2015年09月24日
  • 咨询内容: 收盘价大于50根K线的最高价开多单,小于 50根K线的最小价开空单回抽17个点平仓,不会开单求程序纠错
    input:cc(50,10,150,5);
    h_1:=hhv(h,enterbars+1);l_1:=llv(l,enterbars+1);hh:=hhv(h,cc);ll:=llv(l,cc);
    kd:=c>hh;kk:=c<ll;
    buy(kd and holding=0,1,market);buyshort(kk and holding=0,1,market);
    if l<h_1-17 then sell(1,0,market);if h>l_1+17 then sellshort(1,0,market);

     

  • 金字塔客服:

    input:cc(50,10,150,5);


    h_1:=hhv(h,enterbars+1);
    l_1:=llv(l,enterbars+1);
    hh:=hhv(h,cc);
    ll:=llv(l,cc);


    kd:=h>ref(hh,1);
    kk:=l<ref(ll,1);

    if h>l_1+17 then sellshort(1,0,market);

    buy(kd and holding=0,1,market);

    if l<h_1-17 then sell(1,0,market);

    buyshort(kk and holding=0,1,market);

     

     

  • 用户回复: 感谢无所不能的版主
打印本文打印本文 关闭窗口关闭窗口