stkindi函數(shù)的引用 [金字塔]
- 咨詢(xún)內(nèi)容:
版主,新年好,請(qǐng)教一下
我用stkindi函數(shù)編寫(xiě)跨周期模型,原理就是小周期均線(xiàn)交叉且大周期為陽(yáng)線(xiàn)陰線(xiàn)開(kāi)倉(cāng)
先建立公式一MA1:=MA(CLOSE,A);
MA2:=MA(CLOSE,B);
BK1:=CROSS(MA1,MA2) ;
SK1:=CROSS(MA2,MA1) ;
SP1:=CROSS(MA2,MA1);
BP1:=CROSS(MA1,MA2);然后在建立一個(gè)模型
sc_DAYBK:stkindi('','公式1.BK1',0,6);
sc_DAYSK:stkindi('','公式1.SK1',0,6);
xc_DAYSP:stkindi('','公式1.SP1',0,6);
xc_DAYBP:stkindi('','公式1.BP1',0,6);
if c>OPEN and sc_DAYBK then buy(1,0,market);
if xc_DAYSP then sell(1,0,market);
if c
if xc_DAYBP then sellshort(1,0,market);
請(qǐng)問(wèn)這樣寫(xiě)正確嗎,為何無(wú)法測(cè)試 - 金字塔客服:
sc_DAYBK:stkindi('','公式1.BK1',0,6);
sc_DAYSK:stkindi('','公式1.SK1',0,6);
xc_DAYSP:stkindi('','公式1.SP1',0,6);
xc_DAYBP:stkindi('','公式1.BP1',0,6);
if c>OPEN and sc_DAYBK then buy(1,0,market);
if xc_DAYSP then sell(1,0,market);
if c
if xc_DAYBP then sellshort(1,0,market);第二個(gè)模型更正
- 用戶(hù)回復(fù):
sc_DAYBK:stkindi('','公式1.BK1',0,6);
sc_DAYSK:stkindi('','公式1.SK1',0,6);
xc_DAYSP:stkindi('','公式1.SP1',0,6);
xc_DAYBP:stkindi('','公式1.BP1',0,6);
if c>OPEN and sc_DAYBK then buy(1,0,market);if xc_DAYSP then sell(1,0,market);
if c<open and sc_DAYSK then buyshort(1,0,market);
if xc_DAYBP then sellshort(1,0,market);
- 網(wǎng)友回復(fù):
公式1里面加上代碼
runmode:0;
- 網(wǎng)友回復(fù):
測(cè)試結(jié)果依然為無(wú)交易,請(qǐng)問(wèn)何解
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容