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

突破后第一次回调到5日均线买入

作者:金字塔 来源:cxh99.com 发布时间:2015年02月23日
  • 咨询内容:  请问突破后第一次回调到5日均线买入如何写法?

     

  • 金字塔客服: 股指期货:1.突破后回调到5日均线上方0.2点时买入 r1:=ma(c,5); if cross(c,r1) then k1:=1; if cross(r1,c) then k1:=-1;
    r2:=barslast(c<r1); r3:=ref(r1,1) if k1>0 and r2>3 and l-ref(r1,1)<=0.2 then buy(holding=0,1,limitr,r3+0.2);
    2.收盘价回调到5日均线的下方买入 r1:=ma(c,5); if cross(c,r1) then k1:=1; if cross(r1,c) then k1:=-1; r2:=barslast(c>r1); if k1<0 and r2=1 then buy(holding=0,1,limitr,c);

     

  • 用户回复:

    r5表示什么?

     

  • 网友回复: ma5:=(callstock(stklabel,vtopen,6,0)+callstock(stklabel,vtopen,6,-1)+callstock(stklabel,vtopen,6,-2)+callstock(stklabel,vtopen,6,-3)+callstock(stklabel,vtopen,6,-4))/5;
    if holding=0 then begin buy(L<ma5,1,market);end 
    if holding=0 then begin buyshort(H>ma5,1,market);end 
    if enterbars>openminutes(time) then begin sell(holding>0,holding,market);sellshort(holding<0,holding,market);end 
    回踩5天线开仓,第二天开盘平仓。

     

  • 网友回复: 以下是引用lichenghu在2014/2/24 13:54:55的发言:

    r5表示什么?



    应该是r1,

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