OrdersTotal()

 
does this function return the total orders of all symbols or the particular symbol of the chart where the ea is attached?
 
This function return total orders in your terminal, no mater on which symbol they were triggered, or if they are auto or manual trades. Those are in other words all open and pending orders. If you want to see only number of trades per symbol you must write a function to count them and compare order symbol with chart symbol
 
Bartlomiej Gorski:
This function return total orders in your terminal, no mater on which symbol they were triggered, or if they are auto or manual trades. Those are in other words all open and pending orders. If you want to see only number of trades per symbol you must write a function to count them and compare order symbol with chart symbol

thanks

 
Tsering Dawa Lama: does this function return the total orders of all symbols

Yes. Using OrdersTotal directly and/or no Magic number filtering on your OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.)
          Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 and MetaTrader 4 - MQL4 programming forum
          MagicNumber: "Magic" Identifier of the Order - MQL4 Articles