Musing and an introduction from a new MQL 4 Coder.

 

Hello all, I wanted to write about my experiences so far, in the hundreds of hours I have put into programming EA's as a hobby project. I am going to be vague but perhaps informative from the perspective of a relatively new MQL4 trader/ coder.


Firstly achieving a grail, I certainly touched on some of what the grail article states more or less when I started and I would guess, everyone’s first attempts can often find things in common with subjects described in that article.

Indeed, at first from the perspective of a programmer simply reading a chart, it seems quite easy to code a relatively sound strategy but what is not evident until you have run up against it sooner or later, is that bar 0 is unpredictable at the extremes, that seems a simple statement I realize but you can be a coding a piece in the first few weeks that looks fine on paper or in theory then you realize just how much the strength of that unknown element makes a difference.


After soon throwing my initial ideas out, in fact about a dozen out, I came across what I will call the pursuit of accuracy syndrome. In that I can get vastly increased accuracy ratings by increasing certain parameters, easy in theory but how tragic that can end up, no matter how conservative your investments.


The last EA I coded eventually had a 98% accuracy rating, trading small trades once or twice a month on most charts but that doesn’t matter if the draw down is great enough to kill its profits. I also realize how unbelieveable that sounds but after many years of test data, on ticks and weeks on demo accounts 70%+, 80%+, 93% and eventually tweaked and trimmed to 98% is what I had, yet it still was not profitable!


The new one I have in the works looks promising but the strategy is much less conservative, it sits between 60/70% accuracy, still it takes much of the brain from my previous one and it goes on in an evolving process to something greater each time. My point here is, don’t get hung up on any one factor above all else is what I have learned several times, also don’t be afraid to take losses or remodel the EA.


So that said, happy hunting, I am looking forward to making contacts with people who have a mind for unique strategies and are not afraid to try them.

 

Onyx

Best to start with a proven manual system, something real to start with rather than just an 'i can do this in code' approach...

As a minimum, the EA should be 'aware' of several timeframes and be using several indicators and/or pivot/support/resistance lines

Minimum targets are approx

60%+ win rate

1.75+ profit factor

<15% drawdown

All systems will go through bad periods - Jan 1st - Feb 14th this year has been bad for many systems, even long-standing (previously successful) manual discretionary ones :(

You should try & test at least the previous 2 years not just the last two months

You may find you need to switch the EA off 3-6 months each year - but it works for the rest...

'unique strategies' - maybe you get lucky, but it is a longer shot than coding up a straddle of the Asian session EURUSD...

FWIW

-BB-

 
BarrowBoy:

Onyx

Best to start with a proven manual system, something real to start with rather than just an 'i can do this in code' approach...

As a minimum, the EA should be 'aware' of several timeframes and be using several indicators and/or pivot/support/resistance lines

Minimum targets are approx

60%+ win rate

1.75+ profit factor

<15% drawdown

All systems will go through bad periods - Jan 1st - Feb 14th this year has been bad for many systems, even long-standing (previously successful) manual discretionary ones :(

You should try & test at least the previous 2 years not just the last two months

You may find you need to switch the EA off 3-6 months each year - but it works for the rest...

'unique strategies' - maybe you get lucky, but it is a longer shot than coding up a straddle of the Asian session EURUSD...

FWIW

-BB-

Thank you for the advice. Through sheer brute force experience and testing a couple of dozen permutations on EAs, I have come to many of the same conclusions so far. I was also speaking to a friend of mine a few days ago, who has considerable experience in Forex trading and he himself said you might need to semi-auto trade, switching EAs off when the signs are their trends are dying out, however that conclusion generates a new problem to tackle.

The main thing is I am enjoying what I am doing, in experimenting and testing ideas and that is half the battle of success.

 

> switching EAs off when the signs are their trends are dying

On some systems this can be as simple as the D1 ATR(20) below a certain value or below its Moving Average

Or check if market is ranging or trending as in this example 'SVOS Multi-Indicator EA'

Of course an EA can be devised to be semi-auto from the start, see here

Good Luck

-BB-

Reason: