How program Lot = EURGBP x GBPUSD ?

 
Hi guys!

I’d like to program an EA that open a position with lot = ((EURGBP’s bid + EURGBP’s ask)/2 x (GBPUSD’Sbid + GBPUSD’s ask)/2). How can I do it? What function I should use in the MetaEditor for return the quotation of EURGBP and GBPUSD ?

Thanks!!!

 
JHenry:
Hi guys!

I’d like to program an EA that open a position with lot = ((EURGBP’s bid + EURGBP’s ask)/2 x (GBPUSD’Sbid + GBPUSD’s ask)/2). How can I do it? What function I should use in the MetaEditor for return the quotation of EURGBP and GBPUSD ?

Thanks!!!

Use MarketInfo("EURGBP",MODE_BID) and MarketInfo("EURGBP",MODE_ASK) for EURGBP. The same for any other symbol
 
mladen:
Use MarketInfo("EURGBP",MODE_BID) and MarketInfo("EURGBP",MODE_ASK) for EURGBP. The same for any other symbol
You are the man!!!

THanks a lot!!!! xD