Ordersend in a different par

 

Hi,


I want to create an EA to send orders to a different pair.

So, I want to attach the EA to a graphic and then the EA launch different Ordersend in different pairs, not only the one where is attached.


Can this be done?

When I try I have not success.


Thanks for the feedback.

 

Try OrderSend(Symbol(),OP_BUY,Lots,Ask,0,Ask-(SL*Point),Ask+(TP*Point),CurTime(),0,0,White);

On Symbol() put the pair USDJPY, etc...

 
jcalderon wrote >>

Hi,

I want to create an EA to send orders to a different pair.

So, I want to attach the EA to a graphic and then the EA launch different Ordersend in different pairs, not only the one where is attached.

Can this be done?

When I try I have not success.

Thanks for the feedback.

Hi have same or simliar problem

ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+TakeProfit*Point,Bid-TakeProfit*Point,"",0,0,Green);
if(StringLen(HedgeSymbol) > 0)
ticket2=OrderSend(My2Symbol,OP_BUY,Lots,MarketInfo(HedgeSymbol, MODE_ASK),3,MarketInfo(HedgeSymbol, MODE_BID)-TakeProfit*Point,Ask+TakeProfit*Point,"",0,0,Green);

OrderSend(Symbol() is executed

but

OrderSend(My2Symbol,

not. nothing happens, nothing to see in journals nor logfiles about.

anyone knows what to do in order to send orders for USD.JPY from EUR.USD or any other chart ?

(metatrader4)

 
hurgax:

Hi have same or simliar problem

ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+TakeProfit*Point,Bid-TakeProfit*Point,"",0,0,Green);
if(StringLen(HedgeSymbol) > 0)
ticket2=OrderSend(My2Symbol,OP_BUY,Lots,MarketInfo(HedgeSymbol, MODE_ASK),3,MarketInfo(HedgeSymbol, MODE_BID)-TakeProfit*Point,Ask+TakeProfit*Point,"",0,0,Green);

OrderSend(Symbol() is executed

but

OrderSend(My2Symbol,

not. nothing happens, nothing to see in journals nor logfiles about.

anyone knows what to do in order to send orders for USD.JPY from EUR.USD or any other chart ?

(metatrader4)

I found my mistake.

When I attach the EA to a graphic i.e. EURUSD and make a Ordersend(...) is ok, no issue.

My mistake was with the second order, Ordersend(......, Ask, .....) when Ask is the Ask price for the current graphic. So for a different one:

instead of Ask I must use Marketinfo(EURGBP, MODE_ASK) and instead Bid, MarketInfo(EURGBP, MODE_BID)


I hope this help you also.

Jose

Reason: