Archive for the 'Auto Execution' Category

HiveTrader

Posted in Auto Execution, FXEngines, Forex Systems, Forex Tester, HiveTrader on August 13th, 2007

There’s a website that I’ve just recently come across which offers an excellent way for forex traders to automate their strategies.

In a similar style to Mark’s Thinking Stuff Forex trading software where the user is given a NON-programming approach to automating their strategy this web site similarly provides the ability for the user to test a myriad of trading strategies and to then trade those strategies LIVE via your FXCM account.

What made this web site even more compelling was the fact that all this (so far) is offered FREELY!!

Basically here’s how it works:
1. First you start at the SIGNAL end by compiling your entry and exit signals on selected time frames (you’re unfortunately only limited to the signals offered). If you’ve created some exit signals be sure to create a “Contextual Exit” otherwise your exit signals will not be used when you formulate your system.
2. When you’re happy that you’ve got your signals listed, jump over to SYSTEMS and select which currency pair you’d like to test your singals on, which direction (either Long or Short), what the order type should be once your entry signals are satisfied, and at what times you would want your system to run on (i.e. ALL, or just during the London session, or NY session… etc). Lastly, select your exit strategy.
3. Then move over to TESTS and create a new test. Select the strategy you want to test and the date range of your backtest and hit start.
4. Wait a few minutes and you’ll soon have your results sent to your email address.

Easy, huh?

Okay, so what are the downsides of this service?

Well, I think one issue that some people might have is that your systems are public. I suppose this is a negative and a positive, because on the one hand you can look at other people’s systems and tweak them to suit your own trading personality, yet on the other hand YOUR edge may begin to lose its profitability if others start using it.

Another problem is that you’re only limited to 100 signals, systems and tests per account. This may not sound like much, but considering that you can only test one currency in one direction at a time 8 tests can be chewed up quite easily on one system if the user tests both LONG and SHORT on each of the four majors.

Lastly, I’d prefer if I could access the test results better – maybe an export to CSV file or something of that nature. Ideally I’d like to see something whereby we have a table that has at least the following: ENTRY DATE & TIME, ENTRY PRICE, INITIAL STOP LOSS (IF ANY), EXIT DATE & TIME, EXIT PRICE, MAE, MFE, P/L (IN PIPS).

Anyway, HiveTrader is definitely worth a look and I would encourage you to go over and have a little play.

(If you like you can include my username currsec in the referrer ID when you register your account – I don’t make anything by you doing so.)

CMS API Part 4: Wealth-Lab Dilemma – Is This The End?

Posted in Auto Execution, Forex Trading on April 12th, 2006

Well it seems I’ve hit my first brick wall with automating a system on Wealth-Lab.

Just as I had finished coding up the CancelOrder procedure had I soon discovered that Wealth-Lab does not offer the functionality of flushing its alerts window.

What’s so important about that? I hear you ask.

You know how we created the alerts so that it would accurately showed us how much of a particular order was attributed to closing an already existing position and how much of the other portion was to initiate a new position… well, it seems that if we ever wanted to cancel an order that was split like this the side that was not cancelled would still be shown as active. Allow me to illustrate this by way of an example:

Let’s say we have already bought 5 GBPUSD contracts (therefore we are LONG 5 GBPUSD) and these 5 contracts do not have an attached stop loss order. Now let’s assume that we place an order to SELL 9 GBPUSD contracts. If we open Wealth-Lab and login to our CMS demo brokerage account our alerts screen will show something like this:

Sell 5 GBPUSD
Short 4 GBPUSD

Which is correct.

However, it we click on the cancel button for any one of these two orders the ENTIRE order will be cancelled, even though the alerts window will show one as being active!

eg. If we were to cancel the first order…

Cancelled 5 GBPUSD
Short 4 GBPUSD

Are there any workarounds?

At the moment this is what I’m trying to figure out, BUT if we think about this carefully do we really want “workarouds”? I mean, I don’t know about you, but I’d prefer to have NO workarounds at all if I want to eventually put real money on the line.

However, if we are to integrate this into Wealth-Lab we would need to change the alerts window so that each line reflects one order, continuing with our example above our order to sell 9 GBPUSD’s would look like this in the alert window:

Short 9 GBPUSD

Again though I think this is where things will begin to get messy as we simply cannot refesh the alerts window in Wealth-Lab and as Wealth-Lab needs to be linked to a portfolio if we start amassing too many entry orders (even though they may not be entry orders at all in CMS) it will begin to bog down the entire process.

Could this be the end of the road?

Possibly, and if it is it was still a worthwhile experience.

Amendments to Previous VC# Code in Part 3

Posted in Auto Execution, Forex Trading on April 10th, 2006

If you’ve been following the CMS API auto-trading articles the VC# code in the previous article was incorrect.

If you conducted some testing you would have noticed that if you placed multiple orders that tallied greater than its open position quantity you would have seen an output that would have been wrong.

