突破后第一次回調(diào)到5日均線買入
作者:金字塔 來源:cxh99.com 發(fā)布時(shí)間:2015年02月23日
- 咨詢內(nèi)容:
請(qǐng)問突破后第一次回調(diào)到5日均線買入如何寫法?
- 金字塔客服:
股指期貨:1.突破后回調(diào)到5日均線上方0.2點(diǎn)時(shí)買入
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.收盤價(jià)回調(diào)到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);
- 用戶回復(fù):
r5表示什么?
- 網(wǎng)友回復(fù):
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天線開倉,第二天開盤平倉。
- 網(wǎng)友回復(fù):
以下是引用lichenghu在2014/2/24 13:54:55的發(fā)言:
r5表示什么?
應(yīng)該是r1,