Форум

Здравствуйте! Если не трудно, помогите реализовать ограничение количества открываемых ордеров в следующем коде:

double opB=200; double opS=0; double orderProfitbuy=0; double Sum_Profitbuy=0 ; double orderProfitsel; double Sum_Profitsel ; int orderType ; double LotB=Lot; double LotS=Lot; int total=OrdersTotal(); int b=0,s=0, n=0; for (int i=total-1; i>=0; i--) {if( OrderSelect (i, SELECT_BY_POS))