Following is a custom function which when called will return total of active trades for a particular magic number:Code:int CountAllTrades(int magic) { int c=0; for (int j=OrdersTotal()-1;j>=0;j--) { OrderSelect(j,SELECT_BY_POS,MODE_TRADES); if (OrderSymbol()==Symbol() && OrderMagicNumber()==magic) c++; } return(c); }
Programming - editing - modification EA, Script or Indicator for MT4 OR MT5 ---- Trading on the Forex market involves substantial risks, including complete possible loss of funds and other losses and is not suitable for all members. Client should make an independent judgments as to whether trading is appropriate for him/her in light of his/her financial condition, investment experience, risk tolerance and other factors.
Tuesday, 27 November 2012
Count All Open Trades
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment