@siggi12345 Not sure what you mean. What are those high and low exactly? I see you are adding some manual values. I'm afraid I don't get the logic behind it.
"main line" is the MACD value (which is difference between 2 emas of price)
"signal line" is 9-period MA of the MACD
"histogram" is the difference between main line and signal line
You need to create a variable in which you sore the value on candle ID 1's high +2 pips. Then you compare it with the previious SL level. That way it will only move down.
@siggi12345 Well, you created a script, not an EA. This means the script will only work correctly on Monday and will not work any other weekday. If you want it to be working continuously you need to use this same structure in an EA.
BTW, the first block on top (Pass) is redundant. You can remove it.