@jstap omg.. the point is to experiment with trailing stop loss expanding when price moves above buy and take profit expanding when price moves below it. it's simple as that. please can someone just help me out instead of trying it the old fashion way...
You need to separate your current structure into different separate structures. One for buying and selling and another one to close trades. You can also remove those pass blocks once you do it.
That is a weird strategy or at least I cannot see the market logic behind it. If I understand it correctly, There will be just one open trade at any time (never more than one) moving from chart to chart in a fixed specific order to be open. Are they maybe correlated markets or the opposite? Sorry to ask but I simply don't see how it can work.
This is usual when moving the TS too close to current price. That depends on your broker limits. I don't think you can improve that with some script. Wouldn't you move stop a bit farther away from current price instead?