Close in losses.
-
How can I do, if I have two operations open one of purchase and another sale. If the purchase is lost I want to close in a few pips and that loss in money save it in a variable.
-
Is this what you are asking for?
BUY + SELL trade at the same time
BUY trade is closed having some loss -> save the loss as money into a variable
or BUY trade is having some loss and you close it -> save the loss as money into a variable
What happen with the sell trade? Same as buy trade?
-
Separately.
-
I also don't really understand what is the question, but you can get the profit amount of every closed trade every time you want, because this data exists and can be read even if you install MetaTrader on another PC.