How program Lot = EURGBP x GBPUSD ?

Aug 13, 2016 at 11:05
Vistas 401
1 Replies
JHenrique
forex_trader_318221
Miembro desde Apr 07, 2016   posts 32
Aug 13, 2016 at 11:05
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!!!
forex_trader_25447
Miembro desde Dec 21, 2010   posts 131
Aug 13, 2016 at 20:23
By theory :
1. To read Ask and Bid for any pair, you need that pair to be listed in Market Watch window.
2. Then you can use MarketInfo('EURUSD',MODE_ASK);

But I recommend you to have 1 open chart for each Symbol.
Then you can read info for any of this Symbols.
Conectarse / Inscribirse to comment
You must be connected to Myfxbook in order to leave a comment
*El uso comercial y el spam no serán tolerados y pueden resultar en el cierre de la cuenta.
Consejo: Al publicar una imagen o una URL de YouTube, ésta se integrará automáticamente en su mensaje!
Consejo: Escriba el signo @ para completar automáticamente un nombre de usuario que participa en esta discusión.