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

[求助]在一分钟周期下,开平怎么写?

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

    每根K线都交易
    开盘价做多   收盘价平多
    请老师写下

     

  • 金字塔客服: 用开盘价下单,还是在开盘的时候下单?

     

  • 用户回复: 开盘的时候 开盘价下单   这个K的收盘价平仓

     

  • 网友回复:

    t1:time0;

    t2:timetot0(dynainfo(207));

    d:=t1-t2;

     

    if islastbar and t1-t2>=58  or not(islastbar) then buy(holding=0,1,market);

    if islastbar and t1-t2<=2  or not(islastbar) then sell(1,0,market);

     

  • 网友回复: t1:=time0;t2:=timetot0(dynainfo(207));d:=t1-t2; if islastbar and t1-t2>=58  or not(islastbar) then buy(holding=0 AND O<C,1,market);if islastbar and t1-t2<=2  or not(islastbar) then sell(HOLDING>0,0,market);
    if islastbar and t1-t2>=58  or not(islastbar) then buySHORT(holding=0 AND O>C,1,market);if islastbar and t1-t2<=2  or not(islastbar) then sellSHORT(HOLDING<O,0,market);

    写完测试  怎么出现仓位有 多 空单 都出现的情况?
    这个怎么解决  老师
打印本文打印本文 关闭窗口关闭窗口