Hi,
iam trying to create another matringale ea ( no comments http://www.sparkimg.com/emoticons/biggrin.gif )
I need help from a coder please.
If there are different trades with different lotsize open and the profit is reached the EA should close all the trades. nothing special
But i wished the EA closed the trades by lotsize because if i lost 1 pip on on 0.1 lot isnt the same if i lost 1 Pip by 1.0 lots... ok ok 1 pip is 1 pip
So the EA should close the biggest Lotsize first and then the smaller lotsizes
Could anyone give my a code snippet with similiar things ?
Could you help me with the following:
-Put all open trades into an array with ticketnumber and lotsize
-sort the array by lotsize
-use this array to close all open trades by ticketnumber
Many thanks for your help and Sorry for my english
iam trying to create another matringale ea ( no comments http://www.sparkimg.com/emoticons/biggrin.gif )
I need help from a coder please.
If there are different trades with different lotsize open and the profit is reached the EA should close all the trades. nothing special
But i wished the EA closed the trades by lotsize because if i lost 1 pip on on 0.1 lot isnt the same if i lost 1 Pip by 1.0 lots... ok ok 1 pip is 1 pip
So the EA should close the biggest Lotsize first and then the smaller lotsizes
Could anyone give my a code snippet with similiar things ?
Could you help me with the following:
-Put all open trades into an array with ticketnumber and lotsize
-sort the array by lotsize
-use this array to close all open trades by ticketnumber
Many thanks for your help and Sorry for my english