代碼可以設(shè)置止盈止損嗎? [金字塔]
- 咨詢內(nèi)容:
比如說現(xiàn)在下了一手股指多單,我想設(shè)置3個(gè)點(diǎn)止損,5個(gè)點(diǎn)止盈,效果想和軟件里設(shè)置的一樣。
有代碼可以實(shí)現(xiàn)嗎?
- 金字塔客服:
圖表:
if holding>0 and c-enterprice>5*mindiff then sell(1,0,market);//多頭止盈
if holding>0 and enterprice-c>3*mindiff then sell(1,0,market);//多頭止損
if holding<0 and enterprice-c>5*mindiff then sellshort(1,0,market);//空頭止盈
if holding<0 and c-enterprice>3*mindiff then sellshort(1,0,market);//空頭止損
- 用戶回復(fù):
好的。謝謝
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容