k线走完之前c就是现价
ma5:=ma(c,5);
if c>ma5-0.005 and c<ma5-0.01 and holding=0 then buy(1,ss,limitr,限定的价格);
建仓,应该是这样吧,请帮我再确认一下。谢谢
ma5:=ma(c,5);
if c>ma5-0.01 and c<ma5-0.05 and holding=0 then buy(1,ss,market);
ma5:=ma(c,5);
if c>ma5-0.005 and c<ma5-0.01 and holding=0 then buy(1,ss,limitr,限定的价格);
这个是达到条件后限价报单
ma5:=ma(c,5);
if c>ma5-0.01 and c<ma5-0.05 and holding=0 then buy(1,ss,market);
这个是达到条件后市价报单,并且c>ma5-0.01 and c<ma5-0.05 这个大于大的小于小的是不会成立的
不知道您要确定什么
(上面的复制表达有误)
您可能没有理解我的意思,您表达的还是限定价,还未能在满足条件下现价
建仓,应该是这样吧,请帮我再确认一下。谢谢
ma5:=ma(c,5);
if c>ma5-0.01 and c<ma5-0.05 and holding=0 then buy(1,ss,market);
ma5:=ma(c,5);
if c>ma5-0.01 and c<ma5-0.05 and holding=0 then buy(1,ss,market);
c>ma5-0.01 and c<ma5-0.05 这个大于大的小于小的是不会成立的,要改成
c<ma5-0.01 and c>ma5-0.05
market这个是市价下单
thisclose是对手价下单
limit是限价下单
根据需要选择