Best Thread Algorithmic trading experiences

Thats a good idea, but no so good if you want to protect source code.

If I wanted to licence my API with automated systems included , how do I protect source code with Java ?.

With dot.net I am told it can be protected easily.

The Open forex platform allows to build strategies using any of the .NET languages (more than 30 total, C# and VB.NET are most popular). If you wish, you can build a strategy and place it in a separate managed DLL, and in order to protect it from decompilation, you can "obfuscate" it using some of the tools for this purpose. It is not hard to do at all, but you will technical knowledge on using Microsoft Visual Studio (and C#) to be able to work efficiently.


O D T

If you try and tell me what you are trying to achieve I can point you in the right, and probably least painful direction. The statement about source code is nonsense - have you ever tried to read anything that's come out of decompiler - it's painful.

BTW - I do this stuff for a living, so the thing about protecting source code is nonsense. If you write java and run it under a Tomcat container with a apache web server in front of it, nobody can get at any source.
 
If you try and tell me what you are trying to achieve I can point you in the right, and probably least painful direction. The statement about source code is nonsense - have you ever tried to read anything that's come out of decompiler - it's painful.

BTW - I do this stuff for a living, so the thing about protecting source code is nonsense. If you write java and run it under a Tomcat container with a apache web server in front of it, nobody can get at any source.

I want to rewrite the trading systems and have a proprietary A P I.It will be connected to a large liquidity provider .The API and trading systems will be licensed to customers/friends , and I will receive a I B fee for use of my proprietary property.

How do I protect my proprietary codes from being decompiled , yet allowing others to use my blackbox?

Metatrader can be decompiled, therefore it is not an option.

O D T
 
I want to rewrite the trading systems and have a proprietary A P I.It will be connected to a large liquidity provider .The API and trading systems will be licensed to customers/friends , and I will receive a I B fee for use of my proprietary property.

How do I protect my proprietary codes from being decompiled , yet allowing others to use my blackbox?

Metatrader can be decompiled, therefore it is not an option.

O D T

Are you making API calls to the liquidity provider to place trades only? The structure of this API is pre-defined by them and you are acting as a client to their server. You would write a web service for this. Your 'client' would send a request to make a trade and their 'server' would send a response back saying the trade have been placed for a market order or queued for a limit order.

How would your friends/customer access your trading system - web based access?

If you answer this I can tell you structurally how you would do this and protect IP for your trading strategy.
 
Are you making API calls to the liquidity provider to place trades only? The structure of this API is pre-defined by them and you are acting as a client to their server. You would write a web service for this. Your 'client' would send a request to make a trade and their 'server' would send a response back saying the trade have been placed for a market order or queued for a limit order.

How would your friends/customer access your trading system - web based access?

If you answer this I can tell you structurally how you would do this and protect IP for your trading strategy.


The API is making calls to place trades,amend s/l and t/p.

The rest of the account information can be viewed on liquiditY provider's plaform

I was thinking of a desk top based front end access to trading systems.How secure is web based?


O D T
 
The API is making calls to place trades,amend s/l and t/p.

The rest of the account information can be viewed on liquiditY provider's plaform

I was thinking of a desk top based front end access to trading systems.How secure is web based?


O D T

ok - I understand what you're trying to do now which is essentially run your own strategy and not expose this.

So you'd build it in 4 bits.

The first bit is the 'client' to the liquidity provider. All it does is send requests to the liquidity provider and handle responses from it. It has no intelligence of it's own. It is basically just a mechanism for transacting with the liquidity provider. Your liquidity provider probably has a web service exposed to do this (SOAP/REST/proprietary based upon XML). You should be able to get an SDK from them to build this client. Alternatively they may have something called a WSDL which you can fetch from their server which tells you how to build requests. Remember this is a dumb transaction mechanism.

The second bit is your data provider for market data. Your data provider will provide this in a pre-defined structure. Again this is a dumb component of your system. You will collect this data at the rate that you want and probably store it (most likely in a db).

The third and most important bit is your strategy and it's execution. This component essentially will take as input the data from your market data provider which you have stored, process it and then decide whether it will enact an aspect of a trade. If it chooses to do so, it will make an internal call to the first bit of the system (the client to the liquidity provider). If it doesn't want to do anything then it doesn't.

Can you see how you can make discrete components here that do not necessarily expose your strategy? These 3 components work within an application server technology - for instance a Tomcat or JBoss container for java. None of this is publicly exposed - it just works on your server. The only point of exposure would be your client interface to the liquidity providers server.

As far as a 'view' into your strategy/system, it's performance, etc I would personally do it as web based using SSL and with login credentials and user mgmt. It is as secure as a discrete client and is far easier to maintain that a load of clients floating around.
 
If I ever have time to develop an automated stock trading strategy/strategies,they would be based around momentum breakouts.Anybody who develops on this criteria , using sound money management, filters and positive expectancy can't go wrong.

http://www.chartpattern.com/10_golden_rules.html

What is your opinion?

That's where I started, with UK stocks. MA's some FTSE index correlation, specific signals and basically entry on a retracement. Works fine. :D
 
That's where I started, with UK stocks. MA's some FTSE index correlation, specific signals and basically entry on a retracement. Works fine. :D

U S stocks will give better results than U K stocks.The U S market calls the shots and the U K follows, same applies to stocks.

The theory is U K stocks could be heading in one direction , whereas U S indices could be heading in a opposite direction, U S open would cause U K stocks to change direction and follow the U S.

o d t
 
Rob

Your thread and quality contributions were voted top notch.

http://www.tradingawards.com/winners


Would you like to design a summary skeleton of an automated system to trade stocks.
The system will analyse the stocks with t/a , moving averages etc with breakout /trending/ranging criteria , and relating to the indexes.Your skeleton would include signals,entries,exits , money management etc

This skeleton would be handed to a programmer to write a program.

Here are hundreds of little auto systems to raise thoughts.

http://www.forexmt4.com/_MT4_Experts/

http://www.forexmt4.com/_MT4_Experts/Breakout_1.1_DayTrade_CHFM1.mq4

Here is the Zanger trading rules to be incorporated .

http://www.chartpattern.com/10_golden_rules.html
 
Your thread and quality contributions were voted top notch.

http://www.tradingawards.com/winners

Hi ODT,

This was the first thread/posts I did on this site. It's all gone downhill for me since then.

Seriously though, one of the reasons I posted this was because I can programme, so I have actually written two apps - one like you describe for stocks and another that identifies swing trading opportunities in FTSE100 stocks too.

At the time I started the thread, programming nouse was not what I was short of, trading experience was my problem.........

How you getting on?
 
Hi ODT,

This was the first thread/posts I did on this site. It's all gone downhill for me since then.

Seriously though, one of the reasons I posted this was because I can programme, so I have actually written two apps - one like you describe for stocks and another that identifies swing trading opportunities in FTSE100 stocks too.

At the time I started the thread, programming nouse was not what I was short of, trading experience was my problem.........

How you getting on?

I am doing very well in trading and automated systems development.

Could you back test a strategy on the Dow breakout system and the Dax breakout system.Do you have any data for dow and dax intraday for many years?

I started automating in 2006 and finished the first major system in December 2009.It is fully live .It is a fully automated system made up of 11 subsystems.Attached is yesterday's performance in excel.

The second major system is a semi automated system where I only pick the entries, the rest is done by semi automated expert advisors.Thats now completed and trading live.This trades the Zupconite pro with multiple instruments i.e oil,dax,dow and 7 major currency pairs.

The third major system is the Zupconite professional.The Expert came back yesterday and will go live by end of January 2010.It is made of 25 sub systems.It is fully automated.

The fourth major system of a dozen instruments and variations is on forward testing at present.It trades two currency pairs,dax and oil fully automated.It will go live in two weeks.

It took me 10,000 hours to accomplish.

Here is an example of the type of systems I develop.

http://www.trade2win.com/boards/energy/83416-best-free-oil-trading-systems.html

O D T
 

Attachments

  • automated trader.xls
    25 KB · Views: 705
I have no historic data for either dow or dax I'm afraid. My focus has been on:

FTSE100 stocks (trend following and swing trading - 2 seperate apps)
E-Mini (trend following).

I have put the FTSE stocks trend following system to bed for a while as I am undercapitalised to use it effectively but will bring this back into service at some point in the future. It's a simple system that confirms trends, uses pull-backs for entries and correlates FTSE index activity for higher probability behaviour. It covers MM allowing either Kelly or Fixed risk capital and supports trailing stops, partial position sales, etc.

The E-mini index version of the above system which is tweaked for e-mini is currently in test and will be for the next 12 months.

I think it is one of those things for me where I will develop them to include the good aspects of my discretionary trading where possible, although fundamental views now support a lot of my decision making which could not be modelled.

I have an eventual aim to do similar to you - leave the systems running to generate money but I'm probably 2-3 years off that right now. Like you said, it takes a lot of effort (and I don't just mean coding time) to get a non-curve fitted system to work well.

