kajironpu: But this is for each chart, right? How can I know open order info for all chart?
- Wrong. That is for the current chart's symbol. You could have multiple charts open, same symbol different timeframes.
- The OrderSelect loop is for all orders, any or no charts.
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
Thanks,
Symbol()
is just for EA attached currency....
So how can I count by symbol (not EA attached)? I mean all currency pairs that EA attached.
for (int i=0; i<OrdersTotal(); i++){ if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) if (OrderSymbol() =?????
This is not true....
for (int i=0; i<OrdersTotal(); i++){ if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) if (OrderSymbol()== OrderSymbol()){ orders++; }
kajironpu: So how can I count by symbol
Go through the list and get all unique symbols. Go through the list and update your array per symbol

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi, I want to know information for open orders by currency in all charts.
I have running the same EA in several charts
1. EU chart (TF=M1)
2.GJ chart (TF=M15)
3.UJ chart (TF=H1)
4. EU chart (TF=H1)
5. GJ chart (TF=H4)
I can use
But this is for each chart, right?
How can I know open order info for all chart?
For example,
EU current profit total is *****..
GU current profit totai is ****...