開(kāi)平倉(cāng)問(wèn)題 [MC]
- 咨詢(xún)內(nèi)容:
本帖最后由 hangdoa 于 2014-10-15 13:57 編輯
滿(mǎn)足條件1平空倉(cāng)一手,同時(shí)開(kāi)多倉(cāng)一手,滿(mǎn)足條件2時(shí)平多倉(cāng)一手,同時(shí)開(kāi)空倉(cāng)一手,如何寫(xiě)?
if condition1 then
Buy ( "BEntry" ) 1 share this bar at close ;
if (MarketPosition = 1) and condition2 then begin
sell from entry("BEntry") this bar at close;
end;
if condition2 then
Sell Short ( "SEntry" ) 1 share this bar at close ;
if (MarketPosition = -1) and condition1 then begin
buytocover from entry("SEntry") this bar at close;
end;
Sell Short優(yōu)先如何用,盤(pán)中會(huì)出現(xiàn)2手的賣(mài),且買(mǎi)有時(shí)不開(kāi)倉(cāng)啊?
- MC技術(shù)部:
if condition1 then
buy next bar at market;
if condition2 then
sellshort next bar at market;
buy /sellshort 在有倉(cāng)位時(shí)是平倉(cāng)反向 無(wú)倉(cāng)位時(shí)是開(kāi)倉(cāng)
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容