以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (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=55388)

--  作者:YQW
--  发布时间:2013/8/19 20:40:01
--  多个信号
你好,请问金字塔能否支持一根K线执行多个信号?
--  作者:jinzhe
--  发布时间:2013/8/20 9:01:44
--  

可以支持同根k线多个下单条件触发的下单比如

if 条件1 then buy;

if 条件2 then buy;

这样,一根k线上如果条件1和条件2都满足,会下2次单


--  作者:YQW
--  发布时间:2013/8/20 9:30:32
--  

input:m(5),n(20);
ma5:ma(c,m);
ma10:ma(c,n);

if cross(ma5,ma10) then begin
 sellshort(holding<0,0,thisclose);
 buy(holding=0,0,thisclose);
end

if cross(ma10,ma5) then begin
 sell(holding>0,0,thisclose);
 buyshort(holding=0,0,thisclose);
end



请帮忙把(以支持同根k线多个下单条件触发的下单比如:if 条件1 then buy;if 条件2 then buy;这样,一根k线上如果条件1和条件2都满足,会下2次单)加入到上面的公式中,谢谢。