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

加仓及移动止损要怎么写

作者:金字塔 来源:cxh99.com 发布时间:2015年04月16日
  • 咨询内容: 价格大于1200,买入1手,止损1150;继续上升到1250,加仓买入1手,两手持仓止损1200。请问要怎么写语句?谢谢!

     

  • 金字塔客服:

    if h>1200 and h<1250 then buy(holding=0,1,thisclose);

    if l<1150 and hhv(h,enterbars+1)>1200 and hhv(h,enterbars+1)<1250 then sell(1,0,thisclose);

     

    if h>=1250 then buy(holding=1 or holding=0,1,thisclose);

    if l<1200 and hhv(h,enterbars+1)>=1250 then sell(1,0,thisclose);

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