以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  K线走完模式  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=66514)

--  作者:系统使用者
--  发布时间:2014/6/23 22:07:00
--  K线走完模式
平多:sell(tmp<0 and holding>0,手数,marketr);
平空:sellshort(tmp>0 and holding<0,手数,marketr);
开多:buy(tmp>0 and holding<=0,手数,marketr);
开空:buyshort(tmp<0 and holding>=0,手数,marketr);

今天晚上黄金多次出现不成交,5分周期


--  作者:系统使用者
--  发布时间:2014/6/23 22:38:36
--  
if holding=0 then begin
 if tmp>0 then
  buy(1,手数,marketr);
end
if holding=0 then begin
 if tmp<0 then
  buyshort(1,手数,marketr);  
end
if holding>0 then begin
 if tmp<0 then begin
  sell(1,holding,marketr);
  buyshort(1,手数,marketr);
 end
end
if holding<0 then begin
 if tmp>0 then begin
  sellshort(1,holding,marketr);
  buy(1,手数,marketr);
 end
end
这2种模式那个优?

--  作者:王锋
--  发布时间:2014/6/23 23:05:51
--  
只要能实现你想法的就可以了,没什么优不优的