以文本方式查看主题

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

--  作者:行走在光明下
--  发布时间:2016/5/3 23:43:50
--  设置止损,却不能止损
我先设置一个强制止损
sellshort(netprofit<-200 and holding=2,2,thisclose);
sell(netprofit<-200 and holding=2,2,thisclose);
后面还有盈利的移动止损,但是软件出现了亏损6000多都不平仓的状况,为什么呢?

--  作者:jinzhe
--  发布时间:2016/5/4 9:22:01
--  

你要的是浮动盈亏函数

把netprofit改成 openprofit


--  作者:行走在光明下
--  发布时间:2016/5/16 0:03:48
--  
谢谢,我去试试