Need help with automating stop/loss

Bear with me here… While I’ve been trading forex on and off for a few years, I’m not very sophisticated. I’ve finally learned to backtest, do better analysis, etc. I spent the last year really fine tuning a system that suits my trading style and psychology. Now I need help trying to automate it. I understand Stop Losses and Trailing Stop Losses and Take Profits but those won’t work for my system automatically. Here is what I’m looking to do. I’ll use todays EUR/USD as an example with 100k units:
My fundamental view is long EUR so trend is up.
Current quote: 1.4825
For today, I have resistance at 1.4868 and support at 1.4782 (+/- 86 PIPS).

I want a rule that says if EURUSD drops 5 pips below 1.4782 (1.4777) then sell all 100k units and short 50k units. This part is easy. I could just enter a simple stop loss at 1.4777 and at the same time an order to short 50k units at 1.4777.

Here’s where it gets tricky though. That new 1.4782 becomes the support for my new short position and I want my new resistance to be 1.4696.

Think of this as separate channels. When a channel is broken, I would like to automatically set up new stop loss targets and possibly reverse direction.

Then to make matters a bit more complex, my channels are not horizontal. They are parallel but use a regression model to follow the trend. So my channels change every day but have a formula so they are consistent for a period of time.
For instance, my resistance levels daily are:
Day 1 = 1.4868
Day 2 = 1.4885
Day 3 = 1.4903

I’m missing big gaps and opportunities by sleeping :slight_smile:
I use MT4 if that helps. Maybe there is a simple methodology to this. I don’t mind setting new targets daily if that helps.

Is there some sort of way to do “contingent orders?” For instance, if order A is triggered, then enter order B?