As an example, if you were long 1 mini USDJPY position (with NO attached stop loss orders) and placed 3 individual 1 mini stop sell orders on the USDJPY you would have seen on the alerts something to the effect of:

Sell 1 USDJPY
Short 2 USDJPY

This is incorrect as we need to return each individual order, such as:

Sell 1 USDJPY
Short 1 USDJPY
Short 1 USDJPY

With this new code it seems to have solved this problem.

If you’ve been following and have used the previous code download the latest one here. If you’ve used the code in the part 3 article after this date then you don’t need to worry you would have downloaded the correct version.

Adding Our First Alerts To Wealth-Lab (Part 3)

Posted in Auto Execution, Forex Trading on April 5th, 2006

This article is Part 3 of a forex auto-trading series I am currently undertaking. If you haven’t already done so you want to read through the other two parts before continuing on.

Over the last couple of days I’ve been racking my brain over how best to have WLD read open orders.

Think about this for a second:

If I am long 3 mini lots on the EURUSD, and I place a stop and reverse order to sell 6 minis on the EURUSD how should this order register on WLD?

Now before you contemplate an answer remember than CMS and WLD have two different order types. CMS has only buy and sell, Wealth-Lab on the other hand has Buy, Sell, Cover and Short – therefore our alerts are going to need to be a little more precise.

In answer to my question above though, in Wealth-Lab we will need to show 3 lots as being of the order type “Sell” and 3 lots as being of the type “Short” – as the first lot will see the closing out of an already existing position, whereas the next lot will be the opening of a new short position.

Okay, several other things I noticed about CMS’s order types is that they signal whether a position is attached to an already open position. In other words, if you attach a stop or limit order to a trade these stop and limit orders will be different to a limit or stop order that isn’t attached to another order.

CMS do this by simply denoting attached orders as “L” (limit) or “S” (stop) and unattached orders as “EL” (entry limit) or “ES” (entry stop).

This does help as we now know that every order that is denoted by an L or an S is one that is attached to an already existing position, therefore, it can only be a “Sell” order type or a “Cover” order type.

While this seems so much easier in print it ended up being quite a pain trying to get it down into code for orders that are unattached as we still needed to find out whether there were any orders that were open and didn’t have attached orders.

Anyway, here is the new code that you should paste over your existing VC# CMSAPI project.

Don’t forget to change the username and password fields in the script to your demo account’s username and password.

Hit F6 (or Build > Build Solution) and before you open up Wealth-Lab open up your VT platform and login to your demo account and place a few trades (otherwise nothing will register in your alerts screen in WLD).

Enter into a currency at market and then place a stop order for a lesser, or more quantity than the amount you just went at market with.

Try this for other currencies before opening up Wealth-Lab, maybe even place a few stop and limit entry orders with attached stops/limits.

Write down what Wealth-Lab will need to show – don’t forget that WLD uses Buy, Sell, Short and Cover so you may really need to nut out what will happen if you’ve put some complex orders on.

You should notice that when you open WLD and login to your broker that the orders display as your answers should.

You may also notice that attached stop and limit orders to entry stop and limit orders aren’t shown. There’s a good reason for this: these orders aren’t active – they’re an If-Done type of order, meaning that they will only become active if the entry stop or limit order turns into an open position.

Why Are You Doing This Autotrade Thing?

Posted in Auto Execution, Forex Trading on April 2nd, 2006

I thank all of those who have participated in adding comments to the posts on auto-trading and I look forward to further insights and discussions from all of you as we continue down this path.

What I’d like to do is to just explain myself a little further on why I am undertaking this journey as well as provide some disclaimers to those who are following along.

Firstly, I undertook this task as an adventure.

I have used Wealth Lab Developer for several years and have used the product fairly extensively during those three years. As I feel I know the Wealth Lab platform quite well I thought I could undertake the task of creating a forex broker API to see if I could auto-trade – as this functionality exists (I suppose my attitude is similar to British climber George Mallory’s when he climbed Mount Everest in 1924, when asked why he did it, he responded with, “Because it’s there”) .

So, just as George did, I too am embarking on my own Mount Everest: auto-trading the forex market through WLD… because it’s there.

While I don’t doubt that other platforms, such as MetaTrader, can provide auto-trading functionality I thought I’d rather spend my time learning VB.NET (or VC#) which can help broaden my programming horizons that may possibility add further functionality to WLD or to other things in general.

Which leads into my disclaimer.

I haven’t coded any VB.NET (or VC#) stuff EVER, therefore, if we ever do get to the end of this adventure you should check the code THOROUGHLY before even contemplating using it on a real account.

I know for myself personally that I’ll be stringently testing any system I wish auto-traded for at LEAST 1 month on a demo account before moving it to a real account, and even then I would still be a little skeptical on the process.

So please understand this “adventure” could just be that – an adventure. However I do want to know if I can do this, and what problems or benefits such an adventure can bring to my forex trading skills.

All in all I hope we all learn something through the experience.

I wish everyone the best with their forex trading success.