As far as I know, there is no such function in the reference.
But you can easily build one yourself.
Make a loop on the orders pool, and if the current order symbol matches the chart symbol -> counter++.
But you can easily build one yourself.
Make a loop on the orders pool, and if the current order symbol matches the chart symbol -> counter++.
Pob
You will usually need a count by MagicNumber & OrderType as well as Symbol
So something like
FWIW
-BB-
You will usually need a count by MagicNumber & OrderType as well as Symbol
So something like
int OpenTradesForMNandPairType(int iMN, string sOrderSymbol, int iType) { int icnt, itotal, retval; retval=0; itotal=OrdersTotal(); for(icnt=0;icnt<itotal;icnt++) // for loop { OrderSelect(icnt, SELECT_BY_POS, MODE_TRADES); // check for opened position, symbol & MagicNumber if (OrderSymbol()== sOrderSymbol) { if (OrderMagicNumber()==iMN) { if(OrderType()==iType) retval++; } } // sOrderSymbol } // for loop return(retval); }
FWIW
-BB-
Thanks a lot guys!
:)
pob:
Hi all,
is there a function to get Total Open Orders for one Symbol only?
As far as I know TotalsOrder() will return all Open Orders for all symbols.
Thanks in advance
pob
Hi all,
is there a function to get Total Open Orders for one Symbol only?
As far as I know TotalsOrder() will return all Open Orders for all symbols.
Thanks in advance
pob
mt4 standars indicatore iExposure.mq4
https://www.mql5.com/en/charts/9147694/usdcad-m5-alnus-yatirim-menkul
Chart USDCAD, M5, 2018.09.20 11:03 UTC, Alnus Yatirim Menkul Degerler A.S., MetaTrader 4, Demo
- www.mql5.com
Symbol: USDCAD. Periodicity: M5. Broker: Alnus Yatirim Menkul Degerler A.S.. Trading Platform: MetaTrader 4. Trading Mode: Demo. Date: 2018.09.20 11:03 UTC.
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
is there a function to get Total Open Orders for one Symbol only?
As far as I know TotalsOrder() will return all Open Orders for all symbols.
Thanks in advance
pob