Tested EURUSD on Forex Tester

I thought I would share my experiences with the forex tester. I decided to test the EURUSD H4 for 2010 and compare my results to the first time I tested this pair using MT4 and MooDB. The testing was a lot quicker using the forex tester because I did not have to manually enter trades into the database for every order. I just clicked on the chart and placed my orders into the tester. It was not as quick as I initially expected because position size needed to be calculated for each position using www.forexcalc.com, however it was still quite a bit quicker than my older method of testing.

I achieved a better result the second time, I suspect because my trading skills are improving.  Here are the results using MooDB and 3% dynamic risk:

Profit Factor: 8.81
Account Growth: 55%

EURUSD Results on Moo DB

Using forex tester, the results are measured per order rather than per trade. However a rough comparison can be made:

Profit Factor: 4.47
Account Growth: 71%

EURUSD Results on Forex Tester

I did test to the end of the year with Forex Tester. Overall, a nice tool – for my next test I will do two pairs at the same time to speed up the testing. The only thing I don’t like about it is you can’t group results together and analyse them as a group as I can with MooDB. So for analysis purposes Moo DB is much better. But for speed, and to get an idea for how a system may perform in the real world it’s a great tool.

I will be using Forex Tester for all my future Phase 2 testing and using Moo DB for phase 3 and live trading.

Share

Moo DB Video Tour (Open to all)

I have just completed a tour of the trading database. I have managed to produce it without giving away any Max Standard information. I sound a little depressed in the video, maybe because I recorded it early on a Sunday morning, lol. I also think the microphone was a little too close. My video production skills are not too hot, but I hope the information contained therein is useful to you.

Video download here (size: 33.5MB wmv format).

I have already had some very useful feedback from the video targeted to Max Standard people, and I would encourage you to provide suggestions in how the database can be improved. What information have I missed? What reports have been missed? Any extra charts, features? I will ultimately release this database as an installable package so any information you provide could be useful to you too.

Enjoy.

Share

Am I going to be able to do this for real?

I was sat in my office today after a morning’s skiing ;-) and I was wondering if I would be able to fit my trading into my current work schedule. I have taken a lot of trades in my database now, over 160 and I thought I would write a query on the data to find out how many orders are placed each day. Here are the results:

Frequency of Numbers of orders per day

What this chart shows is that only 35  trading days had 0 orders placed, just under 40 had 1 order placed, etc. Very few had more than 10 orders in one day. Here is another view of the data:

Frequency of Numbers of orders per day pie

This shows me that my trading days are quite busy and that there could be a potential for conflict between my trading and my schedule. This is something I’m going to have to watch closely and will adjust so that the right balance is struck. Only about a fifth of my trading days will have 0 orders placed. In case you’re wondering I have eliminated weekends and public holidays from the data using a calendar table.

If you can’t generate this kind of information from your own trading data then I heartily encourage you to either get very intimate with spreadsheet formulae, or learn a database system. There are plenty of good open source databases on the internet that you can download and install easily and there’s plenty of support and free SQL tutorials on the internet. All it requires is some hard work and study, and you should be able to ask any questions from your trading data that you like. To generate the data for the charts above only took me fifteen minutes with a simple query like this:

Click to enlarge

I would recommend something like SQL Server Express for your windows desktop or  MySQL in a linux virtual machine or as a WAMP system on windows. I personally use SQL Server 2008 R2 running on its on Windows Server 2008 R2 virtual machine, but then I tend to go over the top with technology.

Share

Examining discipline

I have just rewritten the front-end to my database from scratch because, frankly it wasn’t very elegant. I’ve called this version MooDB v2. The database and it’s associated data access code is quite tight and elegant (in my humble opinion), but the web code was ugly, so it has been rewritten and I’m much happier with it now. I’m getting to know ASP.NET and C# pretty well now and have solved some quite tricky problems. Here’s a sneeky peek at the front screen in Google Chrome:

MooDB v2. Do you like the colours?

Anyway, I was looking at my database today just playing around with the parameters. One of the things I record for a trade is “Execution Grade” – this came from Dr. Alexander Elder and is a trade rating, but I am not following the exact same rules as Dr. Elder. I have a rating for each trade from 1 to 5 with 1 being an excellent trade with full discipline applied down to 5 which could be called whimsical. I decided to look at my Grade 1 trades, and here’s how the equity curve looks:

Grade 1 equity curve (44 trades)

If I look at the Grade 4 and 5 trades – i.e. the ones I regret taking because I was not disciplined or I didn’t follow the rules precisely, the equity curve looks like this:

Grade 4 equity curve (13 trades)

Lesson

There’s a real lesson to be learned here. If the setups are followed according to the rules and trades are not forced, with discipline, then a lot of bad trades can be eliminated. I’ve just proved that with my own trading and my own data.

Share

Moo DB now does charts

I’ve worked out how to produce charts from my database, MooDB in ASP.NET. I will now start working on producing all kinds of charts from the database which means I can interpret my trading results quicker as they will be visual. I don’t have to copy and paste from SQL Server into Excel any more,  it will all be done automatically for me. Today I managed to create an equity curve on dynamic data. I can choose the data I want to view like so:

Criteria I can currently choose from

MooDB then produces an aggregated view of the data and an equity curve automatically when the Submit button is pressed. Here’s what the equity curve looks like based on the criteria selected above.

Dynamic Equity Curve produced from MooDB (click to enlarge)