I'll probably attempt a break-out and reversal based system later in the year.
 
Rob

With any method you use , data is required to backtest the system.

The MACBOS system should work very well on stocks which are trending.Test it and see for yourself, on stocks relatively weak or strong.

MACBOS = Moving average cross break out system

profitable 8/30 wma cross on oil


Stop loss 50 cents stop & reverse if stop hit

30 m charts

Rule entry when 8wma crosses 30 wma + breakout of 50 pips
Example .Moving average 8 crosses moving average30 at $90.00 ,enter at +50 for longs = $90.50 and $89.50 for shorts

close on cross and change in colour of wma's(rise or fall in values)

After close of previous position +50 cents /-50 cents …reverse the position

WMA's mnust both be positive for longs and negative for shorts

close when they cross and both turn positive or negative (rise or fall in values)
 
My apps get backtested to death. It just so happens that the only historic data I have needed so far is FTSE stock and index data. I'll have a look at the MACBOS later today. :)
 
Rob

How is the automated system going?

What stop should be placed on stocks as a percentage of daily range?

What stop level should be place as a percentage of stock price?

I discovered last week that stocks can be traded using expert advisors at odl securities.I am going to give it a try next week.It can save a lot of time coding an a p i.If it works fine at O D L on mtatrader 4, I will start a separate thread on developing expert advisors to trade stocks.
 
