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.
This indicator is designed for automated drawing of Andrews Pitchfork. The Andrews Pitchfork tool is usually drawn according to three main prices of a chart. The method of finding abovementioned prices was developed on the basis of a thorough study and drawing dozens of Andrews Pitchforks. What we offer in this indicator represents a result of our conducted work. This indicator has particular settings and when you change them, the Pitchfork drawing principle stays the same. And changed data will
This indicator extracts a trend from a price series and forecasts its further development. Algorithm is based on modern technique of Singular Spectral Analysis (SSA). SSA is used for extracting the main components (trend, seasonal and wave fluctuations), smoothing and eliminating noise. Does not require the series to be stationary, as well as the information on presence of periodic components and their periods. It can be applied both to price series and to the data of other indicators.
This is an utility for automatic scaling of a chart and making at least 140 bars visible in it. This is necessary for a correct wave analysis according to the Bill Williams' strategy "Trading Chaos". The utility can be used on any timeframe available in МetaТrader 5.
It draws a vertical line through the first bar the calculation starts from. This line allows you to see the probable starting point of the wave sequence along with a sufficient number of bars displayed in the chart. It also makes t
The indicator is intended for determining the spread and swap size, the distance for setting stop orders and stop losses from the current price allowed and the risk per 1 point in the deposit currency.
The indicator informs a trader about possible additional expenses and profits connected with transferring a position to the next trade session of the financial instrument. It also informs about the spread size and the distance of pending orders, stop loss and trailing from the current price. In a
Percent Crosshair is a powerful and easy percentage measure tool.
Measure the chart percentage very quick! Don't waste your time anymore!
Just attach the Percent Crosshair indicator in the chart, select crosshair mode at toolbars or press "Ctrl+F" and start using the crosshair as you always do! The percent measure will be next to the indicative price.
Customize your indicator the way you want!
There are 4 entry parameters:
Positive % color: set the desired color when % is positive. Negat
Fast Copy MT5 allows you to copy trades between different MetaTrader 5 (netting)(hedge) and MetaTrader 4 accounts in any direction and amount, quickly and easily (without loading the system).
Any type of copying is available
MT4 → MT5 MT4 → MT4 MT5 → MT5 MT5 → MT4
* For the MetaTrader 4 terminal — Fast Copy MT4
* For the MetaTrader 5 terminal — Fast Copy MT5
** Before the purchase, you can test the program by downloading the free demo versions — Fast
Create your own list of trading instruments Watch list* and combine it with several open charts Link **.
Using this program, a user can create fully-fledged Watch lists, create and delete trading instruments and move through the list.
A selected symbol shows charts in linked windows. Linked windows can have different periods, indicators, experts, trading panels, etc...
Moving through his/her Watch list, a trader an see the full image of his/her strategy in all windows.
A lot of traders use 1
The Trade Manager Pro EA is a MetaTrader Expert Advisor that performs position management for you avoiding human errors and enhancing your trading activity.
Amazingly easy to use Trade easily from the chart Trade with precise risk management, hassle free Capital preservation is top priority Let profits run without your attention Enjoy risk-free trades as soon as possible Automatic trailing stops for all opened trades Initial stop losses are placed as soon as trades are
The indicator represents an additional chart window with a lower time frame where bars are combined into groups that are equivalent in time to main chart time frame. Bars are synchronized by the right hand side of the window, i.e. the time of the last bar in the main window corresponds to the time of the last bar group in the additional window. The maximum number of groups is 16; the maximum number of bars combined into groups in the additional window is 256. Limitations on the numbers are requi
Reverse TradeCopier Follow can copy trades from an account that is running Reverse TradeCopier Source.
Copies trades from one source (master) account to multiple following (slave) accounts. Allows investor (read only) password for source (master) account. There are no complicated settings and input parameters, everything is easy. Works with different brokers. Works with different quotes symbols (EURUSD_FX, eurusd_m, etc.). Can copy orders from 4-digit quotes platform to 5-dig
This is the Famous Timing Indicator
You can now use the most famous Timing indicator on the planet.
Millionaire Mostafa Belkhayate earned his reputation by using this specific indicator to validate the entry signals supplied by his also famous Center of Gravity indicator on the Forex market. I spent hours, days, weeks to decrypt the formula and now it is finally available to you.
New and Unique for MetaTrader 5
Timing will give you perfect validations for your entry signals. It is the first
Robust median Renko style indicator for creating custom charts resembling Median Renko, Mean Renko, Turbo Renko and Better Renko candles as well as vanilla Renko with wicks plus PointO charts. This all in one package provides all of the signals needed by day traders, scalpers and even long term traders.
The indicator is an overlay on the main chart so it is possible to utilize one-click trading and order manipulation directly on the custom charts. Visual order placement is a
The script is intended for automatic placing of Sell Stop pending orders, Stop Losses and Take Profits on the user specified levels. This script is not that useful as "Virtual pending buy stop", since short positions are opened as Bid price crosses the levels. Thus spread widening is not dangerous. Nevertheless, you need to have this script to prevent unwanted hitting of the Stop Loss levels.
Automation of the process of placing the Sell Stop pending orders, Stop Losses and T
This version of the Traders Dynamic Index has the redrawing of the historical data eliminated, the algorithm calculation speed optimized, more external parameters for a more precise adjustments, and its functionalities extended: added the selection of the initial oscillator and the smoothing methods of the averages.
Mode Osc - estimation oscillator selection; Period Osc - the calculation period of the oscillator used; Price Osc - applied price for the oscillation calculati
The main purpose of the indicator is to detect and mark trade signals on the histogram of the Awesome Oscillator according to the strategies "Trading Chaos, second edition" and "New Trading Dimensions".
The indicator detects and marks the following trade signals:
"Two peaks" - Divergence. The signal "Second wise-man" - third consequent bar of the Awesome Oscillator after its color is changed. The histogram crosses the zero line. The signal "Saucer".The indicator includes a signal block th
All traders using VSA realize the importance of the volume. Unfortunately, tick and spot volumes are not suitable for these purposes.
I have conducted mathematical calculations and managed to trnsform the price into the volume that is close to the futures one by its ratios. Now, you do not have to wrestle with the question of where to obtain the volume data. Besides, you will be able to use the currency pairs having no futures at all. With RealVolume, you do not need to remember data on each ti
Tick volume is equal to amount of ticks at the unit of time. There is direct correlation between tick volume and real amount of deals. Every change of the price is a result of a real request to perform a deal. Consequently, fewer requests we have, the less price changes we get, and, as a consequence, tick volume is smaller.
In this case, when big amount of requests appear on the market, price changes happen more often. Big tick volume appears. Tick volume is an important indicator of trad
Three variables are available for every strategy, any one of them can be disabled, their period can be changed.
type_order=ORDER_FILLING _FOK - order filling type.
ReverseTrade=false — trades opens in reverse direction if true. ExitOnBar=true — trades close on each bar only. spreadcover=false — Spread you pay includes in profit trades. It's like trade with zero spread but you should remember that it can decrease exact match between tester's result and live one. It
The indicator is designed for easy construction of synthetic charts based on data of various financial instruments. It will be useful both arbitrage and pair trading, as well as for analysis purposes. Its main advantage is simplicity and clarity. Each chart is given as a common mathematical formula. For example, if you want to plot the spread (difference) between EURUSD and GBPUSD with coefficients 4 and 3, then set the following formula:
EURUSD * 4 - GBPUSD * 3
The resulting chart is shown in
Using three moving averages, this Expert Advisor opens positions when all 3 MAs are moving the same direction. As the fastest moving average crosses back, the EA exits the positions. You can choose moving averages with less bars to catch shorter term trends or lengthen the number of bars in the moving averages to catch longer term trends.
Note: The default input values are not optimized. Demo the EA and adjust the inputs to find the optimized combination for your risk tolerance and to ma
How to use Pair Trading Station
Pair Trading Station is recommended for H1 time frame and you can use it for any currency pairs. To generate buy and sell signal, follow few steps below to apply Pair Trading Station to your MetaTrader terminal.
When you load Pair Trading Station on your chart, Pair Trading station will assess available historical data in your MetaTrader platforms for each currency pair. On your chart, the amount of historical data available will be displayed for each currency
Trade in the opposite directions with HedgeTerminal
HedgeTerminal is a full-featured trading terminal inside MetaTrader 5. This is a graphic panel resembling MetaTrader 4 terminal. It allows you to track oppositely directed positions in the manner it is possible in MetaTrader 4. In other words, we can open unlimited number of positions on a single symbol even if positions are in complete or partial hedge (lock). Thus, you can maintain long and short positions simultaneously, which is impossible
Cluster analysis of volumes is now available in MetaTrader 5!
The YuСlusters indicator is a professional tool for analyzing the trading volumes. The cluster graph is plotted based on tick data. For the exchange financial instruments these are the volume, type and price of a deal. For the Forex instruments - the real or tick volume (depending on the broker) and Bid price.
There are 6 criteria of cluster generation:
Time interval, the criterion is set in seconds. Price range, the criteri
The SetkaMT5 Expert Advisor is the MetaTrader 5 version of the Setka Expert Advisor which is designed for MetaTrader 4. This Expert Advisor has been written in MQL5 for the MetaTrader 5 Platform.
Run the EA and it will create a grid of orders. Orders are created in both directions with a step that can be set in the EA properties. The number of limit and trend orders can also be set manually.
Once the total profit reaches a predetermined value (you can specify it in the EA settings), all orders
This is an unusual (visual) representation of the famous WPR indicator. Instead of a separate subwindow, it is displayed in the main chart as a channel and levels.
The next version of the indicator will have a possibility of smoothing its values using a moving average.
PeriodWPR - calculation period of the percent price channel LevelUp - the value of the upper level in percentage (negative) LevelDn - the value of the lower level in percentage (negative) Center - the value of t
The script is intended for automatic placing of Buy Stop pending orders, Stop Losses and Take Profits on the user specified levels.
Avoiding unwanted entering a long position in case of false hitting the level as a result of widening of the spread by a dealing center. Avoiding unwanted triggering of a Stop Loss in case a quote pierces a significant level (fractal) without further confirmation with the close price. Setting a necessary virtual order and entering the market in
The main purpose of the indicator is to draw the wave marking on the basis of maximum and minimum levels that has been reached on greater, average and smaller period. It starts to draw the point of a possible wave end if the price passes the deviation distance specified in the settings; the point is considered to be formed if the last closed candlestick hasn't made a new exteremum comparing to the previous candlestick. The fact of displaying a digit of a period itself is not a signal. You need t
VirtualTradePad - is a contol panel for working with orders in МetaТrader 5 : buy, sell, buystop, buylimit, sellstop, selllimit, close, delete, modify, tralling stop.
VirtualTradePad won 2nd prize in the "Best Control Panel in the MQL5 Language" Contest.
The panel consists of 5 tabs.
VirtualTradePad PositionsStyle VirtualTradePad Ordersstyle VirtualTradePad SignalsStyleDemo version of the panel - VirtualTradePad LiteProfit or Loss PadINFO PadYou can also try this panel for
This is an open interest indicator for MetaTrader 5. It fixes open interest value once per minute and writes it to the file (on your PC). The product works on any timeframe but only with exchange instruments.
FULL Automatic is a fully autonomous trading robot for MetaТrader 5 without configurable parameters.
It is similar to SAFE Automatic robot intended for traders having no knowledge of trading basics. It works in Low, Medium, High and Extremal trading modes.
The EA applies modified versions of well-known strategies, including Elliott waves, following a trend, half-pyramiding, scalping, speculative trading with a double deposit protection. The EA switches the strategies automati
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 :)
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.
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.
> 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...
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".
@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.
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
Dude,this is awesome!!! It's a damn goldmine of useful code!!!!