Hi all,
I am building a trading code where I allow multiple orders in the same direction – which means I could have up to 4 long trades on the same strategy running simultaneously.
My code has a trailing stop which moves the initial stop loss to break even when it reaches a 1:1 risk/reward. However, I am having an issue with this, because I would like each stop loss (for each of the 4 trades) to move independently.
My current code has an error, which I do not know how to correct: the stop loss for the 4 trades move to the same level at the same time. So my question is: is there a way to move the stops independently for each of the 4 trades?
Is there a way to “name” or recognise each trade within the code separately?
Thanks!