以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  [求助]能否在原模型中增加固定金额止盈参数  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=78381)

--  作者:jzjhm
--  发布时间:2015/5/7 23:58:02
--  [求助]能否在原模型中增加固定金额止盈参数
老师,能否在原模型中增加固定金额止盈参数,可设定,如到5000或8000就止盈,而且持仓同步不要在开仓,
--  作者:jinzhe
--  发布时间:2015/5/8 8:50:22
--  

持仓同步功能只能是在交易界面设置,程序里面写不了

 

固定止盈:

if holding>0 and openprofit>5000 then sell(1,0,market);

if holding<0 and openprofit>5000 then sellshort(1,0,market);