以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://222.73.7.161/bbs/index.asp) -- 公式模型编写问题提交 (http://222.73.7.161/bbs/list.asp?boardid=4) ---- 老师,帮我写个加仓策略 (http://222.73.7.161/bbs/dispbbs.asp?boardid=4&id=140984) |
-- 作者:宁静致远1 -- 发布时间:2016/10/14 16:19:30 -- 老师,帮我写个加仓策略 我想设置一个,在初始仓位未平仓的情况下,再次出现买点,每次加2手,该怎么表达 |
-- 作者:宁静致远1 -- 发布时间:2016/10/14 16:40:49 -- if macd1>0 and macd1>ref(macd1,1) and isup and oi>ref(oi,1) and A>ref(A,1) then buy(holding=0,ss,marketr); 这是开仓条件,如何把它加进去?
|
-- 作者:jinzhe -- 发布时间:2016/10/14 16:43:08 -- if macd1>0 and macd1>ref(macd1,1) and isup and oi>ref(oi,1) and A>ref(A,1) and holding=ss then buy(1,ss,marketr); |
-- 作者:宁静致远1 -- 发布时间:2016/10/14 16:49:44 -- 我加进去后,多单信号全部消失了,这是是吗原因 |
-- 作者:宁静致远1 -- 发布时间:2016/10/14 16:50:03 -- 什么原因 |
-- 作者:宁静致远1 -- 发布时间:2016/10/14 16:52:02 -- 我的意思是比如第一次开仓为10手,以后加仓都是2手2手的加 |
-- 作者:jinzhe -- 发布时间:2016/10/14 16:59:21 -- if macd1>0 and macd1>ref(macd1,1) and isup and oi>ref(oi,1) and A>ref(A,1) then buy(holding=0,ss,marketr); if macd1>0 and macd1>ref(macd1,1) and isup and oi>ref(oi,1) and A>ref(A,1) and holding>=ss then buy(1,2,marketr); |