Thursday, December 31, 2009

2009 Summary

2009 is ending. This one year marks the greatest change I have seen in the world of Metatrader platform. Let's reflect on this.

Metatrader Success
MT4 is now one of the most succesful trading platform for retail forex traders. The platform is simple to use, easy to understand and with a host of EAs and indicators from the Internet. You can download the software easily and there are many brokers providing free demo accounts. Reputable brokers who did not implement metatrader had jumped in - Gain, MB Trading, FXCM and Citibank to name some. This is a Russian product and they have got it right!

NFA disruptions
Lots of new rules from US's NFA seems to target metatrader because it has become a platform that is too lax eg no more hedging with the same currency pair. But it is partially this that makes metatrader successful. Brokers have implemented different strategies to counter the change of rules: from moving to a location outside US to developing a middleware layer to mitigate the changes.

No more universal EAs
So with the NFA disruption and different mitigating strategies used, it is no longer possible to implement an EA that can be used on different brokers. One must now know the idiosyncrasies of each broker.

MQL5
MQL4 is based on functional programming. This is considered a yesterday technology. But it is simple and many can learn it quickly, including traders who have no programming background. MQL5 is object-oriented and MetaQuotes has decided to "upgrade" to this newer in the name of execution speed and of course to bring it in line with today's programming technology. Will MQL5 succeed? A lot of EAs and indicators need to be re-written. The platform has been released to the public for beta testing.

No Automated Forex Trading Chanmpionship
The yearly championship run by MetaQuotes did not occur this year. MetaQuotes explained in the early part of 2009 that they are working hard to release MQL5 and will instead have the competition in 2010 but based on MQL5 so that they can promote their new platform. The Russians had a head start in this as the Russian platform had been made available long before the English version. Well, more importantly, will MQL5 enjoy the same success as MQL4 and will MQL4 ever be replaced, even though the championship will now be focussed on using MQL5 and not MQL4?

Saturday, December 12, 2009

Tips for asking someone else to write your EAs or Indicators

I have been coding quite a bit of EAs and indicators for some people who I converse over the Net but have never met or know them personally. Interesting, there are common tips that I like to share so that you can make the transformation of a strategy to an EA or indicator easier.

STARTUP PHASE

1. Write down all the steps. Yes, if you can't pen down your strategy, it will never be clear to anyone except yourself. You might even discover that you are not clear about it yourself. Of course, if it is a "commercial" strategy, your job is all done up, except for some clarifications. And, yes include charts with clear annotation.

2. Write down your steps in English and unless you know MQL4 coding a fair bit, do not mix the English description with the code. For example, if you want a trade entry at a start of a new day, then say so. Don't mix in a code that say start trade at Hour[0]=0 unless you really mean the 0 hour.

3. Be prepared for lengthy clarifications. Coding needs precision and if the coder is uncertain, he will check back with you. For example, is the start of a new day, the broker's server "new day" or is it some time zone reference that you need?

4. Language is still a problem. We are all in the forex world, but still we can mean differently although we are using the same words. For example, MT4 has stops and limits and a buystop means placing an order above the current Ask price at some acceptable distance and a buylimit means placing an order below the current Ask price at some acceptable distance. But when someone said there will be a limit order or stop order, he could mean:
  • "a limit order is used to start a trade if the price hits a fixed level"
  • "a stop order is used to close a trade if the price hits a fixed level "

Or another person may say

  • "STOP is to do with LOSSES and LIMIT is to do with PROFITS"; with a stop order you decide how much you are prepared to lose ie stoploss; with a limit order you can enter a trade at a specified level and you can specify when to exit (takeprofit)


So why is there so much confusion. Well it is because MT4 allows one entry order with stoploss and takeprofit taken simultaneously. For brokers with ECN, you can only place an entry with no stoploss and takeprofit. You can do your takeprofit and stoploss at the next step. As a result buystop or buylimit is really peculiar to MT4 and hence no commonly understood across the forex market. Of course, the orders under MT4 platform are a lot easier to understand and hence one of the reason for its popularity.


5. Where are you trading from? Sometimes it matters where and when you are trading from, so specify your city and country and the local time you are trading from.


TESTING PHASE

6. With your strategy coded, it is time to test out the EA/indicator. If there are errors, go to the expert and journal tabs and copied out the error messages. It is easier to debug with these messages.


7. For clarity, always specify which broker you are using and better still note the following:

  • use of fractional pips ie 2/4 digit or 3/5 digit; note whether this is also true for the live server - sometimes the demo server is on 3/5 digit system and the live system is on 2/4 digit system
  • note the server time in GMT
  • does your broker use suffix like EURUSDm instead of EURUSD?
  • is it an ECN broker?


EVALUATION PHASE

8. You will be surprised that most of the time, your EA will not do well. There are many reasons for this. Be prepared to discuss the strategy with your coder, who is preferably a trader himself otherwise there will be little value-add.


9. Hidden intuition. A lot of traders use intuition based on experience and it is a challenge to capture this hidden intuition. This is the secret to a successful EA. Think hard what you are looking for that is not documented in the steps. Sometimes the answers may not be even found on the screen.


10. Please do extensive testing before going live.


Hope you have found this useful and hope you can translate the gems in your head into a program that can make trading easier for you. Make that a goal for 2010!