Argument out of range exeption
Created at 06 Mar 2013, 22:55
Argument out of range exeption
06 Mar 2013, 22:55
Hi,
A got that strange error : Argument out of range exeption in OnTick()
I think it could come frome that code but i'm not sure :
if(Account.PendingOrders.Count > 0) { for(int i =0 ; i<= Account.PendingOrders.Count;i++) { Trade.DeletePendingOrder(Account.PendingOrders[i]); } } if(_position == null) { Trade.CreateBuyStopOrder(Symbol, Volume, buyPrice, SLBuy, TPBuy, null); Trade.CreateSellStopOrder(Symbol, Volume, sellPrice, SLSell, TPSell, null); }
condor
06 Mar 2013, 23:42
SOLVED !!!
I just needed to change this :
to this :
@condor