Is it possible to enter two contracts at the same price
EnterLong(2, [COLOR="DarkRed"]"EnterLong2contracts"[/COLOR]);
What I could come up with is to 'manually' check if the targets are met
[COLOR="Blue"]protected override void[/COLOR] OnBarUpdate(){ EnterLong(2, [COLOR="DarkRed"]"EnterLong2contracts"[/COLOR]); [COLOR="blue"]if[/COLOR] (Position.Quantity == 2) [COLOR="blue"]if[/COLOR] (Close[0] > target1) [COLOR="DarkGreen"]// target1 met, for the 1st contract[/COLOR] ExitLong(1, [COLOR="darkred"]"exit1stContract"[/COLOR],[COLOR="darkred"]"EnterLong2contracts"[/COLOR]); [COLOR="blue"]if[/COLOR] (Position.Quantity == 1) [COLOR="blue"]if[/COLOR] (Close[0] > target2) [COLOR="DarkGreen"]// target2 met, for the 2nd contract[/COLOR] ExitLong(1, [COLOR="darkred"]"exit2ndContract"[/COLOR],[COLOR="darkred"]"EnterLong2contracts"[/COLOR]) }
Thanks
Comment