Could this EA be easily coded?

I’m looking to turn a fairly simple (at least I think it’s simple :slight_smile: ) concept into a rough EA. I could monkey around with the MQL4 myself, but I’d rather see if I can have one of my professional coder pals tackle it for me. However, I don’t want to toss them some enormous task with a smile and a friendly handshake. So, my question is: How complicated would it be to turn the following concept into an EA to be used for any pair on a 5th decimal platfrom (3rd dec. for Yen pairs)?

SMA 8 > SMA 50
RSI > 50
STOCHASTIC (5,3,3) %K crosses above %D

STOCHASTIC (5,3,3) %K crosses below %D

SELL…the reverse of buy signals
SMA 8 < SMA 50
RSI < 50
STOCHASTIC (5,3,3) %K crosses below %D

STOCHASTIC (5,3,3) %K crosses above %D

for buy = 10 pips below previous candle low
for sell = 10 pips above previous candle high

Not sure how possible/plausible this is, as it would continually change… = 1 pip below/above close of previous candle.

That’s really all there is too it. It’s something I have been toying with on 1H charts, so there is usually 1, 2, and sometimes 3 signals a day to a pair. It typically won’t capture huge moves, but it can pick up a respectable win, and maybe even a so-so trade a day. Anything after that though is usuallly weak if not a complete dud. And, of course, choppy movement can cause all the usual aches and pains.

Do you think someone skilled in coding could manage such a task fairly simply? If so, I’ll pass it on. If not, I’ll screw around with it myself until I become frustrated enough to pay someone to do it :slight_smile:


Something like that would be a piece of cake for a professional coder. It could probably be done in less than an hour.

If you want to try to do it yourself I suggest you do it by modifying the code to the Cowabunga system indicator on this thread…

The MA cross, Stochastics, and RSI code is already in that indicator. All you would basically need to do it modify it for your settings, take out the other Cowabunga stuff, and add the trading code since it’s an indicator and not an EA.

I’ve modified it before and it’s well written code that pretty easy to understand if your not a professional programmer (which I’m not). :slight_smile:

Thanks for the speedy reply.

I figured it wouldn’t be much of a challenge for someone with the right knowledgebase, but I wasn’t sure. I know it would be a battle for me to do from scratch, even as simple as it is :slight_smile:

Modifying the cowabunga code seems like a winner to me though. This idea never crossed my mind honestly, so I’m glad you brought it up. I knew the system worked similarly to what I was proposing but with some additional signals to weed out bad trades.

I might just give that a try and see if I can’t handpick out the bits that apply to my method and drop in some open and close order function calls and whatnot the the mix.

Thanks again. You may have just saved me from a massive headache and my laptop from a violent flight out my window and into the street :slight_smile:

can i make one observation about coding EA and the way they work?

STOCHASTIC (5,3,3) %K crosses below %D

you have to remember that EAs run on every tick and this trade will close right after it gets started.

on one tick the calculated %k will be above the %D and you will open a trade and then 2 ticks later %K is below %D and now your trade will close

just my .02 based on my limited experience.