Risk to reward ratio in pine script

Job ID: 34264367

Budget: ₹600 – ₹1,500 INR

I have created the entry signal and let me if anyone can code for R:R from my entry signal
Related categories: Python Pine Script