PDA

View Full Version : EA Programming Newbie!



Win2Win
5th May 2009, 20:50
Decided to sit my ass down this morning and look at programming in MQ4, the language the MetaTrader platform uses for indicators & EA's (bots).

Kind of them to supply the code for a MACD EA already, as what I was looking for was based on that indicator.

After fiddling about with the code for a couple of hours, it's pretty easy to get to grips with and figure out, especially if you've used VBA, PHP, etc

So I now have my own MACD EA, containing 50% of my own code :thumbs

....but is it profitable? Yes & no.....so not much use :laugh .....apart from all research is valuable, even if you get crap results from it. The EA does produce long term profits, but only a few grand, and it's an erratic ride.....a bit like laying :omg:

However I now have the basic EA to fiddle with, and MT4 is simple to use for backtesting.

Street cry
5th May 2009, 22:10
good stuff boss

Win2Win
6th May 2009, 18:46
Rather than go all out for a profit bot, I decided to use the code for testing the basic indicators to see what they did. MACD tends to come out the best, and no surprise, with a few settings resulting in only a minor loss.

Some indicators like CCI, RSI, are complete pants for any kind of profitable patterns. I've only tried a few tests with them though, you can test using a hell of a lot of combinations, and it'd take years to run one, so I used only the default for testing.

Just figured out how to read the High/Close, etc of each candlestick so playing with that now. :)

Street cry
6th May 2009, 20:51
stochastics abd bols are good keith if not for deciding entry then at least for managing positions