Problem with OrderSend

 
Good afternoon, I wanted to ask a question as I have a problem when making a OrderSend. Is it possible that the same Expert Advisor in MT4 platform from a broker to work properly and the same version but with another broker MT4 me of the error 130 to do OrderSend?
 
jugivi:
Good afternoon, I wanted to ask a question as I have a problem when making a OrderSend. Is it possible that the same Expert Advisor in MT4 platform from a broker to work properly and the same version but with another broker MT4 me of the error 130 to do OrderSend?

Yes, that's possible

Can you display your OrderSend function ?? and give some detail what broker it works and what broker it fails ??

 
deVries:

Yes, that's possible

Can you display your OrderSend function ?? and give some detail what broker it works and what broker it fails ??

Thanks, I do well with Alpari-UK and does not work with ActivTrades??


double cantidad_jugada_entrada = 0.10;

int slippage_entrada = 30;

int take_profit_entrada = 200;

int stop_loss_entrada;


int ticket_compra = OrderSend(Symbol(),OP_BUY,cantidad_jugada_entrada,Ask,slippage_entrada,Bid-stop_loss_entrada*Point,Bid+take_profit_entrada*Point);
if (ticket_compra > 0) // Got it!:)
{
Alert ("Open Order... ", ticket_compra);
break;
}
//
//Error Control
int Error=GetLastError(); // Failed :(
Alert ("Error...", Error);
switch(Error) // Overcomable errors
{
case 129:Alert("Precio no válido. Reintenta...");
RefreshRates();
Sleep(300);
continue;
case 130:Alert("Stop Loss invalido... ", stop_loss_entrada);
RefreshRates();
Sleep(300);
continue;
 
jugivi:

Thanks, I do well with Alpari-UK and does not work with ActivTrades??

<SNIP>

Please edit your post . . . .


Please use this to post code . . . it makes it easier to read.

 
jugivi:

Thanks, I do well with Alpari-UK and does not work with ActivTrades??

Please read this . . . it has all the info you need: ECN
Reason: