換個(gè)瀏覽器,重新問(wèn)
作者:金字塔 來(lái)源:cxh99.com 發(fā)布時(shí)間:2014年09月01日
- 咨詢(xún)內(nèi)容:
初學(xué)金字塔,請(qǐng)各位老師挑錯(cuò),日內(nèi),五分鐘線(xiàn),當(dāng)前價(jià)格與之前兩個(gè)不同周期的開(kāi)盤(pán)價(jià)進(jìn)行比較<!--EndFragment-->,否則賣(mài)出,并添加止損條件。
input:t(10,1,100,5),d(5);
一倍周期開(kāi)盤(pán)價(jià):=ref(open,t),noaxis,nodraw;
兩倍周期開(kāi)盤(pán)價(jià):=ref(open,2*t),noaxis,nodraw;
//交易條件
開(kāi)多條件:=close>ref(open,t) and close>ref(open,2*t) and time<185500;
平多條件:=time=185500 or l<enterprice-d*mindiff;
開(kāi)空條件:=close<ref(open,t) and close<ref(open,2*t)and time<185500;
平空條件:=time=185500 or h>enterprice+d*mindiff;;
//交易系統(tǒng)
sellshort(平空條件 and holding<0,holding,market);
buy(開(kāi)多條件 and holding=0,1,market);
sell(平多條件 and holding>0,holding,market);
buyshort(開(kāi)空條件 and holding=0,1,market);
懇請(qǐng)各位好心人幫忙看看,不勝感激,
其中把止損離場(chǎng)和收盤(pán)前離場(chǎng)放在一起都用market,是不是可以?而且在圖表中發(fā)現(xiàn)有的K線(xiàn)上有兩個(gè)信號(hào)既平空又開(kāi)多,看著很不舒服,該如何改進(jìn)
- 金字塔客服:
除了前面的close改h,close改l的
還要這樣改
sellshort(平空條件 and holding<0,holding,market);
buy(開(kāi)多條件 and holding=0 and exitbars>0,1,market);
sell(平多條件 and holding>0,holding,market);
buyshort(開(kāi)空條件 and holding=0 and exitbars>0,1,market);
- 用戶(hù)回復(fù):
改完了,信號(hào)全沒(méi)了,
- 網(wǎng)友回復(fù):
input:t(10,1,100,5),d(5);
variable:n=0;
一倍周期開(kāi)盤(pán)價(jià):=ref(open,t),noaxis,nodraw;
兩倍周期開(kāi)盤(pán)價(jià):=ref(open,2*t),noaxis,nodraw;
//交易條件
開(kāi)多條件:=close>ref(open,t) and close>ref(open,2*t) and time<185500;
平多條件:=time=185500 or l<enterprice-d*mindiff;
開(kāi)空條件:=close<ref(open,t) and close<ref(open,2*t)and time<185500;
平空條件:=time=185500 or h>enterprice+d*mindiff;;
//交易系統(tǒng)
if n=0 and 開(kāi)多條件 and holding=0 then begin
buy(1,1,market);
n:=1;
end
if n=0 and 開(kāi)空條件 and holding=0 then begin
buyshort(1,1,market);
n:=1;
end
sellshort(平空條件 and holding<0,holding,market);
buy(開(kāi)多條件 and holding=0 and exitbars>0 and n=1,1,market);
sell(平多條件 and holding>0 ,holding,market);
buyshort(開(kāi)空條件 and holding=0 and exitbars>0 and n=1,1,market);
- 網(wǎng)友回復(fù):
謝謝啦,幫了大忙,贊哦~