calculate_percentage#

API documentation for tradeexecutor.utils.format.calculate_percentage Python function.

calculate_percentage(number1, number2, default_value=None)[source]#

Get percentage of number1 to number2, return default_value if division by zero

Parameters:
Return type:

Optional[float]