Download MetaTrader 5

Can I include multiple currencies in a single EA?

To add comments, please log in or register
Kevin Kim
35
Kevin Kim  

i apologize in advance as I'm sure there were questions similar to this like thousands of times

 but currently, I'm in the process of developing a single EA with multiple currencies including OrderSend and OrderClose functions for several currencies so that the EA can screen currencies simultaneously and trade appropriately

 (as it is that my strategy relies on hedging)

 

So, my question is, if I were to develop a single EA with multiple currencies, and apply it to all the applicable currencies individually, then would it work?

 if not, how would I go about achieving this? 

Marco vd Heijden
Moderator
4969
Marco vd Heijden  
Yes.
Osama Shaban
1500
Osama Shaban  

Yes, you can ...

You almost need to use MarketInfo( ) function to get price of Ask and Bid.  

Kevin Kim
35
Kevin Kim  
Osama Shaban:

Yes, you can ...

You almost need to use MarketInfo( ) function to get price of Ask and Bid.  

yeah, I did include MarketInfo() for all applicable currencies including spread and point ...etc 

 

I understand how OrderSend() works very well but as for OrderClose() function, how is it possible to obtain the ticket number?

 

like would it be okay if, in the ticket number section, I just put the entire OrderSend("XYZ",1,Ask,2,Bid-15*Point,Bid+15*Point) ?  

Daniela Bluemel
622
Daniela Bluemel  
i think you can loop through them with orderselect by pos and then check the currency pair before you check the ticket number
To add comments, please log in or register