[原創(chuàng)] [金字塔]
- 咨詢內(nèi)容:
開倉條件:當(dāng)前價(jià)格高與前三根K線的最高價(jià)、開多,設(shè)置10個(gè)點(diǎn)的止損;最新價(jià)低于前三根K線的最低價(jià)、平倉(不管盈虧),反之開空。
- 金字塔客服:
if h>ref(hhv(h,3),1) then begin
sellshort(1,0,market);
buy(holding=0,1,market);
endif l<ref(llv(l,3),1) then begin
sell(1,0,market);
buyshort(holding=0,1,market);
endif holding>0 and c<enterprice-10 then sell(1,0,market);
if holding<0 and c>enterprice+10 then sellshort(1,0,market); - 用戶回復(fù):
老師幫我看看這后臺(tái)的系統(tǒng)為什么不執(zhí)行止損呢?思路是這樣的:以最新價(jià)破前五跟K線的最高價(jià)做多,設(shè)置4個(gè)點(diǎn)止盈、5個(gè)點(diǎn)止損,空單反之
此主題相關(guān)圖片如下:9d7dcxge)$%eaced12vda.png
ZH:='';PZ1:='RB10';
KD:DYNAINFO2(7, PZ1)>ref(hhv(h,5),1);//開多KK:DYNAINFO2(7, PZ1)<ref(llv(l,5),1);//開空
if DYNAINFO2(7, PZ1)<=tenterprice-5*MINDIFF then begin//多損tsell(1,1,MKT,0); end;if DYNAINFO2(7, PZ1)>=tenterprice+4*MINDIFF then begin//多盈tsell(1,1,MKT,DYNAINFO2(7, PZ1),0);end
if DYNAINFO2(7, PZ1)>=tenterprice+5*MINDIFF then begin//空損tsellshort(1,1,MKT,DYNAINFO2(7, PZ1),0);endif DYNAINFO2(7, PZ1)<=tenterprice-4*MINDIFF then begin //空盈tsellshort(1,1,MKT,DYNAINFO2(7, PZ1),0);end
if KK and tbuyholdingex(ZH,pz1,0)=0 and tsellholdingex('',pz1,0)=0 then begin//開空tbuyshort(1,1,MKT,DYNAINFO2(7, PZ1),0);end
if KD AND tbuyholdingex('',pz1,0)=0 and tsellholdingex('',pz1,0)=0 then begin //開多tbuy(1,1,MKT,DYNAINFO2(7, PZ1),0);end - 網(wǎng)友回復(fù):
tsell(1,1,MKT,DYNAINFO2(7, PZ1),0);
這樣寫要表達(dá)什么意思?
- 網(wǎng)友回復(fù): 我想表達(dá)用最新價(jià)下單
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容