Sending multiple conditional orders
Posted: Oct 13 2014
Again, a basic query. For some reason, Im not able to get it to execute.
What Im trying to do is trigger an order based on certain conditions (condition1 and condition2).
Once that executes, I want to check if the same conditions hold true at 10pm. If so, I want to trigger another order of the same quantity.
The first order triggers ok in in backtesting, but the second one doesnt. Any help on what Im missing?
What Im trying to do is trigger an order based on certain conditions (condition1 and condition2).
Once that executes, I want to check if the same conditions hold true at 10pm. If so, I want to trigger another order of the same quantity.
The first order triggers ok in in backtesting, but the second one doesnt. Any help on what Im missing?
Code: Select all
if marketposition = 0 and condition2 = true and condition3 = true then begin
Buy ("Open-L1") 1 contracts Next bar at Market;
end;
if marketposition = 1 and currentcontracts = 1 and time = 2200 and condition2 = true and condition3 = true then begin
Buy ("Open-L2") 1 contracts Next bar at Market;
end;