Hi All,
Please, I need help with my EA, attached. It only opens one order at once, even when I have multiple signals at once.
It will only open one order, and it will not open another on a different pair until the opened order has been closed. It has a Magic number, and I make sure that each pair has a different Magic number, but i
think it is not respecting it. Any help will be appreciated.
Thank you.
Can you copy paste what you see in the journal logs here?
Can you copy paste what you see in the journal logs here?
The message on the journal is that the "expert advisor is loaded successfully".
it works very well, but the only problem is that when i have multiple signals on many pairs, it will only open one order and ignore the rest. But when that order is closed, it will open another order on another pair that has a valid signal.
Please I am having the same issue. I really need help on this. Here is my code for entering order.... I also change the magic number on each pair, but it is not responding to many trades at a time
double bsl, ssl, btp, stp;// bsl=buy stop loss, ssl = sell stop loss, btp = buy take profit, stp = sell take profit
void OrderEntry (int direction)
{
if(direction==0)
{
bsl=0;
btp=0;
if(StopLoss!=0)bsl=Ask-(StopLoss*pips); ///////
if(TakeProfit!=0)btp=Ask+(TakeProfit*pips);
if(OrdersTotal() == 0)
ticket = OrderSend (Symbol(),OP_BUY,LotSize,Ask,3,bsl,btp,NULL,MagicNumber,0,Blue);
}
if(direction==1)
{
ssl=0;
stp=0;
if(StopLoss!=0)ssl = Bid+(StopLoss*pips);/////
if(TakeProfit!=0)stp = Bid-(TakeProfit*pips);
if(OrdersTotal() == 0)
ticket = OrderSend (Symbol(),OP_SELL,LotSize,Bid,3,ssl,stp,NULL,MagicNumber,0,Red);
}
}
- www.metatrader5.com
- 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,
Please, I need help with my EA, attached. It only opens one order at once, even when I have multiple signals at once.
It will only open one order, and it will not open another on a different pair until the opened order has been closed. It has a Magic number, and I make sure that each pair has a different Magic number, but i
think it is not respecting it. Any help will be appreciated.
Thank you.