數(shù)值變量和邏輯變量 [金字塔]
- 咨詢內(nèi)容:
請(qǐng)教怎么編一下情況
if n<=5 then if c<平倉(cāng)數(shù)值 then sellshort(holding<0,1,thisclose) ; 當(dāng)平倉(cāng)時(shí) n:=0 否則n 不變
else (也就是n>6) if 平倉(cāng)條件 then sellshort(holding<0,1,thisclose) ; 當(dāng)平倉(cāng)時(shí) n:=0 否則n 不變
這里平倉(cāng)數(shù)值是數(shù)值變量, 平倉(cāng)條件是邏輯變量 本來想用這個(gè)形式 if(n<=5,平倉(cāng)數(shù)值,平倉(cāng)條件),感覺不對(duì)
- 金字塔客服:
是n小于5用平倉(cāng)數(shù)值,大于6用平倉(cāng)條件?那么你寫的是可以的
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容