I can look at the equity curve in any way I like at the click of a mouse, which is quite cool. :-) . I want to work out how to put moving averages on it – I’ll do that this week. Here’s an equity curve with the losers removed:

Equity curve with losers removed (click to enlarge)

Here’s one with the winners removed:

Equity curve with winners removed (click to enlarge)

As all the data is presented in a web browser I can use MooDB from any computer on any operating system that is connected to the web server. The web server is not accessible from the internet at the moment, so it can only be accessed at home – however I may open it up at some point so I can query it from anywhere with an internet connection once I am comfortable about the security aspects.

A bit geeky, but I’m well pleased with it.

Share

Moo DB Update

I’ve made some significant changes to MooDB. The reports are done and looking great and the user interface is now finished. I’m pleased about this because my first stage of backtesting the MAX on the H4 is also nearly finished as I’ve tested 650 trades so far. Once I’ve done 1000 trades I will move to the strategy tester and record every trade from the strategy tester into Moo DB for analysis. Win rate is settling around 84% in the back tests, but I expect this to drop when using the strategy tester as I will not have the benefit of hindsight. This will be an interesting experience and I’ll let you all know how it goes here. Expect an update on that towards the end of October 2010.
My entry order stats screen looks like this:

Entry order stats (test data)

Trade stats drilldown screen (fake data)

The documentation for the new version of Moo DB is here. If you want the source code for the database let me know and I’ll try and script it up. I can’t release the web code yet though, and I may never do.

Share

Building trade reports

I’m starting to build some trade reports to analyse my trades so that I can find any weak areas and use the information to improve my trading skills. I would like to request some help in this area, if I may. What trading reports do you use? What is the most important information to report on from your trading data? Here’s how my reports pages are starting to look:

Summary stats (click to enlarge)

Scale-in stats (click to enlarge)

Have I captured everything? As you can see from the menu, I have other reports that will allow me to see the data from different points of view. I would love to hear your feedback on this in the comments or the Contact page above. Thanks.

Share

MooDB database design

The back-end of the MooDB system is SQL Server 2008 R2 as mentioned in a previous post. I thought I’d post up the design here so that it may help others trying to do a similar thing. If you have any criticisms or improvements, please let me know in the comments or the Contact page.

Schema

MooDB Schema (click to enlarge)

Detailed design

The detailed design document is here (PDF format). Right click the link and choose Save As…

Please let me know your thoughts.

Share

I’m building my own trading database

I thought I’d start a series of posts on how to track your trades. As I work in IT, I thought I’d leverage those skills and build myself a proper database so that I have all the information I need on my trades at my fingertips. I am also creating a paper trading journal in a moleskine notebook and will be printing out the charts as I enter and when I exit along with my thoughts before and during the trade.

I will be using this to record my thoughts during the trades

Tools

  • The database engine is Microsoft SQL Server 2008 R2.
  • I am developing the database in Microsoft Visual Web Developer 2010
  • I am using ASP.NET 4.0 and some code in C#

The database is accessed via a web browser to a virtual web server I have running on my VMware ESXi host. The virtual web server connects to a SQL Server 2008 R2 back-end virtual database server. VMware ESX is used in data centers, but I thought I’d have one at home as it allows you to build many computers and have them virtualised all in one computer. I currently have over ten virtual servers with six running at any one time, and I also have my main trading machine virtualised on VMware so that it does not get contaminated with anything. The only thing installed in the Trader Workstation (as I call it) is MT4, antivirus and FireFox. Nothing else. The other VMs I have are: firewall, file server, backup server, DNS/DHCP server, web server, database server,  and some test ones. Anyway, I digress and can elaborate on these in another post if anyone’s interested.

Screenshots

Version 1.0 of MooDB looks like this on the front screen:

Home page for the trading database

New Trade screen (where new trades are entered):

Enter new trades on this screen

Add Order screen (add scale-ins, scale-outs and exits here):

Add Order screen for Scale-ins, scale-outs and exits

Trade Info screen (browse trades and edit):

Browse and Edit trades on this screen

By the way none of the data you see on those screens is real – it’s just test data. The real “live” database has the real data in it. I have several databases that I point the webserver to when I’m developing so that I don’t spoil the main database. What you’re seeing there is the development version.

I’ve never written in ASP.NET before or done any web development whatsoever so I’m quite pleased with what I’ve come up with. It’s not perfect because I don’t have time to make it so and I’m not a highly skilled web developer, but it makes data entry into the SQL Server database much quicker than typing database code into a stored procedure (and slightly nicer). For the more technical among you I will give a tour of the database design in a future post in case you want to set something up similar yourself.

Reports

I am also building a Reporting Server that will report on the data that has been entered. The system I’ve just shown you is a data entry platform, not an analytic one. The report server will have trade analysis in it and will show things like avg win., avg. loss, sharpe ratio, win rates, etc. so that I can fine tune my trades. I intend the reporting database to be able to slice and dice my trading information in any way I want, so I could ask questions like:

  • Show me the average win rate for my long trades
  • Show me the sharpe ratio for trades on the H4 timeframe
  • Show me the best signals on all timeframes
  • Show me the win rate for trades taken on a friday on the five-minute time frame
  • etc

There is no limit to the questions I can ask, if I record all the information I need at the start of each trade.

I would be very interested to hear feedback from any of you that have done something like this yourself – perhaps we can work together to enhance the design? Sharing and building on each other’s designs is a great way to accelerate a product.

Share