[原創] [金字塔]
- 咨詢內容:
開倉條件:當前價格高與前三根K線的最高價、開多,設置10個點的止損;最新價低于前三根K線的最低價、平倉(不管盈虧),反之開空。
- 金字塔客服:
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); - 用戶回復:
老師幫我看看這后臺的系統為什么不執行止損呢?思路是這樣的:以最新價破前五跟K線的最高價做多,設置4個點止盈、5個點止損,空單反之
此主題相關圖片如下: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 - 網友回復:
tsell(1,1,MKT,DYNAINFO2(7, PZ1),0);
這樣寫要表達什么意思?
- 網友回復: 我想表達用最新價下單
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容