[求助]請幫忙寫一個(gè)例子 [金字塔]
-
咨詢內(nèi)容:
滿足條件A時(shí),為買入?yún)⒖夹盘?hào),出現(xiàn)信號(hào)時(shí)的價(jià)位為參考信號(hào)價(jià)位1。當(dāng)價(jià)格自參考信號(hào)價(jià)位1回落X價(jià)位時(shí)買入,止損幅度為實(shí)際買入價(jià)和參考信號(hào)價(jià)1的價(jià)差。滿足條件B時(shí),為賣出參考信號(hào),出現(xiàn)信號(hào)時(shí)的價(jià)位為參考信號(hào)價(jià)位2.當(dāng)價(jià)格自參考信號(hào)價(jià)位2上升X價(jià)位時(shí)賣出,止損幅度為實(shí)際賣出價(jià)和參考信號(hào)價(jià)2的價(jià)差。這實(shí)際上是一個(gè)回調(diào)買入的策略思路。搜了一下論壇沒有找到類似的參考,所以想麻煩你們給寫一個(gè)作為參考。謝謝。
?
-
金字塔客服:
圖表交易嗎?圖表取不到實(shí)際買入價(jià),只能取圖上虛擬買入價(jià)位enterprice
?
?來源:程序化久久網(wǎng)( www.kzuj.com.cn )
-
用戶回復(fù):
enterprice即可。僅作參考。
?
-
網(wǎng)友回復(fù):
VARIABLE:n=0,m=0;
if a then n:=c;
if n-l>=x and holding=0 then buy(1,1,marketr);
if enterprice-c>=abs(enterprice-n) and holding>0 then sell(1,1,marketr);
if b then m:=c;
if h-m>=x and holding=0 then buyshort(1,1,marketr);
if c-enterprice>=abs(enterprice-m) and holding<0 then sellshort(1,1,marketr)
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容