MID : MA(CLOSE,26);
UPPER: MID + 2*STD(CLOSE,26);
LOWER: MID - 2*STD(CLOSE,26);
以上是金字塔自帶的布林帶公式 想把它改成 突破UPPER就開多 突破LOWER就開空 怎么編寫,麻煩會(huì)的人幫個(gè)忙!謝謝!平倉就是回調(diào)到MID這條線 謝謝!
MID : MA(CLOSE,26);
UPPER: MID + 2*STD(CLOSE,26);
LOWER: MID - 2*STD(CLOSE,26);
if cross(c,upper) then buy(holding=0,1,market);
if cross(lower,c) then buyshort(holding=0,1,market);
if ref(c>mid,1) and c<mid then sell(1,0,market);
if ref(c<mid,1) and c>mid then sellshort(1,0,market);