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

请管理帮个忙

作者:金字塔 来源:cxh99.com 发布时间:2015年12月17日
  • 咨询内容:

    n:=(取外部统计数值如果数值低于0.3则取0.3,最高不限);

    止赢:检测真实账户实际持仓均价的盈利百分比大于n则止赢;

    请帮忙将以上代码加入下面的交易模块中,更请优化一下开关仓代码,万分感谢!

     

    清仓时间:= time>=112800 and time<=113000 or (time>=145800 and time<=150000);

    开车时间:=time>090000 and time<112800 or (time>133000 and time<145800);

    tsell(tholding>0 and 平多 or 清仓时间,0,lmtc),orderqueue;

    tsellshort(tholding<0 and 平空 or 清仓时间,0,lmt,c),orderqueue;

    tbuy(tholding=0 and 开多 and 开仓时间,1,Lmt,c),orderqueue;

    tbuyshort(tholding=0 and 开空 and 开仓时间,1,Lmt,c),orderqueue;

     

  • 金字塔客服:

    外部数值为变量S

     

  • 用户回复: 当前品种的当日震幅用什么函数?

     

  • 网友回复: 振幅  DYNAINFO( 13)

     

  • 网友回复:

    n:=if(s>=0.3,s,0.3);

    if tholding>0 and (dynainfo(7)-avgtenterprice)/avgtenterrpcie>n/100 then tsell(1,0,mkt);

    if tholding<0 and (avgtenterprice-dynainfo(7))/dynainfo(7)>n/100 then tsellshort(1,0,mkt);

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