一天只開(kāi)倉(cāng)一次的寫(xiě)法? [金字塔]
- 咨詢內(nèi)容:
一天只開(kāi)倉(cāng)一次,怎么寫(xiě)?
- 金字塔客服:
variable:n=0;
if 開(kāi)多條件 and 持倉(cāng)判斷 and n=0 then begin
buy.....;
n:=1;
end
if 開(kāi)空條件 and 持倉(cāng)判斷 and n=0 then begin
buyshort....;
n:=1;
end
if time=closetime(0) then n:=0;
- 用戶回復(fù):
KD:=......
KK:=......
PD:=......
PK:=......
variable:n=0;
if KD and HOLDING=0 and n=0 then begin
buy(1,1,THISCLOSE);
n:=1;
end
if KK and HOLDING=0 and n=0 then beginbuyshort(1,1,THISCLOSE);
n:=1;
end
SELL(PD&&HOLDING>0,HOLDING,THISCLOSE);
SELLSHORT(PK&&HOLDING<0,HOLDING,THISCLOSE);if time=closetime(0) then n:=0;
按照上邊的寫(xiě)法沒(méi)有出現(xiàn)成交記錄,回測(cè)沒(méi)有數(shù)據(jù),是不是哪里寫(xiě)錯(cuò)了?
- 網(wǎng)友回復(fù):
策略放在圖上有信號(hào)嗎?
- 網(wǎng)友回復(fù):
沒(méi)有信號(hào),如果按照正常寫(xiě)法
BUY(KD&&HOLDING=0,1,THISCLOSE);
SELL(PD&&HOLDING>0,HOLDING,THISCLOSE);
BUYSHORT(KK&&HOLDING=0,1,THISCLOSE);
SELLSHORT(PK&&HOLDING<0,HOLDING,THISCLOSE);這個(gè)就有信號(hào)
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容