How do I calculate the profit based on SYMBOL_SWAP_MODE?

 
Does anyone know where can I find a method with parameters and return value in profit? Thanks.
Reason: