hi again
would u please help
Thanks
Just to refresh my request ....
I do need yr help !
Thanks in advance
Try using a sleep/pause function in a for loop to place your trades.
Maji
hi All
Can you please help me in coding my EA,
i need to place tow pending orders buystop and sellstop for each of the main currency pairs, at the same time,
when ever i try to code that it gave me error #130,
and always send one pending order buystop and never send the sellstop order at the same time
will u help please
Thansk in advanceHi WAW,
The #130 error number means that you supplied an invalid stop, profit or price for the limit order.
To know the minimum pips you can set above/below the market price check the new pending order window (image attached) and it differs from broker to broker!
Hi WAW,
The #130 error number means that you supplied an invalid stop, profit or price for the limit order.
To know the minimum pips you can set above/below the market price check the new pending order window (image attached) and it differs from broker to broker!thanks Coderguru
but i did try to make a difference 10 and even 20 pips and still open only one buy or sell stop and not both orders in the same time?
here is the code :
if ( EAtotal<2 )
OrderSend(Symbol(),OP_SELLSTOP,Lots,S,3,Bid-SL*Point,Bid+TP*Point,"HOG",0,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ", GetLastError());
return(0);
RefreshRates();
OrderSend(Symbol(),OP_SELLSTOP,Lots,b,2,Bid-SL*Point,Bid+TP*Point,"HOG",0,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELL order opened : ",OrderOpenPrice());
}
else Print("Error opening SELL order : ",GetLastError());
return(0);
}
}
return(0);
}
hope you help me to adujust it
Thanks in advance
thanks Coderguru
but i did try to make a difference 10 and even 20 pips and still open only one buy or sell stop and not both orders in the same time?
here is the code :
if ( EAtotal<2 )
OrderSend(Symbol(),OP_SELLSTOP,Lots,S,3,Bid-SL*Point,Bid+TP*Point,"HOG",0,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ", GetLastError());
return(0);
RefreshRates();
OrderSend(Symbol(),OP_SELLSTOP,Lots,b,2,Bid-SL*Point,Bid+TP*Point,"HOG",0,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELL order opened : ",OrderOpenPrice());
}
else Print("Error opening SELL order : ",GetLastError());
return(0);
}
}
return(0);
}
hope you help me to adujust it
Thanks in advanceWAW,
If you email me the code I can take a look at it. My email address is tradermaji at cox dot net
Thanks,
Maji
thanks Coderguru
but i did try to make a difference 10 and even 20 pips and still open only one buy or sell stop and not both orders in the same time?
here is the code :
if ( EAtotal<2 )
OrderSend(Symbol(),OP_SELLSTOP,Lots,S,3,Bid-SL*Point,Bid+TP*Point,"HOG",0,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ", GetLastError());
return(0);
RefreshRates();
OrderSend(Symbol(),OP_SELLSTOP,Lots,b,2,Bid-SL*Point,Bid+TP*Point,"HOG",0,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELL order opened : ",OrderOpenPrice());
}
else Print("Error opening SELL order : ",GetLastError());
return(0);
}
}
return(0);
}
hope you help me to adujust it
Thanks in advanceSome borkers prevents more than 1 pending orders (NothFinance is an example), Could you try it with Fibo Group?
WAW,
If you email me the code I can take a look at it. My email address is tradermaji at cox dot net
Thanks,
MajiAppreciate your reply but i have already attached the code in my previous post
here it is again :
if ( EAtotal<2 )
OrderSend(Symbol(),OP_SELLSTOP,Lots,S,3,Bid-SL*Point,Bid+TP*Point,"HOG",0,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES )) Print("BUY order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ", GetLastError());
return(0);
RefreshRates();
OrderSend(Symbol(),OP_SELLSTOP,Lots,b,2,Bid-SL*Point,Bid+TP*Point,"HOG",0,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES )) Print("SELL order opened : ",OrderOpenPrice());
}
else Print("Error opening SELL order : ",GetLastError());
return(0);
}
}
return(0);
}
What is your Stop order prices?
I spoke with IBFX, and your stop prices has to atleast "spread" pips away from the bid/ask when the orders are placed.
Maji

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi All
Can you please help me in coding my EA,
i need to place tow pending orders buystop and sellstop for each of the main currency pairs, at the same time,
when ever i try to code that it gave me error #130,
and always send one pending order buystop and never send the sellstop order at the same time
will u help please
Thansk in advance