以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 求助,这样编写语句,图表为何不显示开平仓 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=147868) |
-- 作者:中东商人 -- 发布时间:2017/2/17 7:24:05 -- 求助,这样编写语句,图表为何不显示开平仓 测试结果是只有一笔交易? 开多条件:=kj10>0 and ref(kj10,1)<0;//kj10是一个被赋予了2和-2的一组数据。 开空条件:=kj10<0 and ref(kj10,1)>0; //交易系统 if (开多条件 or 开空条件) then begin 平空:SELL(开多条件 and holding<0,10,thisclose); 开多:buy(开多条件 and holding=0,10,thisclose); 平多:sellshort(开空条件 and holding>0,10,thisCLOSE); 开空:buyshort(开空条件 and holding=0,10,thisclose); end |
-- 作者:pyd -- 发布时间:2017/2/17 9:58:01 -- 你没有分清平多是sell,平空是sellshort 开多条件:=kj10>0 and ref(kj10,1)<0;//kj10是一个被赋予了2和-2的一组数据。
[此贴子已经被作者于2017-2-17 9:58:32编辑过]
|
-- 作者:中东商人 -- 发布时间:2017/2/17 10:11:41 -- 我去,谢谢阿,净给你们添麻烦了 |