突破后第一次回調到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,