Sounds like you just need to use a trailing stop.

0_1589022131574_677dec87-cbe0-483a-b4cc-dc01b42bc611-image.png