Get number of total order of certain type

 

Hello Folks,

I'm trying to put some code together which will give me the total of open positions only of a certain type.

Example Buy-Position - I need something like this:

extern int MaximumAllowedBuyOrders = 1;
bool PlaceOrderOK = false;

if (TotalOrdersOfTypeBuy < MaximumAllowedBuyOrders)
   {
   PlaceOrderOK = true;
   }
   

Somehow I don't know how to approach this simple task. Could somebody please give me some assistance here?


Thank you.

WorstCases

 

for + OrderSelect()

 

Hey gjol.


Thanks again for your reply.

I try my best, and I have kind of an idea of what you're referring to, but I'm just too new to this programming stuff... Could you please give me a few more details?

How do you count the amount of a certain type of orders?

 

https://www.mql5.com/en/forum/123324 & next tie u can use search as i did

Reason: