Trade Currencies Online with Easy-Forex!

Posts Tagged ‘MT4’

Minor Fixing in MT4 Indicators

Wednesday, April 16th, 2008

Due to some new code processing rules in the fresh versions of the MetaTrader 4 platform (I don’t know exactly from which build they’ve changed it) some of the indicators on my site stopped working right or just started to show errors in the platform’s log. Thanks to some conscious visitor, who notices the error and contacted me about it, I’ve corrected this issue with all three indicators that had such problem: Aroon Up & Down, Beginner, Float. I guess you’ll have to download those indicators again if you want them to be working smoothly. Other indicators and expert advisors weren’t affected and should be fine for now.

By the way, if you open .mq4 file from my site you might get some older version of it, because it’s stored in your web browser’s cache, so don’t forget to Ctrl+refresh it if you want a new version (or download a zipped version).

MetaTrader Indicators Update

Friday, April 11th, 2008

Two new MetaTrader indicators are now available for download from my site. Both indicators come from forex-tsd.com forums. They are very different, but they both looked quite interesting and useful to me.

  1. Murrey Math Line X — indicates a set of support and resistance lines that can be used similarly to the common pivot points. It consists of 8 different lines, each representing a certain pivot level. Adding this on the chart makes it more readable and can help determine next price stop point:Murrey Math MetaTrader 4 Indicator
  2. TRO MultiPair — a very cool indicator by TheRumpledOne from the forex-tsd.com forums. It shows multitimeframe signals for several currency pairs on one window with several gradations of the signal’s strength. It’s based on many smaller indicators and can be quite useful, especially in scalping and long-term trading. A good scalping strategy is to sell when signal shows red-red-magenta for M1, M5 and M15 timeframes for the given pair and to buy when it shows green-green-magenta:TRO MutiPair MetaTrader 4 Indicator

6 Digit Forex Quotes and MetaTrader Expert Advisors

Wednesday, March 19th, 2008

Many Forex brokers have started to offer 6 digit Forex quotes to via the MetaTrader 4 terminal recently. It has a lot of benefits for the scalping traders and opens up many new trading possibilities for others. But there seems to be a problem with almost all expert advisors that are applied to the MetaTrader 4 platform, which uses 6 digit Forex quotes instead of the more conventional 5 digit format. As the most expert advisors use the "Point" variable for pips to denominate stop-loss and take-profit, there are two major problems with the 6 digit quotes. First, both stop-loss and take-profit values have very strong chances to come to close to the current pair’s price and MT4 will generate an Error 130, if they are to close. Second, the whole strategy embedded into the given EA will stop working properly because all the profits and losses will probably be divided by 10.

Let’s look at the following example. With a 5 digit quote EUR/USD rate is 1.5703 and one Point in MetaTrader 4 is 0.0001 — a conventional pip for EUR/USD pair. Our expert advisor buys EUR/USD, setting stop-loss at 20 pips — 1.5683, and take profit at 40 pips — 1.5743. Everything goes fine and we win 40 pips when the rate reaches 1.5743. But for a 6 digit quote things are completely different. E.g. the rate above might have been 1.57032 and one Point in your MT4 would have been 0.00001 — ten times less than the conventional pip for EUR/USD. The same expert advisor would have set the stop-loss at 1.57012 and take-profit at 1.57072. Not only 99% of the brokers wouldn’t allow such a close stop-loss and take-profit setting, but if allowed this position wouldn’t be very rational and of course it wouldn’t be according to the initial strategy rules.

So how to correct this problem without completely rewriting the expert advisor and, of course, without changing a broker (to one with the 5 digit quotes)? First, I’d like to tell you that all MetaTrader expert advisors that are featured on my site have been already modified to work with both 5 and 6 digit quotes. Second, here is the way to make any EA to work properly with 6 digit quotes:

  1. Open the .mq4 of the expert advisor that you want to change in MQL Editor.
  2. Add a new global variable declaration (it should be in the beginning of the code, along with other variable declarations):
    double Poin;
  3. Add the following code to the init() function of the EA. This function is usually present in all EAs (it contains various initialization routines), but if it’s not there, create it and include this code:
    //Checking for unconventional Point digits number
    if (Point == 0.00001) Poin = 0.0001; //6 digits
    else if (Point == 0.001) Poin = 0.01; //3 digits (for Yen based pairs)
    else Poin = Point; //Normal
  4. Replace all further occurrences of "Point„ in the code with “Poin„ (except those in the init() function). This will change the system MT4 variable “Point„ to our declared variable “Poin", which now contains the standard 5 digit pip value.
  5. That’s all. Compile it and you are ready to run it on the 6 digit quotes in MetaTrader. Of course, it will still work with standard 5 digit quotes too.

MT4 Brokers Accused in Being Scam?

