Not sure if my strategy can work with Metatrader

 

I recently began learning MQL4 in order to automate a trading strategy I have been performing manually for some time. However, as I have learned more about the MetaTrader platform and the language it has become apparent that my strategy may not be achievable using the platform.

One key aspect of my strategy is the simultaneous use of two trading accounts with the one broker (This is because simultaneous short and long positions in the same currency pair are not allowed with most brokers). In order for my strategy to work, any program would have to know what is going on in both accounts simultaneously. For example all open positions in both accounts would have to be closed when a net target profit (the sum of profit and loss in both accounts) is reached. From what I understand about MQL4 and MetaTrader so far, this would not be possible with 1 EA as each EA is attached to one chart window only. However I don't know if 2 EA's working simultaneously in two chart windows (and two accounts) can pass information between each other?

Also, perhaps there is a way of automating trading with 2 accounts that I haven't thought of?

 
mobmanager:

Also, perhaps there is a way of automating trading with 2 accounts that I haven't thought of?


Named pipes ?
 
Two programs one master one slave. The slave program takes orders from the master program. The master delivers instructions to the slave by writing to a file.
 

Why not use IBFX in Austrailia they allow hedging trades

 
mobmanager:

One key aspect of my strategy is the simultaneous use of two trading accounts with the one broker (This is because simultaneous short and long positions in the same currency pair are not allowed with most brokers).

Also, perhaps there is a way of automating trading with 2 accounts that I haven't thought of?


just a warning to the wise:

i have encountered numerous traders that had some really big ideas about how to trade using two accounts or trading with hedging....

...and i cant remember one of em that actually was profitable.

maybe we should discuss your strategy first, before you get into all of the ins and outs regarding how you are going to actually trade two accounts simultaneously?

but, considering that you really arent going to hear any of that, i will give to you an option about how you might solve your problem...

btw, it is very not difficult to control hundreds of account terminals on the same computer and they are all controlled by one of the metatrader terminals.

happy coding,

zero/.

Reason: