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

前根K阳线下根开多,前阴线下根开空。

作者:金字塔 来源:cxh99.com 发布时间:2014年03月23日
  • 咨询内容:

    请教:前根K阳线下根开多,前阴线下根开空。我就是想测试下发单。
    if  ref(c,1)>ref(o,1) then
    begin
    sellshort(1,1,thisclose);
    buy(1,1,MARKET);
    end

    if ref(c,1)<ref(o,1) then
    begin
    sell(1,1,thisclose);
    buyshort(1,1,market);
    end
    但实际执行时候,只能一直开多或一直开空,而不是根据前根阳或阴而变化,不明白是咋回事?

     

  • 金字塔客服:

    您好,开平仓条件加上holding的限制。

    if  ref(c,1)>ref(o,1) then
    begin
    sellshort(holding<0,1,thisclose);
    buy(holding=0,1,MARKET);
    end

    if ref(c,1)<ref(o,1) then
    begin
    sell(holding>0,1,thisclose);
    buyshort(holding=0,1,market);
    end

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