'Calculate Stoploss Percentage in Pinescript

I know how to get the calculate the stoploss 245.6 but I don't know how to get the percentage 2.08% ... Can someone please help me get the formula for the percentage?

enter image description here

I used the following formula to get the stoploss 245.6 pips

pips = (abs(1.18047 - 1.15591) / syminfo.mintick) / 10


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source