π Get Current Profit/LossΒΆ
Helper method: retrieves current floating profit/loss for all open positions.
API Information:
- Sugar method:
MT5Sugar.getProfit() - Returns:
double- Current profit/loss - Underlying:
MT5Service.getProfit()
β¬οΈ OutputΒΆ
Returns: double - Profit/loss in account currency (positive = profit, negative = loss)
Throws: ApiExceptionMT5 if request fails
π Usage ExampleΒΆ
See alsoΒΆ
- Account info:
getEquity(),getBalance()