以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 老师:平仓条件帮我写下,谢谢 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=147503) |
-- 作者:xhbsy007 -- 发布时间:2017/2/7 19:45:56 -- 老师:平仓条件帮我写下,谢谢 老师:下面平仓条件帮我写下,谢谢! 平多:=开多后盈利X 点 平空:=开空后盈利X点 |
-- 作者:jinzhe -- 发布时间:2017/2/8 8:57:16 -- pd:=close-enterprice>=x; pk:=enterprice-close>=x; |
-- 作者:xhbsy007 -- 发布时间:2017/2/8 10:51:12 -- 谢谢 |
-- 作者:xhbsy007 -- 发布时间:2017/2/8 11:39:39 -- 老师:再加个条件 开多 开空 后 亏损X 点平仓 |
-- 作者:jinzhe -- 发布时间:2017/2/8 12:57:12 -- holding>0 and enterprice-c>=x holding<0 and c-enterprice>=x |
-- 作者:xhbsy007 -- 发布时间:2017/2/8 14:44:14 -- 老师:帮我写个完整的,弄不起来。 平空:sellshort(enterprice-close>=X AND holding<0, 0,marketr); 平多: sell(close-enterprice>=X AND holding>0, 0,marketr ); 开多止损:sellshort(enterprice-c>=X AND holding>0, 0,marketr); 开空止损: sell( c-enterprice>=X AND holding<0, 0,marketr ); |
-- 作者:jinzhe -- 发布时间:2017/2/8 14:48:12 -- 平空:sellshort(enterprice-close>=X AND holding<0, 0,marketr);
平多:sell(close-enterprice>=X AND holding>0, 0,marketr );
开空止损:sellshort(enterprice-c>=X AND holding<0, 0,marketr);
开多止损:sell( c-enterprice>=X AND holding>0, 0,marketr );
|
-- 作者:xhbsy007 -- 发布时间:2017/2/8 15:20:36 -- 盈利平仓 跟止损 怎么代码一样的? |
-- 作者:jinzhe -- 发布时间:2017/2/8 15:22:05 -- 平空:sellshort(enterprice-close>=X AND holding<0, 0,marketr);
平多:sell(close-enterprice>=X AND holding>0, 0,marketr );
开空止损:sellshort(c-enterprice>=X AND holding<0, 0,marketr);
开多止损:sell( enterprice-c>=X AND holding>0, 0,marketr );
|
-- 作者:xhbsy007 -- 发布时间:2017/2/8 15:33:49 -- 谢谢 |