Think i may have a working version, i was using variables to store price and add on x pips etc, but figured that this is essentially a grid that changes the SL after every new trade opens. So my initial trade sets the stop loss at the recent(bars) swing low(or high). Then if its a buy, it sets up pending buy orders at equal length away from the initial opening price. Currently have it set to 10 orders, can't imagine it will ever be more than that. I do a check position count, then adjust all the open trades stop losses accordingly when the next pending buy order is hit. Each position count runs once, so the SL isn't constantly adjusted. I have only tested it on buy orders, but I assume the sell orders will work the same?
One more thing I need to add in is to delete all open pending orders once the SL has been triggered, but im sure I can figure that one out.
Its not the prettiest design, but it does the job.
Open to having someone improve it, or add in variables etc, if it makes it better. My Fxdreema knowledge
https://fxdreema.com/shared/et3s3MzSb