[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 968
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
Please help.
Can someone explain why this function does not close all open orders at once?
//-------------------------------------------------------------------+
int CloseOrders(int mn) // procedure to close all orders
{
int total = OrdersTotal();
for (int cnt = total-1 ; cnt >= 0 ; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if (OrderMagicNumber() == mn && OrderSymbol()==Symbol())
{
if (OrderType()==OP_BUY)
{
OrderClose(OrderTicket(),OrderLots(),Bid,3,Green);
}
if (OrderType()==OP_SELL)
{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Red);
}
if (OrderType()==OP_BUYSTOP)
{
OrderDelete(OrderTicket());
}
if (OrderType()==OP_SELLSTOP)
{
OrderDelete(OrderTicket());
}
}
}
return(0);
}
Please help.
Can someone explain why this function does not close all open orders at once:
Try this
Please help with this question.....
How do I change the TP for an order that is already open?
Please help with this question.....
How do I change the TP for an order that is already open?
try this
Thanks, I'll give it a try.
Don't you need return at the end of the function?
Thanks, I'll give it a try.
Is return at the end of the function unnecessary?
The compiler won't accept quite basic things, help me please!
int start()
int f;f=1;
It swears like this-
'int' - semicolon expected C:\Orderly couture\expertsÃärson.mq4 (38, 4)
'f' - expression on global scope not allowed C:³³'s prints³'s printsó's borders.mq4 (38, 10)
The compiler won't accept quite elementary things, help please!
int start()
int f;f=1;
It swears like this-
Who's going to put the brackets in? Pushkin? And he's right to swear, too bad he doesn't call you names )))
The compiler won't accept quite basic things, help please!
{}{}{}{}{}{}{}{}{}{}{}{}{}{}
Kind people, please help.
Help make the information text in this indicator multicoloured and slightly bolder. The word DOWN red bold word UP green also bold text. Also to the left of the indicator names also make it a bit bolder