So I am looking at the following code (example code):
Code: Select all
if Cond1= true and Filter1 = true and InCond1Trade = false then begin
InCond1Trade = true;
Buy ("1 Contract Cond1Trade") 1 Contract next Bar Market ;
end;
if Cond2 = true and Filter2 = true and InCond2Trade = false then begin
InCond2Trade = true;
Buy ("1 Contract Cond2Trade") 1 Contract next Bar Market ;
end;
if marketposition = 1 then begin
Sell("Cond1 T Contract") from Entry ("1 Contract Cond1Trade") next Bar at (entryprice + 50*vticksize) Limit;
Sell("Cond1 X Contract") from Entry ("1 Contract Cond1Trade") next Bar at (entryprice - 30*vticksize) Stop;
Sell("Cond2 Contract") from Entry ("1 Contract Cond2Trade") next Bar at (entryprice + 50*vticksize) Limit;
Sell("Cond2 Contract") from Entry ("1 Contract Con21Trade") next Bar at (entryprice - 30*vticksize) Stop;
end;
The problem is how can i determine InCond1Trade = true or false? I need to discover if the "1 Contract Cond1Trade" is filled or not.. how do i do that?