代碼可以設置止盈止損嗎? [金字塔]
- 咨詢內容:
比如說現在下了一手股指多單,我想設置3個點止損,5個點止盈,效果想和軟件里設置的一樣。
有代碼可以實現嗎?
- 金字塔客服:
圖表:
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);//空頭止損
- 用戶回復:
好的。謝謝
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容