以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  模型中设置自动止损  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=55724)

--  作者:qq代人发帖
--  发布时间:2013/8/26 16:02:58
--  模型中设置自动止损
请问,我要在模型中设置,止损 
比开仓价损失1%就自动止损,该怎么表达?

--  作者:jinzhe
--  发布时间:2013/8/26 16:11:56
--  

if (c-enterprice)/enterprice>0.01 then sellshort();

if (enterprice-c)/c>0.01 then sell();