"Where to exit a profitable position trying to achieve the maximum return?".
Almost nothing, or .... almost everything :)
From the moment we understand that we cannot know what will happen in the future, this unknown belongs to the realm of darkness.
Many times you close and regret having done so as the price continues to advance...
Other times you close and regret not having done so, as waiting reduces the benefits...
But what I have observed up to now has been the following:
If you set a target for profits, it becomes very difficult to maintain a consistent account in the long term. Negative trades will gradually erode the profits made. This is almost certain at 100%.
If you raise the target to "catch" the trades that yield more profits, the rest will end up in the red as they will reverse before reaching the preset target since these trades are the least frequent.
Regarding entry, it is much more beneficial to "spend the cartridges" trying to hook onto a primary trend than to open trades with the sole objective of a fixed profit.
Returning to where to close the trade, the best option (without a doubt) is to let the market expel you rather than leaving on your own. This is achieved by using a trailing stop, looser at the beginning to allow the price to breathe and ensure that a simple retracement doesn’t expel you, leaving you out of the game, and tighter as the profits become more significant. As you can understand, there are no fixed rules. It depends on your "game vision".