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.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.