I've tried using ChatGPT and Google AI for assistance, and still can't get it right.
The rules. Start by identifying a trend on a 4-hour time frame. 20 EMA above 50 EMA and MACD above the zero line confirms an uptrend. 20ema below 50ema and macd below the zero line confirms a downtrend. Once identifying trend, I go to a 15-minute timeframe, and if the trend is up on 4hour I will enter only if the EMAs are showing an up trend on the 15-minute timeframe. I will only enter once the MACD crosses from below to above the zero line and open a pending order 1pip above the candle that made the MACD cross. I want to set my stop loss below the lowest low of the previous 10 candles minus 6 pips and set my take profit to twice the distance from the stop loss. For a sell. It's just the opposite.
I also only want it to trade during the London and New York sessions only.
(I understand the MACD settings will show market noise, but it looks good on manual backtest.)
So far, this is what I have, doesn't seem to work as intended, and I've no idea how to fix it.