why do I get this Message?

 
2:26:37 SOLOD_1 EURUSD,Daily: Error opening SELL order : 6
02:26:39 SOLOD_1 EURUSD,Daily: LOTS=2
02:26:39 SOLOD_1 EURUSD,Daily: Error opening SELL order : 6
02:26:42 SOLOD_1 EURUSD,Daily: LOTS=2
02:26:42 SOLOD_1 EURUSD,Daily: Error opening SELL order : 6
02:26:44 SOLOD_1 EURUSD,Daily: LOTS=2
02:26:44 SOLOD_1 EURUSD,Daily: Error opening SELL order : 6
02:26:46 SOLOD_1 EURUSD,Daily: LOTS=2
02:26:46 SOLOD_1 EURUSD,Daily: Error opening SELL order : 6
02:26:59 SOLOD_1 EURUSD,Daily: LOTS=2
 
What code are you using that emits that? (OpenOrder())?

Markus
 
Markus

this generates the order to sell

ticket=OrderSend(Symbol(),OP_SELL,LotsOptimized(),Bid,1,Bid+StopLoss*Point,Bid-TakeProfit*Point,"SHORT",16384,0,Red);
 
Markus

this is more of the same code

{
ticket=OrderSend(Symbol(),OP_SELL,LotsOptimized(),Bid,1,Bid+StopLoss*Point,Bid-TakeProfit*Point,"SHORT",16384,0,Red);


if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELL order opened : ",OrderOpenPrice());
UNO=1;
}
else Print("Error opening SELL order : ",GetLastError());
return(0);
 
Markus

I must also say that the code works fine in MIG Investements S.A.´s platform (MT4), but it doen not work with Metaquotes direcltly
 
Hmm, error 6 means no connection to server. I think I have seen this already on another thread here (dunno if that was you). Do you have the very latest build of MT? Slawa recently said that the very latest build (download from the website here although it still says build 182) fixed some of that mysterious connection problem stuff.






#include "stdlib.mqh"


//+------------------------------------------------------------------+
//| Check for close order conditions                                 |
//+------------------------------------------------------------------+
void ErrorMessage(string text)
{
   /* MessageBox(text + "(" + GetLastError() + ")", 
               "My Trader", MB_ICONEXCLAMATION | MB_OK);  */
               
               
   int err=GetLastError();
   Print("***********************************************************");
   Print("* ", text);
   Print("* ", ErrorDescription(err), " (", err, ")");
   Print("***********************************************************");

}

 
2:26:37 SOLOD_1 EURUSD,Daily: Error opening SELL order : 6
02:26:39 SOLOD_1 EURUSD,Daily: LOTS=2
02:26:39 SOLOD_1 EURUSD,Daily: Error opening SELL order : 6
02:26:42 SOLOD_1 EURUSD,Daily: LOTS=2
02:26:42 SOLOD_1 EURUSD,Daily: Error opening SELL order : 6
02:26:44 SOLOD_1 EURUSD,Daily: LOTS=2
02:26:44 SOLOD_1 EURUSD,Daily: Error opening SELL order : 6
02:26:46 SOLOD_1 EURUSD,Daily: LOTS=2
02:26:46 SOLOD_1 EURUSD,Daily: Error opening SELL order : 6
02:26:59 SOLOD_1 EURUSD,Daily: LOTS=2


There is quite a lot of discussions on the matter on russian half, e.g. "Ошибка номер 6"
The problem looks serious as it affects trading functionality. It appears in the latest builds and is being investigated by the developers atm.
BTW, the build dated 26/08/05 seems to be free of this error.
Reason: