考虑使用BUY函数的返回值,通过这个来控制看看是否可行
条件1:buy(...
条件2:buy(...
考虑使用BUY函数的返回值,通过这个来控制看看是否可行
条件1:buy(...
条件2:buy(...
1: 自己使用"搜索"功能,关键字“对应”、“平仓”等等 ,好象阿火秘籍里也有(使用变量)!
2:用个笨办法,找出条件A/B的本质差别,即各自唯一的辅助条件(如:A情况下均线方向是不是和B不同,K线阴阳比例不同等等),加到开平仓条件出去。
可以用全局变量来控制状态
variable:a=0,b=0;
if cond1 and a=0 then begin
buy();
a:=1;
end
if cond2 and b=0 then begin
buy();
b:=1;
end
if mai1 and a=1 then begin
sell();
a:=0;
end
if mai2 and b=1 then begin
sell();
b:=0;
end
可以用全局变量来控制状态
variable:a=0,b=0;
if cond1 and a=0 then begin
buy();
a:=1;
end
if cond2 and b=0 then begin
buy();
b:=1;
end
if mai1 and a=1 then begin
sell();
a:=0;
end
if mai2 and b=1 then begin
sell();
b:=0;
end
1: 自己使用"搜索"功能,关键字“对应”、“平仓”等等 ,好象阿火秘籍里也有(使用变量)!
2:用个笨办法,找出条件A/B的本质差别,即各自唯一的辅助条件(如:A情况下均线方向是不是和B不同,K线阴阳比例不同等等),加到开平仓条件出去。