How can I know if there are entry orders or not.
CK
Guess you got the orders to go in?
So now you need to count them?!
Entry, aka pending orders - add something this to count them
int PendingTradesForMagicNumber(string SymbolToCheck, int MagicNumberToCheck) { int icnt, itotal, retval; retval=0; itotal=OrdersTotal(); for(icnt=0;icnt<itotal;icnt++) { OrderSelect(icnt, SELECT_BY_POS, MODE_TRADES); // check for pending position, symbol & MagicNumber if(OrderType()>OP_SELL && OrderSymbol()==SymbolToCheck && OrderMagicNumber()==MagicNumberToCheck) { retval++; //Print("Orders pending: ",retval); } } return(retval); }
as ever, OTTOMH :)
-BB-

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