# 'Automated' trading platform



## damok (13 November 2008)

the title is a little misleading, but stick with me whilst I outline what I'm currently working on.

Basically I use a Mac, and am unhappy about the steps I need to do to conduct a trade. 
1) Download data (StockXLoader)
2) Analyse data (ProTAGold)
3) Input into spreadsheet to calculate risk management, stops etc.
4) Trade on online platform (currently IG, but swapping to orient finance in UAE as I'm currently a non-resident and have an aversion to paying taxes)

Basically I think the first three steps should be easier and automated as much as possible.  Plus I am looking at switching over to Linux, so I want a web based solution so that wherever I am as long as I have an internet connection regardless if it's on my laptop or using an internet cafe, I can trade.

So here is what I'm doing.  I'm building a PHP/MySQL solution available through a web browser.  It will download end of day data, then determine what are potential trades and calculate how many shares I can buy according to how much capital I have and what are my allowable levels of risk/loss.  It will also summarise current position, give revised stop loss figures and sell signals.  I also plan to implement very limited charting, basically candlestick charts... anything else I think is better handled by Yahoo Finance or something like that.  The main principle is that it will cut down on my unnecessary trading time, and make it truly portable.  It will be very minimalistic, and therefor should be very quick to load.

Thankfully my trading system is very simple, so it shouldn't be too hard to code.  Theoretically any mathematically based trading system could be used, it would just be matter of figuring out how to do it in PHP.

So that's the Summer project...
Has anyone done something like this before?
Are there already online systems that do this that I could base it on?
When I'm nearing completion, would anyone be interested in trying out this platform?
Do you think it could potentially have a commercial application (could I sell it to people)?

Let me know what you think..

Damo


----------



## Temjin (13 November 2008)

damok said:


> So that's the Summer project...
> Has anyone done something like this before?
> Are there already online systems that do this that I could base it on?
> When I'm nearing completion, would anyone be interested in trying out this platform?
> ...




There are a quite a number of commercial trading softwares that allow fully automated trading and full integrations with various brokers. 

It's alot to list here, but I will give you a link to another forum that specifically goes on automated trading.

http://www.elitetrader.com/vb/forumdisplay.php?forumid=48

For your information, I will be developing my system on OpenQuant. NinjaTrader may be a good option but have yet to look further. They can basically do everything you have mentioned there and allow full customisation. Quite a few people tend to host their software on a VPN via a hire dedicated service or shared to allow portability and reducing the risk of hardware/network failures.


----------



## xice (14 November 2008)

damok
I have already something similar, its sort of a work in progress.
I'm still not sure what sort of analysis I want to run, and how I want to use it. 
My main aim is to first do the analysis I want in a spreadsheet, and then make that workflow work in php.

I am probably in a similar scenario, its just doing it in my spare time, and hope to have something together by the end of 09. I want everything in just 1 window, with the only other thing being a comsec window.


I don't see why you want to make the charts yourself, I'd worry more about doing the analysis you want, and not trying to recreate yahoo finance.

The doing it in PHP wouldn't be the problem, getting the data is through.
If the php code is physically in austraila, getting each data point (price/last/bid etc) has a latency of 100-200ms. I found that with minimal code, calling the prices were causing non-trivial delays. Running that same code in America was much faster, due to the closer proximity.. Just something to consider.

Don't worry about starting with an online system, just start with simple PHP files and mySQL tables, and create the functionality you want.

Question, why do you even care about selling it now? This is a common theme on the internet, shouldn't you just be happy and USE it, instead of sell.


----------



## oldpos (23 November 2008)

Many of us have thought along these lines.  I am not too hot on programming so currently I think that for me a good concise spreadsheet would be the way I will go.  That way I am able to easily adopt it to my trading plan, easy to make changes to columns, rows etc and use conditional formatting to hilite areas for special considerations.  I have started with a download from this site.  

http://www.diytraders.com/content/view/26/39/

I suppose the important thing is to sketch what is required, then review it to make it as simple as possible, format then display.


----------



## marklar (23 November 2008)

_OK, I'm going to put my geek hat on for a bit..._

First of all, get your algorithms, mathematics and logic right.  Don't worry about programming languages, drawing charts, latency, hosting, platforms or any of that stuff just yet.  If you can't express it on paper/whyteboard then you are wasting your time (and money).

Once you know what you are trying to achieve, pick something to prototype it in.  Excel is a common place to start, not necessarily a good place to start, but a common one.  You don't have to implement the entire system, but use it to check parts of your algorithms, mathematics and logic.  If your logic is wrong, fix it now; if this is all too hard, abandon it now before it cost you anything.

Once your happy with your system, go find the tools to build it.  Things like PHP are good for quick & dirty but they're a pain to maintain and slow because they're interpreted; MySQL is technologically inferior to just about any other database, but if you know it or can learn it easily then go for it.  Build it in a VM (ie. don't worry about performance just yet) and re-check your logic.  Compare it with your prototype and make sure you get the same results. 

Once it's built and working you can worry about how to tune it.  Change database backends, rewrite in C, fiddle with all the nerd knobs you can find to make it sing.  How fast does it have to run?

Then work out where to host it.  Dedicated PC? Faster internet pipe? How much latency can you accept? How will you measure it? Do you even understand how to minimise latency? Does it matter? How much can you afford per month to keep it 'close' to your brokers' trading platform?

Once all this is done you can then think about making it pretty, after all, are you trying to make money or impress your friends?

_Geek hat off, please resume your scheduled program..._

m.


----------



## Page (12 February 2009)

i heard so much about automated trading system especially fapturbo. Many people are curious to know how far fapturbo is correct. Personally, i have not tried automated trading system but sooner i will let you know their performance. However, sometime I think am I doing right by using such techniques and i am sure it will kill my trading skills soon.


----------



## traderc (22 February 2009)

Page said:


> i heard so much about automated trading system especially fapturbo. Many people are curious to know how far fapturbo is correct. Personally, i have not tried automated trading system but sooner i will let you know their performance. However, sometime I think am I doing right by using such techniques and i am sure it will kill my trading skills soon.




Another way of automating trading that might be worth looking into is something like a combination of Metastock (or your flavour of trading platform) and something like MacroExpress or AutoIT.

They are visual macro writing programs for Windows that allow you to "program" a computer by "recording" actions and mouse clicks, similar to recording a tutorial but instead of only recording it, it allows you to play back the recording, which you could probably get to fire off when a trade signal is reached; kind of like a big Excel Macro that will run as an overlay for Windows really.

Anyway, as marklay mentioned, and I agree with him completely, there are a lot of variables to consider and as they say, plenty of ways to skin a cat.

Getting a fast enough pipe to day-trade effectively would probably be the most costly thing in the equation if that's what you wish to do with the automated system but if you're swing trading or holding positions for trend movements 5 minutes isn't really going to make a difference in placing a trade?

Also, as marklay said, you'd really want to make sure your system has as fewer bugs as possible in it as it's going to cost you a packet in real dollarubes if you haven't got the bugs ironed out of through a LOT of backtesting (or at least stops that work anyway).

Regards,


Christian


----------