Wednesday, February 27th, 2008

It started eleven days ago on the ForexFactory forum, but I’ve read it first about a week ago on a TalkGold forum’s thread titled “Mt4 Brokers Are All Scam Brokers By Definition”. Of course, I’ve got interested in this topic because I’ve been trading on MetaTrader brokers’ accounts for almost two years and I have never thought of them being a scam “by definition". That made me read both of the threads thoroughly.

Here is the main problem that is pointed out in those threads. Back in February 2006 MetaQuotes announced a 5-day test of the Virtual Dealer Plug-in on the demo trading server. This plug-in was designed to imitate “real dealer work — random time of answer, requote etc [sic!]“. Eleven days ago a post on ForexFactory forum shows a part of some document’s scan describing plug-in’s functionality, including such things as “automated moving up the Limit & Stop Level and Freeze Level according to the preset list of news time”, “disabling (setting, modifying, deletion) of pending orders during news receiving”, “Max Losing Slippage”, “Max Profit Slippage”, etc. Thread starters and many other forum participants believe that this plug-in is being used in all MetaTrader 4 brokers on real trading accounts and that’s what making all such brokers the cheaters. The fact that MetaQuotes deleted all threads about the Virtual Dealer Plug-in on their forum added even more confidence to those traders.

So, what now? Personally, I can say that there’s no actual proof that this plug-in is used on real accounts on any of the MT4 brokers (I am not saying all). I am almost sure that this plug-in (or its newer version) was used during the Automated Trading Championship by MetaQuotes (this competition was for demo accounts). Another point — even if this plug-in can be used on real accounts and is used there by some of the MT4 brokers, it doesn’t imply that all of them are using it and are outright scams.

What will happen when more traders will read about this problem? Those, who thought that the MetaTrader brokers are evil, will definitely become more sure in their belief, those, who didn’t mind before, most probably won’t mind this problem too.

What should you do in this situation? I don’t know, but I’ll continue to trade with the brokers I’ve been using for a long time now, if I find that they hunt my stops or have a high slippage in their favor I will immediately switch to another broker. But I don’t think that it’s a good choice to leave a broker, with services of which I am currently satisfied, just because of some suspicious plug-in’s existence.

Pivot Points Indicator for MetaTrader

Monday, February 18th, 2008

A new indicator is available for download now — it’s TzPivots. It shows the daily pivot points directly on the MetaTrader chart. It’s easy to use — you only need to set two input parameters for it to work properly:

  • LocalTimeZone — should be set to your MetaTrader server’s time zone shift in hours relative to the GMT. E.g. if your charts in MT4 are for GMT-5, then you should enter “-5″ for this parameter.
  • DestTimeZone — is the time zone shift of the destination trading session relative to the GMT. E.g. if you want to trade during the London session, then you need to set this parameter to ”0″ or to ”+1″ when the daylight saving time is on.

That’s all you need to use this wonderful indicator.

Traders Dynamic Index — MetaTrader Indicator

Friday, February 8th, 2008

I published a new complex MetaTrader indicator on the site today — it’s called Traders Dynamic Index. It has almost everything the Forex trader needs: trend direction indicator, trend strength indicator and the market volatility measurement tool. But despite these cool features it is very simple to use. This indicator was sent to me by one of the site’s visitors, but it most probably originates from www.compassfx.com.

Here’s a quick guide to using this indicator (I recommend reading the full guide in its code’s commentary):

  1. Blue bands show a strength of the trend — the wider they are, the stronger is the trend.
  2. Yellow line indicates the trend’s direction change — when it bounces of 32 level, trend goes bullish, when it bounces down from 68 level, trend goes bearish.
  3. Green and red lines signal for the long position — if the green one intersects the red one from below, and — for short position, when the red one crosses the green line from below.

Float - New Addition to MT4 Indicators

Wednesday, January 23rd, 2008

One of my site’s visitors asked me abouth the MetaTrader 4 indicator called “Float“. So I’ve decided to find this one and add it to the MT4 indicators list I maintain. Now everyone can download this interesting indicator and try to use it in Forex trading. It is designed to detect big trend changes and the current trend ‘exhaustion level’. As the bonus it also shows the Fibonacci levels on the main chart window to help the traders to determine good support and resistance levels. It would be fair to say that this indicator comes from StrategyBuilderFX forum’s members and is currently no longer updated.

MetaTrader Indicators User’s Tutorial

Monday, January 7th, 2008

There are many free MetaTrader indicators available on-line, but some people still enounter problems in attaching these indicators to a chart or even compiling them when needed. This simple user’s tutorial was made by me for those that want learn attaching custom MT4 indicators.

1. Download custom MT4 indicator and save it to the ‘indicators’ folder inside the ‘experts’ folder inside your MetaTrader’s installation folder:

