以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://www.weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://www.weistock.com/bbs/list.asp?boardid=4) ---- 止损及移动止盈模型问题 (http://www.weistock.com/bbs/dispbbs.asp?boardid=4&id=163154) |
-- 作者:cdqwy781 -- 发布时间:2018/5/2 23:01:08 -- 止损及移动止盈模型问题 止损。 多单开仓当根K线最低价止损;空单开仓当根K线最高价止损;
移动止盈 盈利大于5小于10个点,从最大盈利点回撤0.61,止盈; 盈利大于10小于20个点,从最大盈利点回撤0.5,止盈; 盈利大于20点,从最大盈利点回撤0.38,止盈。 |
-- 作者:yukizzc -- 发布时间:2018/5/3 8:53:37 -- variable:max_profit=0; pp:=OPENPROFIT/(MULTIPLIER*abs(holding)); if pp>5 and pp<10 then max_profit:=1; if max_profit=1 and (HHV(H,ENTERBARS)-CLOSE)/MULTIPLIER*abs(holding))>=0.61 then sell(1,holding,marketr);
if pp>10 and pp<20 then max_profit:=2; if max_profit=2 and (HHV(H,ENTERBARS)-CLOSE)/MULTIPLIER*abs(holding))>=0.5 then sell(1,holding,marketr); |
-- 作者:cdqwy781 -- 发布时间:2018/5/3 13:40:43 -- 编译错误引用的括号不完整,另外没加止损。 多单开仓当根K线最低价止损;空单开仓当根K线最高价止损;
|
-- 作者:cdqwy781 -- 发布时间:2018/5/3 14:02:36 -- 多单开仓当根K线最低价止损;空单开仓当根K线最高价止损;这个怎么写 |
-- 作者:FireScript -- 发布时间:2018/5/3 14:08:41 -- 你是要按照当前K最低价限价止损? |
-- 作者:cdqwy781 -- 发布时间:2018/5/3 14:11:42 -- 走完一根K吧 |
-- 作者:FireScript -- 发布时间:2018/5/3 14:18:42 -- 不是 我的意思是:比如开多的时候 ,当根K 的收盘价如果等于最低价的时候就止损。是这样吗? |
-- 作者:cdqwy781 -- 发布时间:2018/5/3 14:22:54 -- 是要等这个K走完 |
-- 作者:FireScript -- 发布时间:2018/5/3 14:39:10 -- 多头止损:c<ref(l,ENTERBARS); sell(多头止损 and holding>0 and ENTERBARS>0 ,holding,market); 空头止损:c>ref(h,ENTERBARS); sellshort(空头止损 and holding<0 and ENTERBARS>0 ,holding,market); |
-- 作者:cdqwy781 -- 发布时间:2018/5/3 15:17:27 -- 谢谢谢谢了 |