
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
What symbol and magic do you expect to read when you haven't yet selected an order?
Perhaps you should read the manual.
How To Ask Questions The Smart Way. 2004
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
Thank you your advice! Finally i fix my problem.
I only move the
OrderSelect()
before the symbol and magic code.
Thank you very much
For first, just take the example from faq.
and put inside what do you need.
for what do you put the:
if
already make what we need.
Thank you for your help!
I fix the problem finally
add something like this:
Since you did not post the working code. Will my code work. Please
Since you did not post the working code. Will my code work. Please
Yes thats how its done
int ChecklimitedOrders16(int MagicNr) { int TodayslimitedOrders = 0; for(int i=0; i<OrdersTotal(); i++) { string OrderSymbol = OrderGetString(ORDER_SYMBOL); int Magic = OrderGetInteger(ORDER_MAGIC); OrderSelect(OrderGetTicket(i)); if(OrderSymbol == Symbol()) if(Magic == MagicNr ) { TodayslimitedOrders += 1; } } return(TodayslimitedOrders); }
for(int i=PositionsTotal()-1;i>=0;i--) Your count had a small issue