This is my Gain/Loss indicators that is utilizing with version 4 of pine script, it simply writes the percentage on the last candle as label. If loss passes 100% in reality you lost all your money, so the indicators will show "LIQUIDATED" instead of the percentage.