Brokers can affect many things, like charts not moving until 01:00, to me though the first tick happens at this time. Over the years I have thought brokers were being dodgy, only to realise that it was my expectations.
For 1 period you have the ID to start from because it is the candle before MACD went from <> or ><, to get this save this ID into a new variable, but you will have to set up a separate tree that adds 1 onto that variable every bar.
You can find the highest and the lowest price levels within that period and store it into two variables. Then you can compare if they are as distant as you want or not.
I don't understand what is the problem. Once a trade is closed its SL doesn't move any more. I you need to do it that way, you can ask the admin to add that option.