Get the number of total trades of an ea.

 

Hi,

can someone help me out how i can get the number of total trades make of an ea based of magicnumber ? Is there a function i can use and than i will show the number as an comment?

Like this: 

Total trades: <<number of total trades made by the ea>>

 
Raphael Schwietering:

Hi,

can someone help me out how i can get the number of total trades make of an ea based of magicnumber ? Is there a function i can use and than i will show the number as an comment?

Like this: 

Total trades: <<number of total trades made by the ea>>

for Mt4, loop through OrdersTotal() & filter by magic number.

 
Raphael Schwietering: can someone help me
  1. Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using CODE button) and state the nature of your problem.
              No free help
              urgent help.

  2. 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

Reason: