I would like to know how to make my Stop Loss value always based on the gain value in real time.
For example:
Stop Loss initially defined will be 100 pips and I have $ 100 in value to make my trade.
I must inform in some field through a constant the value that I want to have as a basis to start my trade.
I will inform you as an example $ 100
When I start the trade I have a gain of 50 $ this will increase my current value to $ 150, but of these 150 I would like my stop loss to be 50% of this value, that is to say $ 75.
In short, I would like my stoploss to always be 50% of the updated value for each trade.