Download MetaTrader 5

Logic for closing a trade per volume

To add comments, please log in or register
Find out the most discussed Forum topics. Have a look at the Wall section!
raven.chrono 2014.02.03 04:55 

Hi fellow MQL Programmers,

I am trying to develop an EA using MYSQL to mirror a trade from one broker to another broker and having the success of doing it (Opening trades), but when it comes to closing trades especially when trying to close trades with the same volume (client to the mirror) i am having difficulty of creating a logic for it. For example, when the client account closes a trade with 2 lots the(mirror account) will do the same but the catch is, the mirror account has 3 lots (same symbol) with deviation of 1, 1, .5, .2, .2, .1. The program will suppose to close the trades the equals to the number of volume of the client account to which it will close the trade with 1, .5, .2, .2, .1 of volume or 1, 1 of volume.

Can somebody help me how to create a logic for it...

Thank you very much.

whroeder1 2014.02.03 15:38  
  1. I have no idea what you mean by "deviation" and "volume or 1, 1 of volume." is unintelligible.
  2. If you want to close the order, close it.
To add comments, please log in or register