两个开仓方法同时满足即开两次,如何让软件只开一次仓 [金字塔]
- 咨询内容:
if vol_1>=vol_2+vol_3+vol_4 and c_1<o_1-n6 then
begin
buySHORT(1,lots,limitr,open),IGNORECHECKPRICE;
HigherAfterEntry:=enterprice;
LowerAfterEntry:=enterprice;
end
if vol_1>=avvol*3 and c_1<o_1-n7 then
begin
buyshort(1,lots,limitr,open);
HigherAfterEntry:=enterprice;
LowerAfterEntry:=enterprice;
end以上两个开仓条件同时满足软件就开了两次仓,而我只要求开一次
- 金字塔客服:
variable:n=0
if vol_1>=vol_2+vol_3+vol_4 and c_1<o_1-n6 and n=0 then
begin
buySHORT(1,lots,limitr,open),IGNORECHECKPRICE;
HigherAfterEntry:=enterprice;
LowerAfterEntry:=enterprice;n:=1;
end
if vol_1>=avvol*3 and c_1<o_1-n7 and n=0 then
begin
buyshort(1,lots,limitr,open);
HigherAfterEntry:=enterprice;
LowerAfterEntry:=enterprice;n:=1;
end用全局变量来记录下单状态,为0时能下单,只要有任意一个交易了,变为0,后面的就不能交易
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容