Thursday, February 26, 2009

Using Expert Advisors To Evaluate Your Trading Psychology

In my first blog entry on this series of articles on the uses of expert advisors, I mentioned how EAs can be used to research trading strategies. I would like expand this topic and discuss about trading psychology.

Scenario A: Seething Courage to Carry On
One thing for sure: if you trade with real money versus demo accounts, your whole trading psychology will change. What you dare to do in a demo account, you may not dare to execute live. For example, you have a strategy to average in your orders. You take a buy order but the price moved against you. You take another buy order, hoping to average your price entry. Meanwhile the strategy advocates no stop losses for you entries. When you run it off the Strategy Tester, the results show a profitable strategy. But when you eventually run it live, you may not stomach the drawdowns, and wondered how many levels you need to go before the prices come back. You pull the plug - aha - human intervention of a EA - is that good or bad? Let's not answer this question for now. But the point is this - if you execute orders against a trend, and your orders have no stop losses, how would you behave in live trading against a backtest or even demo account?

Scenario B Seeing the EA through.
Suppose a backtest of a trading strategy over a year period, say 2008, showed a not so profitable period but eventually it ended with a nice profit It is comforting to start off with your EA making profits but what do you when your EA makes a string of losses? Do you carry on or do you stop the EA? The graph shows an EA performing well for a period and then becomes non profitable (period 262) and finally coming through at end with a nice profit. Great graph to look at. But how do you behave during the one year period rather than a few seconds or minutes of simulation?

Scenario C: Seeing is Believing
Or you were told that Metatrader's Strategy Tester is useless and inaccurate. Suppose your EA showed such a negative performance in the Tester, would you go ahead and trade it live? If the Strategy Tester is lying when you get good graphs, how much lies are you getting from a downward spiralling profit graph?

Scenario D: The Seeing Leads the Blind
Neural networks are getting popular these days for forex trading. One thing about NN systems is that you need to do some optimisation because it is a pattern recognition system and hence as new patterns comes over a new period, the software needs to be trained. During demo, you watched the EA fire orders, and you have no idea how it figured out when to send an order and when not to. During live, the same thing happened. When it makes money for you are fine! When it loses, what do you do? What have you learnt about trading from such a strategy? Nothing! Is that what you want? If so, then neural network-based EA are for you.

I hope you have a flavour to look out for what your heart tells you.

Thursday, February 12, 2009

Using Expert Advisors for Non-Trading Purposes

Expert Advisors have been traditionally set up for some form of trading, but they are computer programmes after all. That means, they can do almost anything you want. I shall cover one interesting use.


You don't have the luxury of time to sit in front of a computer the whole day. You have gotten hold of some interesting indicators which you would like to try out. How can you study these indicators which get refreshed and repainted as the price ticks come into your charts.


MQL4, the computer language for programming EAs in the metatrader platform has a function called WindowScreenShot that allows you to capture a snapshot of your computer screen and store it as a picture file. If you capture a series of these pictures over a period of time, you would be able to have an idea of what has happened with your indicators. Better still run it off some software (eg InfranView) that allows you to string the pictures into a video.


Where can I find such an EA? Go get it from this article, "A Non-Trading EA Test Indicators".


As you can see, using an EA is not always about trading. It is about helping you do your trading better. Have fun!

Thursday, February 5, 2009

Using Expert Advisors Interactively with Your Chart for Trading

How would you like to look at a chart, draw a trendline, and enter a trade when a certain condition is met and have the EA issue the order and managed it? Well TrendMeLeaveMe by waddahattar is one of the most innovative uses of an EA that I have come across.


As simple as that, by drawing a trendline and naming the trendline "buystop" or "sellstop", the EA will monitor the prices and when it hits the trendline, a stop order will be issued with the specified TP and SL This is certainly a neat tool to put into your list of arsenal.


Or try a variation of this by dreamer3 called MTrendLine. After you have placed a pending order, draw a trendline and name it after the ticket no of the pending order you have just placed. The pending order get modified according to the trendline direction. Very similar to TrendMeLeaveMe but you get to issue the pending order first for MTrendLine whereas TrendMeLeaveMe will isssue the pending order for you. Both will modify the pending order price level according to the trendline drawn.


Hope you are intrigued by this method of doing your trades especially when you are the type the uses this kind of strategy.


One important point though. Look through the codes of these EAs, test them out, and demo them. You might find some faults with their implementations and you may need to correct them before going live with them.