Download MetaTrader 5

Why is there NO Complete EA within the Code-Base?

To add comments, please log in or register
Ubzen
5394
Ubzen  

IMO, there appears to be no Complete EA within the mql4.com's Code-base or Articles for that matter of fact. There always seem to be something missing. I'm going to use the definition straight from the source allot of people recommend for learning to program mql4; the Book. In addition to that, I'll add the following. This does-Not consider if it's Profitable or Not.

- Broker's Digit Recognizing (5-points vs 4-points and Jpy vs Others)

- Proper Money Management Options (Martingale Alone don't Count)

- Proper Magic# Identification (if orderTotals==0 does not Count)

- Proper Symbol Differentiation (maybe because most are for 1 sym & timeframe?)

- There's almost always NO order Accounting Process (This 1 a lil Understandable)

- Event tracking is Non-Existent (Don't wanna know when that SL was Hit?)

- Pre-Checks for TradeContexBusy nor for any communication with Server is Un-found.

- Disaster Recovery, (is this just a myth, one reads about in the forum?)

- Ecn vs Dealing Desk OrderSend Compatible (not sending Sl and Tp with OrderSend)

For the age of this forum and mql4 itself, I'd assume someone would have posted a complete EA with all the "what most would consider" standard features of a normal program by this time. Is this too difficult a task? 1st of all, I blame meta-quotes (I love you Meta-Quotes!!). But I think it's about time you posted a Complete EA as defined by the book.

Ok!! Now before people start attacking me with the "Why don't you do it" responses which would be understandable given the tune of this post. The fact is, I'm working on such an EA for the code-base. Well truth is 1st I'm doing it for my own learning. But how come no-body's done this before?

Again, maybe I'd missed such an EA. So if anyone could link me to such an EA I'll appreciate it. Also, I'm looking for a complete list of standard thing to consider within a Complete Program ready for Live Accounts. Don't care much for Bullet-Proofing every Broker and Instrument out there but would like a Brain-Storm with this thread on Standard Includes in your opinion.

Brian Dee - Random Trader
1760
Brian Dee - Random Trader  

Its true not all of these are covered in one Code Base EA

The recent new MACD Sample is updated for full/sub-pip accounts plus ECN/STP brokers.

Re the other items:-

- Proper Money Management Options - Opinions vary and this can get very complex

- Proper Magic# Identification (if orderTotals==0 does not Count) - see this example

- Pre-Checks for TradeContexBusy nor for any communication with Server is Un-found - I believe there are threads on dealing with handling order channel errors

The other items are of interest to the coders who have got a system working & usually by then, they will define & code their own?

Most Friendly New Guys and mid-level EA coders would be overwhelmed by the sheer yardage of a complete commercial EA...

But... feel free to post one anytime :)

-BB-

forexCoder
507
forexCoder  
ubzen:

Ok!! Now before people start attacking me with the "Why don't you do it" responses which would be understandable given the tune of this post. The fact is, I'm working on such an EA for the code-base. Well truth is 1st I'm doing it for my own learning. But how come no-body's done this before?

Much supported (morally :P) and appreciated.

The skills for writing a completely stable EA, that's capable of live-trading and includes everything that you pointed out, are in my opinion the skills-you-pay-for. So it looks like they're the hidden little secrets of the coding masters :)

When you post your code, the quality of mql4 coding by masses should improve over time, but the quality of forum posts should generally decrease (we'll all use a link to your code for reference :P)

Looking forward to it.

bernd
986
bernd  

All these things should really be part of the official API. For example things like the Trade context problem or generally the incredible cumbersome way to handle orders, the magic numbers, etc., the absence of trading event handlers or at least some simple API to easily query a filtered and sorted list of historic events and tings like that. People have written entire libraries to wrap all (or parts) of the low-level MT4 API into something more high level, more easily usable and every one of them is maintaining his very own private version/implementation of such a thing.

Thanks to the strange Metaquotes company policy and their hostile attitude towards the end users and EA developers it seems almost impossible (and nobody will be motivated to try) to establish some kind of constructive community process (or have at least some kind of constructive dialog with MQ) to discuss and agree on such an API and collectively discuss and contribute improvements. But such an API would be utterly needed and should be part of every standard MT4 installation and should be the officially recommended way to access the functionality.

Brian Dee - Random Trader
1760
Brian Dee - Random Trader  

> Thanks to the strange Metaquotes company policy...

My guess its a question of time, effort & risk versus reward

As things stand, MT can post some codes and say these are examples only, its your responsibility whether to run it or not

For MT (or other) to post a library as the definitive order-handling code & maybe there's a bug in it or market conditions may change or server-side behavior altered, there could be serious liability implications

Even a higher-level API exposes a degree of risk, as the Fx market is a rough place with many, many variables

Microsoft can publish a version of Office and issue updates as & when - but you don't get a second chance with trading software

> People have written entire libraries... every one of them is maintaining his very own private version/implementation of such a thing..

Well its kind of understandable given the time, effort, determination & (lost) money it takes to develop these things...

-BB-

Ickyrus
875
Ickyrus  

You get much the same sort of thing happening in almost every industary. There are books on management maths psychology etc. but there is no definiative way of doing something it sort of comes down to the professional saying "it does exactly as you defined it" and the hobbist saying "it works with my broker thats all I need".

Ubzen
5394
Ubzen  

@forexCoder: ...When you post your code, the quality of mql4 coding by masses should improve over time, but the quality of forum posts should generally decrease (we'll all use a link to your code for reference :P)...

Thanks for the support ;). However, it's not going to be that grand. There are much better examples scattered through-out the forum for individual tasks. What I'm talking about are segments much smaller than a designated Include file or Library file which handles OrderReliable for example. My original design is to keep the EA as a single file (no-Include-or-Libraries). Don't hold your breath waiting tho as I'm already getting side-tracked with other projects. But I'll keep this as a worthy goal.

@General> People have written entire libraries... every one of them is maintaining his very own private version/implementation of such a thing..

Yep, very true indeed. Every decent programmer have his own version of everything. Example Error-Handling and Money-Management. Why couldn't MT create a function which returns a Lot-Size when I passed it a StopLoss Price & Percentage Risk. Or return a StopLoss Price when I provided a Lots-Size and Risk. But Noooo, everyone gotta have their own flavor and do their own error checking if they have enough free margin.

Yes, I know MT cannot cover everything. But It'd be nice if they would set better Examples. Even commercial EA's received allot of heat from this forum because they were usually incompatible with other EA's ... now however most of em are changing their ways. I bet most of those developers looked at the Old MACD Simple and went no-worries, it meets MT standards. I can barely run any codes form the code base without seeing an error 130, 131, or modify error# 1.

whroeder1
15612
whroeder1  
ubzen:
For the age of this forum and mql4 itself, I'd assume someone would have posted a complete EA with all the "what most would consider" standard features of a normal program by this time.
Here's mine minus the actual trading logic.
Files:
whrea.mq4 65 kb
Ian Venner
2584
Ian Venner  

what about the EA described in the mql4 book? It has most of the functions you would need, order accounting function, events management function, error handling function etc. Ive never actually compiled that EA to see if it works properly or not I might do that later

forexCoder
507
forexCoder  
WHRoeder:
Here's mine minus the actual trading logic.


Dude,this is awesome!!! It's a damn goldmine of useful code!!!!

Ubzen
5394
Ubzen  
WHRoeder:
Here's mine minus the actual trading logic.
Thanks WHRoeder. This is exactly what I'm talking about. I'll use it as a good template of a Normal program.
1234
To add comments, please log in or register