My friends are organising a barcamp in Singapore on 21 Nov 2009. I have decided to join in the fun and hope to present the MQL4 automated forex trading to a group of fellow developers in other areas.
What is a barcamp? Essentially a conference where the contents are user-generated. It is usually open, participatory and contents used to be technical but nowadays there are more fun topics like "How to date a Japanese girl" (presented by a Japanese girl). Attendance can range from a few hundreds to a thousand. Barcamps are getting popular with a group of like-minded people hustling together to explore the changing world advanced through new IT technologies and ideas.
One has to fight for a slot so hopefully I can share something. Otherwise, there will always be a next.
Monday, October 12, 2009
Sunday, October 11, 2009
MQL5 ready for puiblic testing
It is going to be a busy period down the road now, with MQL5 being ready for public beta testing tomorrow (12 Oct 2009). MQL4 has become so popular that a lot of big time brokers have joined in. I am not sure if MQL5 will enjoy the same success.
First, MQL5 is object-oriented, so it will be a steeper learning curve. Most retail forex traders will find it harder to learn.
Second, the compatibilty with MQL4 is not maintained because the creators said the language concepts are just too different. They tried to keep the compatibility but they couldn't. So all EAs and indicators in MQL4 have to be rewritten in MQL5. We can only hope for someone to write a tool to do a conversion for us.
Third, there are just too much success in MQL4 to motivate people to migrate. The best thing happened so far is NFA's new rules which have rendered MQL4 useless so much so that some US brokers just gave up, or encourage traders to use the non-US operations.
We shall see. For me, it just means spending some time to study MQL5 and prepare for the day when brokers indeed stop using the MQL4 platform and force us to move on to MQL5.
First, MQL5 is object-oriented, so it will be a steeper learning curve. Most retail forex traders will find it harder to learn.
Second, the compatibilty with MQL4 is not maintained because the creators said the language concepts are just too different. They tried to keep the compatibility but they couldn't. So all EAs and indicators in MQL4 have to be rewritten in MQL5. We can only hope for someone to write a tool to do a conversion for us.
Third, there are just too much success in MQL4 to motivate people to migrate. The best thing happened so far is NFA's new rules which have rendered MQL4 useless so much so that some US brokers just gave up, or encourage traders to use the non-US operations.
We shall see. For me, it just means spending some time to study MQL5 and prepare for the day when brokers indeed stop using the MQL4 platform and force us to move on to MQL5.
Wednesday, October 7, 2009
More Japanese indicators
Japanese are very innovative people, and you can see this from the progress of the nation. Step into Tokyo and you will discover that they are so willing to use IT and electronics in their everyday processes. It is not a "should I" but instead you will find IT/electronics quite embedded. Take for example the $10 haircut idea copied from Japan which is commonplace in Sinagpore now. Using a machine to collect the $10 notes in exchange for a token card before having your haircut solves the money collection issue by the bosses. No fraud, no miscounting and best of all the money is safe in a machine and no robber can come to clear the till.
OK, I digress. I just wanted to express my admiration of the Japanese and share their innovativeness even in trading. I talked about the Ichimoku cloud chart just a while back. Take a look at other Japanese invented indicators like Kagi charts, or Renko charts. Yet another way of looking at the prices without having to worry about the time factor. Renko candles are just bricks and boxes with no regard to time - just price action reactions. Apparently you can spot more trading opportunities using Renko than candlesticks, afterall the inclusion of open times, closing times, high and low are arbitrary formulated based on time frames. Change the time frame, and information from candlesticks change. Oh by the way, the often used candlesticks is also a Japanese invention.
Kagi charts are similar to Renko charts, paying no regard to time. Kagi charts are joining lines that look like steps depiciting highs and lows and changing of higher highs and lower lows.
Not that these indicators are important to me. I use EAs and hence don't even look at charts. So if we can have charts with no time factor, there must something to all these that is worth investigating more,
OK, I digress. I just wanted to express my admiration of the Japanese and share their innovativeness even in trading. I talked about the Ichimoku cloud chart just a while back. Take a look at other Japanese invented indicators like Kagi charts, or Renko charts. Yet another way of looking at the prices without having to worry about the time factor. Renko candles are just bricks and boxes with no regard to time - just price action reactions. Apparently you can spot more trading opportunities using Renko than candlesticks, afterall the inclusion of open times, closing times, high and low are arbitrary formulated based on time frames. Change the time frame, and information from candlesticks change. Oh by the way, the often used candlesticks is also a Japanese invention.
Kagi charts are similar to Renko charts, paying no regard to time. Kagi charts are joining lines that look like steps depiciting highs and lows and changing of higher highs and lower lows.
Not that these indicators are important to me. I use EAs and hence don't even look at charts. So if we can have charts with no time factor, there must something to all these that is worth investigating more,
Tuesday, October 6, 2009
Clouds watching
Since I am now in Tokyo, Japan, basking in the beauty of the Land of the Rising Sun, it is only appropriate to write about a Japanese indicator called the Ichimoku Kinko Hyo developed in 1969.
When I first came across this indicator, I was not only fascinated to find out what the name means, but the colourful lines and meshes that seem to make this indicator mysterious.So what does Ichimoku Kinko Hyo means? Translated literally it means "one-glance balanced bars/chart" or non-literally, "chart equilibrium at a glance". It comprises of moving averages over a determined period and shifted moving averages. In short, it is really a trend indicator with support and resistance lines. Ichimoku Kinko Hyo or Ichimoku in short (or some like to it cloud charts) is commonly recommended for longer time frame trading such as daily or weekly. But some have shared success even at lower time frames. But I still think that one should stick a minimum of daily time frame.
It used to be difficult to find information about this indicator, but do a google now and you will find tons of them including books. So I shan't write much about this.
When I first came across this indicator, I was not only fascinated to find out what the name means, but the colourful lines and meshes that seem to make this indicator mysterious.So what does Ichimoku Kinko Hyo means? Translated literally it means "one-glance balanced bars/chart" or non-literally, "chart equilibrium at a glance". It comprises of moving averages over a determined period and shifted moving averages. In short, it is really a trend indicator with support and resistance lines. Ichimoku Kinko Hyo or Ichimoku in short (or some like to it cloud charts) is commonly recommended for longer time frame trading such as daily or weekly. But some have shared success even at lower time frames. But I still think that one should stick a minimum of daily time frame.
It used to be difficult to find information about this indicator, but do a google now and you will find tons of them including books. So I shan't write much about this.
Monday, September 28, 2009
Operating in a different domain
It has been a while since I last blogged. I have been investigating a few interesting ideas. One of them is digital filters. Filters are what it says it is – filter off unwanted signals. In the world of digital filters, we are operating on the frequency domain and not time domain. They are related – after all, time is the inverse of frequency.
So what is the advantage of operating in the frequency domain? One clear advantage is the reduction in lag time. A low pass filter lets low frequency components pass through but filter off high frequency components. One way to achieve this is to use a moving average algorithm. Therefore most low pass filters are smoothers and hence the spiky signals get attenuated and a smooth curve can be obtained. Unfortunately this introduced lag, and most indicators are laggards. The more we filter off, the more lag it introduces.

