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

平多信号还是没有及时执行

作者:金字塔 来源:cxh99.com 发布时间:2016年02月20日
  • 咨询内容:
    此主题相关图片如下:未命名.jpg

     

  • 金字塔客服: 你指的箭头那里没有信号,所以不会有什么信号执行

     

  • 用户回复:

    还是老问题:平多盈利执行不及时,盈利全部吃光:程序源码

    //开多
    IF ( stopprice)<l THEN
    BEGIN
    SELLSHORT( HOLDING<0,HOLDING,market); //平空操作
    BUY( HOLDING=0,1,market);//开多操作 
    maxprofit:=0;
    END
    //平仓
    SELL((stopprice)>h and  HOLDING>0,HOLDING,market);//平多
    BUYSHORT((stopprice)>h and HOLDING=0,1,market); //开空操作

    if enterbars>=3 then begin
         if c>o and holding>0 then sell(1,holding,market);
         if c<o  and type(1)= 2 then buy(holding>=0,1,market);
      end

    //空头为例
      if enterbars>=3 then begin
         if c>o and holding<0 then sellshort(1,holding,market);
         if c<o and type(1)=4 then buyshort(holding<=0,1,market);
      end


     

     

  • 网友回复:

    那根k线是阴线,怎么会出信号的?

     

  • 网友回复:

     


    此主题相关图片如下:未命名.jpg

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