I'm looking for new Metatrader 4 EA template that is well structured and easy to understand and with comments explaining different functions or other documentation to go along.
Template should have all necessary position, order and money management functions and parameters, as well as ECN and market only order compatibility.
Special emphasis on issues like:
1) Efficient Tick Calculation
Compute state of the EA only when changed instead of on each tick (for example use array based variables to eliminate and reduce lot of repetitive looping in many functions movebreakeven(), movetrailingstop(), movetrailingprofit() etc).
2) Use of libraries
For example Order / Trade management functions are in a library with robust error-handling and error-logging. These include deleting pending orders, opening, closing, modify orders and positions. ECN / non-ECN logic should be handled in Order/Trade management library. The EA should not really bother with execution details etc....
3) Use MQL constants (like OP_BUY, OP_SELL etc) wherever possible
4) Overall efficiency in term of no unnecessary calculations during live running or back testing, only functions that are used are calculated