So what is the advantage of operating in the frequency domain? One clear advantage is the reduction in lag time. A low pass filter lets low frequency components pass through but filter off high frequency components. One way to achieve this is to use a moving average algorithm. Therefore most low pass filters are smoothers and hence the spiky signals get attenuated and a smooth curve can be obtained. Unfortunately this introduced lag, and most indicators are laggards. The more we filter off, the more lag it introduces.
A high pass filter filters off low frequency components, the exact opposite of the low pass filter. Add the high pass filter to the low pass filter and wala, you have a bandpass filter. A bandpass filter determines the range of frequencies you want to let through.
Sounds like a bunch of electronics engineering. Yes, it is and google "John F. Ehlers" and discover a world of trading equivalent indicators that are derived from electronics engineering.
And here is a demonstration of the power of digital filters.

Thursday, July 30, 2009
EAs are not universal anymore
It used to be when you write a metatrader EA, it can be used across all brokers who has this platform, and the only thing to take care of is the server time as each broker has different GMT settings and that is provided the trading strategy is time dependent.
Today it is fragmented, in just a matter of months. The first is fractional pips, some brokers have switched to offer this, others remain. But this is easily solved. Next are those US brokers who are NFA registered. In this category, there are different implementations. One broker said everything remain the same, just make sure your lot sizes are not the same so that some backend system will handle the no stoploss, no takeprofit, no trailing stops that NFA has forbidden. Of course all NFA brokers cannot offer hedging now. Then on the other side where brokers are not US based, there are those who offer direct ECN connectivity. That means, you cannot send orders with TP and SL. These two parameters must be zero. But at the next tick, you can send in a modify order command.
Gone are the days where we can have more universal settings and code. So even with one platform, there are so many permutations of implementation that is getting tedious to write a universal EA.
Today it is fragmented, in just a matter of months. The first is fractional pips, some brokers have switched to offer this, others remain. But this is easily solved. Next are those US brokers who are NFA registered. In this category, there are different implementations. One broker said everything remain the same, just make sure your lot sizes are not the same so that some backend system will handle the no stoploss, no takeprofit, no trailing stops that NFA has forbidden. Of course all NFA brokers cannot offer hedging now. Then on the other side where brokers are not US based, there are those who offer direct ECN connectivity. That means, you cannot send orders with TP and SL. These two parameters must be zero. But at the next tick, you can send in a modify order command.
Gone are the days where we can have more universal settings and code. So even with one platform, there are so many permutations of implementation that is getting tedious to write a universal EA.
Thursday, July 16, 2009
Book Review - Mechanical Trading Systems
I came across this book that is worth mentioning only because there are not many books covering automated trading systems. The book is "Mechanical Trading Systems" by Richard L. Weissman, John Wiley & Sons, 2005.
It is a book about mechanical trading system, that is, systems that can be automated or expert advisers (EAs), a term I have been using frequently. It is interesting because it explores the psychology of different trading systems that a trader needs to know in order to match the system to his own trading psychology, something I had talked about in here. But there is no holy grail, it appears the author has some successful automted trading systems which he openly said he will not reveal. His purpose is to share the usefulness of automated trading and how it can be applied as follows:
1. Trend-Following Systems: patience is the key and not getting out of a profitable trade too quickly. The psychological make-up to trade such systems are patience to wait for trade entries, long drawn trades (could be months), ability to give back a large portion of profits.
2. Mean-Reversion Systems: these systems are intermediate term trades and needs discipline; discipline to overcome crowd psychology, media hype and action price reading. There will be more losing trades than winning trades, but the losing trades are small in value but consecutively large.
3. Short-Term Systems: there could be many trades in a day and require quick thinking and fixed formulas for entry, exit and money management. These type of trading is intensive and require the trader to stay seated to the screen (but this is where automated trading comes in handy).
Most of the examples of trading systems are based on technical indicators. I can only infer these are probably not the systems to use since they have been revealed!
The author has also covered the usefulness of automated systems for backtesting, forward testing and optimisation of trade parameters. At risk is the convenience of optimisation and curve fitting of a set of data that does not represent future prices.
So this is a book worth reading so that you know yourself better and therefore have better grasp in handling/using EAs.
It is a book about mechanical trading system, that is, systems that can be automated or expert advisers (EAs), a term I have been using frequently. It is interesting because it explores the psychology of different trading systems that a trader needs to know in order to match the system to his own trading psychology, something I had talked about in here. But there is no holy grail, it appears the author has some successful automted trading systems which he openly said he will not reveal. His purpose is to share the usefulness of automated trading and how it can be applied as follows:
1. Trend-Following Systems: patience is the key and not getting out of a profitable trade too quickly. The psychological make-up to trade such systems are patience to wait for trade entries, long drawn trades (could be months), ability to give back a large portion of profits.
2. Mean-Reversion Systems: these systems are intermediate term trades and needs discipline; discipline to overcome crowd psychology, media hype and action price reading. There will be more losing trades than winning trades, but the losing trades are small in value but consecutively large.
3. Short-Term Systems: there could be many trades in a day and require quick thinking and fixed formulas for entry, exit and money management. These type of trading is intensive and require the trader to stay seated to the screen (but this is where automated trading comes in handy).
Most of the examples of trading systems are based on technical indicators. I can only infer these are probably not the systems to use since they have been revealed!
The author has also covered the usefulness of automated systems for backtesting, forward testing and optimisation of trade parameters. At risk is the convenience of optimisation and curve fitting of a set of data that does not represent future prices.
So this is a book worth reading so that you know yourself better and therefore have better grasp in handling/using EAs.
Subscribe to:
Posts (Atom)