One way to start is to write pseudo-code, in your own words, what you think needs to be done by the program. Then break it down into small manageable tasks. If you don't know how to program that task, just search the forums, especially the MQ4 forum, for code or a tutorial that accomplishes that task, or near enough you can adapt it. Read tutorials on how MetaTrader works and run some simple sample EA to get a feel for it. Open the code editor with a blank EA and see that there are three main functions to consider:
1)Init
2)start
3)deInit
Init runs once when the EA is loaded. DeInit runs once when the EA is unloaded. Start runs on every tick, depending on how much time it takes to run. Most of your focus will be on the Start function. If you code is simple enough, it can all be typed inside the Start function. As it get's more complex, you'll want to make custom functions, type them elsewhere, name them, and call them from the Start function, keeping everything very readable. Punctuate with comments now and then. Figure out, by taking the time to set up a kind of development environment/routine within MetaTrader, to get immediate feedback on the code you type. There are ways. One way is to learn to write output (ie. variable values) to basic text files for immediate feedback and debugging. Keep it fun by frequent successes...by keeping it simple. Build piece by piece. I would suggest skimming over the help files once quickly, then go back as needed. Skim over tutorials for anything that might apply to your project, and go back as needed, where they apply to your project. Scan the forum and make a folder for any code snippets you can find that might relate to your needs. Cut and paste before you try to come up with something original. This (learning curve) all depends if you are in this for the long haul, or just want to test this one little idea to gather stats on it and/or to automate it...or to get feedback sooner than later. I might be able to help you get feedback sooner than later if you be willing to discuss details with me.
Good1