以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://www.weistock.com/bbs/index.asp)
--  金字塔软件问题提交  (http://www.weistock.com/bbs/list.asp?boardid=2)
----  怎么写跟踪止盈,是跌破前2周期的低点止盈  (http://www.weistock.com/bbs/dispbbs.asp?boardid=2&id=156040)

--  作者:qq代人发帖
--  发布时间:2017/7/18 13:19:47
--  怎么写跟踪止盈,是跌破前2周期的低点止盈
如果螺纹3000买入,保护止损50点,然后跟踪止盈是跌破前2周期的低点止盈,平仓要怎么写

--  作者:gxx978
--  发布时间:2017/7/18 13:37:07
--  
if holding>0 and enterprice-c>50*mindiff then
   sell(1,holding,market);
if holding<0 and c-enterprice>50*mindiff then
   sellshort(1,holding,market);
  
if holding>0 and c-enterprice>0 and c<ref(llv(l,2),1) then
   sell(1,holding,market);
if holding<0 and enterprice-c>0 and c>ref(hhv(h,2),1) then
   sellshort(1,holding,market);
[此贴子已经被作者于2017/7/18 13:58:45编辑过]

--  作者:草原狼99
--  发布时间:2017/7/18 14:04:49
--  
假如7.18号买入的,我的止损是设在15号到17号的低点,这个怎么平


--  作者:pyd
--  发布时间:2017/7/18 14:07:23
--  

设定的条件满足就平仓

假如7.18号3000买入,15和17号的低点是2900,今天的的价格低于2900的时候就触发平仓

[此贴子已经被作者于2017/7/18 14:56:01编辑过]