
06-10-2008, 02:09 PM
|
 |
Senior Member
|
|
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 696
|
|
Quote:
Originally Posted by panteraschoice
Something goes wrong. The demo account was wiped out completely.
Here is a small part from the expert log, with hundreds of those "invalid price for OrderClose function" :
GBPJPY at 209.23 sl: 212.23 tp: 208.23 ok
10:00:04 2730_BasketVentilatorVoorProg_2 GBPCHF,H1: invalid price 2.02750000
for OrderClose function
10:00:04 2730_BasketVentilatorVoorProg_2 EURUSD,H1: invalid price 1.55750000
for OrderClose function
10:00:04 2730_BasketVentilatorVoorProg_2 GBPCHF,H1: close #11685361 sell
0.10 GBPCHF at 2.0270 sl: 2.0570 tp: 2.0170 at price 2.0275
10:00:05 2730_BasketVentilatorVoorProg_2 USDCHF,H1: invalid price 1.03350000
for OrderClose function
10:00:05 2730_BasketVentilatorVoorProg_2 EURUSD,H1: invalid price 1.55740000
for OrderClose function
this is the part in the ea for the OrderClose,
I do not see what is wrong in it, maybe someone can help?
//---------------------
int l_ord_total_72 = OrdersTotal();
for (int l_pos_76 = 0; l_pos_76 < l_ord_total_72; l_pos_76++) {
if (OrderSelect(l_pos_76, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() == Symbol()) {
l_cmd_80 = OrderType();
if (l_cmd_80 == OP_BUY) {
l_count_56++;
if (l_isar_48 > Close[0]) OrderClose(OrderTicket(), OrderLots(), Bid, 3, Violet);
}
if (l_cmd_80 == OP_SELL) {
l_count_60++;
if (l_isar_48 < Close[0]) OrderClose(OrderTicket(), OrderLots(), Ask, 3, Violet);
}
}
}
}
//--------------------
|
Maybe you got new prices from broker, try to use RefreshRates function before OrderClose if you will get error.
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
|