Hi,
I can help you finish your project as you intended and get your EA working as it should.
To start with, I'd look into how much room is there for order execution to push your order around at the time of the activation of the pending order.
Brokers are notorious for messing with the trading conditions, especially in volatile markets.
Your EA may suffer from that because even if the pending order is set in advance at a certain level, the broker may execute it with some slippage.
But we'll get there once we'll get our hands dirty, so to speak...
If you want to discuss more about the project before assigning the job, please reach me in chat.
Thank you for considering my offer!