I would suggest you: take an existing EA (there are two coming with the installation or dld one from the code base) and try to add another indicator as additional filter.
If you have a problem don't ask here in the forum first - you'll find an answer a lot faster if you:
PS: Before you start writing google for your trading idea! There practically nothing that has not been already coded for mt4.
Good advise from Carl.
There are several high quality articles here https://www.mql5.com/en/articles/mt4/examples_experts
And also many coding examples from the user community here https://www.mql5.com/en/code/mt4/experts