OrderProfit()

 

Question about the:

OrderProfit()


Does it return the net profit aka the profit without spread or including spread ?

Since the documentation says it returns the profit without swap & comission, but doesnt say anything about spread?

 
Including. On a Buy you pay the spread when you open. On a Sell you pay the spread when you close. Profit = (OOP-OCP) * Lots * DeltaPerLot
 
WHRoeder:
Including. On a Buy you pay the spread when you open. On a Sell you pay the spread when you close. Profit = (OOP-OCP) * Lots * DeltaPerLot
Ok cool.So that means that when the order is opened OrderProfit is negative and its first value = current spread calculated in cash, and only after the trade went enough in the good direction it is becoming positive.Nice.
 
WHRoeder:
Including. On a Buy you pay the spread when you open. On a Sell you pay the spread when you close. Profit = (OOP-OCP) * Lots * DeltaPerLot
In all case you pay the spread when the trade is closed.
 
how to close a trade in profit exluding the spread..a right code can help me..
 
legendofcibola:
how to close a trade in profit exluding the spread..a right code can help me..

What are you talking about? You cannot exclude the spread.

Reason: