In my given example. I buy at price 100 (1 lot) and at 50 (1 lot). My average open price would be 75 correct?
When the price is at 75 and I decided to close 1 lot. For the closed position of 1 lot, my profit would be 0 correct?
If you will sell 2 lots you will close position and profit is 0. Closing 1 lot you will still have position Buy with lot 1, opened price 75 and current profit 0.
angevoyageur: That makes no sense. There is only 1 position with an open price who is calculated by averaging price of deals with in direction. When you make a deal with out direction, P/L is calculated by the difference between the open price of the position and the price of the out deal. The volume of the position is reduced by the volume of this out deal and the open price doesn't change.
It all depends on point of view: it doesn't matter to the terminal which position the deal belongs to. Does it make it bigger or smaller. However, for me, in order to assess the effectiveness of a strategy, it is important to know which open deal a given operation belongs to. And for this purpose, the only tool is MagicNumber. I don't think it's the best, because I have to assign this number to the order number first, and it "costs" calculation time.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Terms aside. Lets use layman terms.
In my given example. I buy at price 100 (1 lot) and at 50 (1 lot). My average open price would be 75 correct?
When the price is at 75 and I decided to close 1 lot. For the closed position of 1 lot, my profit would be 0 correct?
therefore the proposed solution from AmitJamuda does not work
I have to do this in MT4.
That makes no sense. There is only 1 position with an open price who is calculated by averaging price of deals with in direction. When you make a deal with out direction, P/L is calculated by the difference between the open price of the position and the price of the out deal. The volume of the position is reduced by the volume of this out deal and the open price doesn't change.
therefore the proposed solution from AmitJamuda does not work
I have to do this in MT4.
After a good 5 years and this is possible in mt5
But I have fallen back to the good old mt4
However, for me, in order to assess the effectiveness of a strategy, it is important to know which open deal a given operation belongs to. And for this purpose, the only tool is MagicNumber. I don't think it's the best, because I have to assign this number to the order number first, and it "costs" calculation time.