Add take profit to a Supertrend strategy

Job ID: 33358617

Budget: €8 – €30 EUR

Hello, I would like to add a take profit to my strategy. This is based on the Supertrend indicator which from time to time forms supports and resistances to break.
The take profit should have the following characteristics:

- For long: (entry level - support) + entry level
- For short: (resistance - entry level) - entry level
R/R 1:1 ratio respect to the long/short exit

- TP1: 50% closing of the position + breakeven on the entry level when TP1 has been reached
- TP2: closing the other 50% of the position when the system open in the opposite direction

Could someone help me? Thank you very much.

Regards
Related categories: Statistics Finance Mathematics Pine Script Trading