以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 后台执行程序编写 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=163537) |
-- 作者:yangzw -- 发布时间:2018/5/20 15:58:37 -- 后台执行程序编写 老师我要将以下策略与算法写成后台执行程序,请求帮助,谢谢 MH:ZIG(MA(H,6),0.4 ); MC:ZIG(MA(O,6),0.4 ); ML:ZIG(MA(L,6),0.4 ); ibk:=(ref(mc,1)<ref(mc,2) and mc>ref(mc,1)) or (ref(mh,1)<ref(mh,2) and mh>ref(mh,1) and mc>ref(mc,1) and mL>ref(mL,1)) or (ref(ml,1)<ref(ml,2) and mL>ref(mL,1) and mc>ref(mc,1) and mH>ref(mH,1));//开多条件 ilp:=(ref(mc,1)>ref(mc,2) and mc<ref(mc,1)) or (ref(mh,1)>ref(mh,2) and mc<ref(mh,1)) or (ref(ml,1)>ref(ml,2) and mc<ref(ml,1));//平多条件 isk:=(ref(mc,1)>ref(mc,2) and mc<ref(mc,1)) or (ref(mh,1)>ref(mh,2) and mh<ref(mh,1) and mc<ref(mc,1) and mL<ref(mL,1)) or (ref(ml,1)>ref(ml,2) and mL<ref(mL,1) and mc<ref(mc,1) and mH<ref(mH,1));//开空条件 ibp:=(ref(mc,1)<ref(mc,2) and mc>ref(mc,1)) or (ref(mh,1)<ref(mh,2) and mh>ref(mh,1)) or (ref(mL,1)<ref(mL,2) and mL>ref(mL,1));//平空条件
|
-- 作者:wenarm -- 发布时间:2018/5/21 8:54:25 -- tbuy(ibk,1,MKT); 在你的代码后面加入上面的语句。如果你刚接触金字塔建议你从图表学起。后台需要扎实的编程基础,以及运行机制有一定了解。 |