Risk-free with different stop losses in 5 simultaneous positions.
-
I’ve written a robot that can hold, for example, 4 simultaneous positions at a time — let's say 3 buy and 1 sell.
The stop losses of these 4 positions are different in terms of pips. For example, one has an 8-pip SL, another 15 pips, one with 11.5 pips, and another with 20 pips. So they don’t all have a fixed 20-pip SL.
Now, I want to apply risk-free logic in the robot — such that when each position reaches profit equal to its own stop loss, it moves its stop loss to breakeven (entry price).
Is this even possible? And how could it be implemented?"Anyone can solve this — please explain whether I can solve it using magic number, the trade bucket, modifying variables, or something else?"
-
@blue-amir You can do it this way:

-
Thank you so much for your guidance.
I truly appreciate it, and I’m confident that your suggested method will work perfectly.
It hadn’t occurred to me to set it based on a "percentage of the stop loss" — that was a great insight.

-
You're welcome.