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

好奇怪 为什么效果不一样呢?

作者:金字塔 来源:cxh99.com 发布时间:2017年01月17日
  • 咨询内容: multipler:=10;
    macd:=stkindi('','macd.macd1',0,datatype);
    diff:=stkindi('','macd.diff',0,datatype);
    atr:=stkindi('','atr.atr',0,datatype);

    和 下面代码,效果应该完全一样吧,为什么会不一样呢?
    (下面代码,在参数表中,设置了p缺省为26 s缺省12 m缺省9 atrm缺省14)
    multipler:=10;
    pp:=NUMTOSTR(p,0);
    ss:=NUMTOSTR(s,0);
    mm:=NUMTOSTR(m,0);
    atrmm:=NUMTOSTR(atrm,0);
    macd:stkindi('','macd.macd1('&pp&','&ss&','&mm&')',0,datatype);
    diff:=stkindi('','macd.diff('&pp&','&ss&','&mm&')',0,datatype);
    atr:=stkindi('','atr.atr('&atrmm&')',0,datatype);
    为什么用在 


    if cross(macd,0) and  diff>=0.03 or (hhv(h,10)-LLV(l,10))>=0.15 then begin
       sellshort(1,0,market);
       buy(holding=0,1,market);
    end
     
    if cross(0,macd) and  diff>=0.03  or  (hhv(h,10)-LLV(l,10))>=0.15 then begin
       sell(1,0,market);
       buyshort(holding=0,1,market);
    end

    if openprofit/multipler>1.5*atr then begin
       sell(1,0,marketr);
       sellshort(1,0,market);
    end
     
    if openprofit<0 and abs(openprofit)/multipler>1.5*atr then begin
       sell(1,0,marketr);
       sellshort(1,0,market);
    end
    效果不一样呢
    [此贴子已经被作者于2016-10-20 15:41:27编辑过]

     

  • 金字塔客服: 哪个不一样,是什么不一样,信号还是引用的值

     

  • 用户回复: 没有查引用值,信号不一样

     

  • 网友回复: 看看引用值,是不是一样的

     

  • 网友回复: 怎么看?
打印本文打印本文 关闭窗口关闭窗口