以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 请老师帮忙写一下 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=151780) |
-- 作者:安公子 -- 发布时间:2017/4/18 9:02:36 -- 请老师帮忙写一下 ma20:=ma(c,20); if c>ma20 and holding=0 then buy(1,20%,market),pertrader; if (c-enterprice)/enterprice>=0.05 then sell(1,0,market); if (enterprice-c)/enterprice>=0.02 then sell(1,0,market);
if c<ma20 and holding=0 then buyshort(1,20%,market),pertrader; if (enterprice-c)/enterprice>=0.05 then sellshort(1,0,market); if (c-enterprice)/enterprice>=0.02 then sellshort(1,0,market); 开仓有带止损,那如何添加移动止损,当盈利50个点,止损前移50个点 |
-- 作者:wenarm -- 发布时间:2017/4/18 9:11:01 -- 参考软件自带的范例代码 01.移动止损模块范例 |