I added OrderSend(Symbol(),OP_BUY,Lots,Ask,5,Ask-StopLoss*GetPoint(),Ask+TakeProfit*GetPoint(),"",0,0,Red); in my EA,
The EA only open
it is only open order where the EA attached to the chart pair, let's say if I attach the EA to EURUSD chart, if there is an alert, it only Open EURUSD position,
so I added
if (gsa_112[l_index_0][0]=="USD")
OrderSend("EURUSD",OP_SELL,Lots,Bid,5,Bid-StopLoss*GetPoint(),Bid+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="EUR")
OrderSend("EURUSD",OP_BUY,Lots,Ask,5,Ask-StopLoss*GetPoint(),Ask+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="GBP")
OrderSend("GBPUSD",OP_BUY,Lots,Ask,5,Ask-StopLoss*GetPoint(),Ask+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="JPY")
OrderSend("EURJPY",OP_SELL,Lots,Bid,5,Bid-StopLoss*GetPoint(),Bid+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="CHF")
OrderSend("CADCHF",OP_SELL,Lots,Bid,5,Bid-StopLoss*GetPoint(),Bid+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="CAD")
OrderSend("CADCHF",OP_BUY,Lots,Ask,5,Ask-StopLoss*GetPoint(),Ask+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="AUD")
OrderSend("EURAUD",OP_SELL,Lots,Bid,5,Bid-StopLoss*GetPoint(),Bid+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="NZD")
OrderSend("EURNZD",OP_SELL,Lots,Bid,5,Bid-StopLoss*GetPoint(),Bid+TakeProfit*GetPoint(),"",0,0,Red);
but the problem still persist, may I know why?
The EA only open
it is only open order where the EA attached to the chart pair, let's say if I attach the EA to EURUSD chart, if there is an alert, it only Open EURUSD position,
so I added
if (gsa_112[l_index_0][0]=="USD")
OrderSend("EURUSD",OP_SELL,Lots,Bid,5,Bid-StopLoss*GetPoint(),Bid+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="EUR")
OrderSend("EURUSD",OP_BUY,Lots,Ask,5,Ask-StopLoss*GetPoint(),Ask+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="GBP")
OrderSend("GBPUSD",OP_BUY,Lots,Ask,5,Ask-StopLoss*GetPoint(),Ask+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="JPY")
OrderSend("EURJPY",OP_SELL,Lots,Bid,5,Bid-StopLoss*GetPoint(),Bid+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="CHF")
OrderSend("CADCHF",OP_SELL,Lots,Bid,5,Bid-StopLoss*GetPoint(),Bid+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="CAD")
OrderSend("CADCHF",OP_BUY,Lots,Ask,5,Ask-StopLoss*GetPoint(),Ask+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="AUD")
OrderSend("EURAUD",OP_SELL,Lots,Bid,5,Bid-StopLoss*GetPoint(),Bid+TakeProfit*GetPoint(),"",0,0,Red);
if (gsa_112[l_index_0][0]=="NZD")
OrderSend("EURNZD",OP_SELL,Lots,Bid,5,Bid-StopLoss*GetPoint(),Bid+TakeProfit*GetPoint(),"",0,0,Red);
but the problem still persist, may I know why?