以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 请教大家几个止损条件的写法 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=75624) |
-- 作者:threefootcat -- 发布时间:2015/2/12 23:02:17 -- 请教大家几个止损条件的写法
|
-- 作者:jinzhe -- 发布时间:2015/2/13 8:55:12 -- 1 if enterbars>10 then begin sell(1,0,marketr); sellshort(1,0,marketr); end
2 此测评功能无法用代码实现
3 if holding>0 and (enterprice-c)/c>0.06 then sell(1,0,marketr); if holding<0 and (c-enterprice)/enterprice>0.06 then sellshort(1,0,marketr);
4 此测评功能无法用代码实现
5 if holding>0 and (hhv(h,enterbars+1)-c)/c>0.08 then sell(1,0,marketr); if holding<0 and (c-llv(l,enterbars+1))/llv(l,enterbars+1)>0.08 then sellshort(1,0,marketr);
6 if openprofit<0 and abs(openprofit)/asset>0.2 then begin sell(1,0,marketr); sellshort(1,0,marketr); end |