2. If it’s already compiled (.ex4 file) then fine, if not (.mql file) - double click it with your mouse and it will be opened in MQL editor (this editor is standard for every MetaTrader 4); click the ‘Compile’ button at the center top of the editor window - the indicator will be compiled and ready to be attached. There might be some errors or warnings during the compilation, but in most cases there shouldn’t be any. You can try and fix those errors, but usually it takes some time and programming skills to do this.

3. After you get the .ex4 file in your indicators folder (through compilation or download), you can start using it with your MetaTrader platform. All you have to do is to attach it to the chart. If you know what you are doing you might also want to change some of the indicator’s input parameters.

OK. Now you can enjoy your new MT4 indicator and hopefully - better
Forex trading results.

MetaTrader History Data Importing and Converting Tutorial for Quality Backtesting

Thursday, January 3rd, 2008

Backtesting MetaTrader expert advisors on historical data is a good way to test a strategy. But testing on the limited data supplied with MT4 installation gives a very poor quality of testing (usually below 50%). So, how to achieve a 90% quality in backtesting of MT4 expert advisors? It’s not that hard really, just follow this simple tutorial and you will able to test any MetaTrader EA.

1. Download a new MetaTrader 4 installation and install it to a separate folder. Be advised that a good MetaTrader historical data take up a lot of disk space, so install it to a drive with at least 1-2 Gbytes of free space. For download MT4 installation I recommend official MetaQuotes site.

2. After you install your MT4, don’t run it yet. Go to the folder you have installed it to. Go the ‘history’ folder there and delete all folders there (the actual folders names inside the ‘history’ folder may be different from those on these pictures):

3. Run the newly installed MetaTrader and open a free demo account with whatever broker it will be offering to you (official MetaQuotes installation offers random brokers for demo account opening in its MT4). Login to your account and close all open charts (if any).

4. Adjust the MetaTrader options to allow larger charts (more bars in history):
The close your MetaTrader.

5. Download a quality historical data for every currency pair you want to test your expert advisor on. I recommend Alpari History Center for this - download M1 data for each of the currency pairs you need.

6. Unzip the archive with M1 historical data somewhere. Rename it to comply with MT4 standard naming - i.e. EUR/USD M1 chart should be named EURUSD1.hst, GBP/USD M1 should be renamed to GBPUSD1.hst, etc.

7. Copy the renamed history file to your MetaTrader’s ‘history’ folder into your broker’s folder (overwrite if prompted):

8. Launch MetaTrader 4 again. Don’t open any charts on-line, open your downloaded M1 chart offline (example shown for EUR/USD chart):

9. It might take some time for the actual chart to load, but it’s OK. Now you need to convert M1 history to every timeframe you will need. For this you need to use a period_converter script which is a standard feature of all MT4 platforms. Run it from the Scripts tab and set its ExtPeriodMultiplier input parameter to the number of minutes in the desired output timeframe. For M5 enter 5, for M15 enter 15, for M30 enter 30, for H1 enter 60, for H4 enter 240, for D1 enter 1440, for W1 enter 10080, MN isn’t convertible as there is no fixed amount of minutes in one month:

10. Wait for the script to finish its work (may take up some time; it’s more than 2 years of data after all):

11. Repeat steps 8-10 for all timeframes you want to get.

12. Repeat steps 5-11 for all currency pairs you want to test your MT4 EAs on.

13. Voilà! Now you can enjoy a 90% quality backtesting and test every expert advisor you want on the time periods of more than 2 years. Good luck with your trading!

Automated Trading Championship 2007 Came to End

Sunday, December 23rd, 2007

The Automated Trading Championship 2007, which was started by the MetaQuotes Software Corp. (the company that made MetaTrader trading platform), ended yesterday and the winners have been announced:

Participant Better earned the first prize of $40,000 with his outstanding neural network expert advisor, which has turned $10,000 into $130,475.45 in 12 trading weeks. Too bad this has been done on demo account, not real :-). A very interesting result with almost 150% distance from the second place. Unfortunately his expert advisor won’t be available to the public, as he refuses to sell or reveal it.

Second prize is going to user wackena, who made $55,042.10 out of $10,000 - a lot less than Better’s EA, but still a very convincing result - 450% in over 3 months. The prize for wackena is $25,000.

Third position belongs to user with the nickname Pegasmaster. His expert advisor earned him $15,000 prize, making $39,945.81 balance during the competition.

My own attempt at this championship made it to the 179th place with $6,684.44 balance left - making it a big loser expert advisor. I had no time not only to forward testing it before championship start, but also to backtest it on some accurate data. Anyway I’ve tried and probably in the next championship I will end up with at least a bit better result :-).

Congratulations to the winners and better luck to all who will participate in the next year’s contest!



FXOpen - Forex at its Best