The ATS on e-mini - too early to tell right now, ask me in about April time.......

My god, where to start to answer this question wrt to stocks.

So, the main problem for me was having a relatively static trading method built into the system which assumed that stocks were trending. What would invariably happen though, is you'd get a false positive when the stock was rangebound and the range was large enough to convince the system that a trend had initiated.

So I got around this not by having variable stop placement per stock (although stop placement is relative to the stock's value rather than absolute - I set it large at 5% max) but by smoothing out losing behaviour by having a large number of stocks traded simultaneously. Also I had a param covering maximum capital at risk which I set to 20%.

So the system handled 20 stocks, split over 10 sectors and I would pair up stocks in a sector. This gave the system sector diversity so if say mining was doing well and retail rubbish, the mining profits would offset retail losses.

How stop placement actually worked was:

a) Work out Kelly for the system and then divide by 2
b) Apply this to total value of account, not just cash and come up with capital for the trade
c) Work out 5% of current value of stock
d) Work out number of shares to buy = Capital for trade/5% of current value
e) Check it is not > Maximum Capital at Risk - if so reduce to within MCAR.
f) Buy share allocation and forget about it.

If you received signals to enter from multiple stocks, it would select the historically most profitable stock.

I thought about using some info I read from Shannon information theory for portfolio rebalancing but this is for another year probably as this gets quite involved.
 
Rob

Good news on Metatrader for automated stock trading.My expert advisors /automated systems work at O D L on Metatrader 4.

I just have to set up the experts and parameters for the stocks I want to trade, and I am done.
 
Hi,

I'm new to these boards and also new to trading. I've found lots of the information posted on the stickies really useful to compliment what I've read on technical analysis. I'm genuinely pleased to have stumbled upon this place.

Basically I came to the conclusion some time ago that people's behaviour in making trading decisions is the often the root cause of them losing money. So I thought I would build some software that took 'me' out of the equation and code up algorithms based purely on technical analysis. The system is currently working on UK stocks. Over the next 12 months I'm going to trade on paper and refine the algorithms until I find some strategies that are generally consistent. Once I'm confident with it, then I'll put it to work for real. Kind of my pension really.

The current strategies are all based around trends that occur over 2-3 days periods. This is putting me on paper in and out of the market quite frequently. I don't mind this if the 'little and often' culminates in a positive return but I get a sense that more lucrative strategies are longer term and are in the order of months.

Is this why people tend to enter positions with a view to a longer timeframe rather than day trade? I'd be interested in the reasons why people day-trade vs taking longer positions. I don't currently understand why people would choose one over another I suppose.

Also I tried to search for anything on algo trading on these forums and nothing popped up. Is what I'm doing quite marginal or is it just down to the fact that most experienced traders aren't software developers?

cheers

robster

e2a - typo in thread title - good intro from me eh................

Does your system automate the placing of orders? If so have you found a UK broker that will accept electronic orders (FIX? over Http?) for UK stocks? I can't seem to find a way of programatically placing orders and receiving fills, surely can't be that hard?

Also can anyone recomend a UK stock data provider, with perhaps a .Net or C++ API.

Cheers

Budgie
 
Mine doesn't currently although I'd be suprised if there wasn't a UK broker with either a REST or SOAP based API to use. Oildaytrader might know of some - if you PM him, he might be able to help.
 
Top