Can mechanical forex systems work?

Just thought I'd put in a quick update. Progress has slowed on system development, progress is being made on the wider system strategy though.

Spent a bit of time looking at indicators again(why???) and my conclusion is that they useless - (sorry Vrothdar - but probably even in a voting system) . They look great with hindsight - but at the far right they are useless.

I'm liking the way I can now visualise the trades in metatrader - much better than before when all I looked at were numbers. However - the setup of metatrader is proving difficult to move the theories into an EA. I want to know how prices reacted last time they did certain things - and before I could pull that easily from the SQL database - now it seems I have to try and read a chart backwards until I get what I want. Not actually tried implementing that yet - which is why progress has halted.

So Metatrader is good for me - not so good for automating what I want to do. It should be possible though (I hope). It does seem geared (as I think most of these systems are) to decisions by indicators.

So the rules are coming together - based back on the original theory of looking at prices under stress and how they react, have reacted and where they came from - however I have had to use new methods to determine this stress area and the reaction. This is a positive in many ways as a few more pieces have found their place and it has helped me develop my thinking, but it is proving a negative in others and I am no nearer actually making the whole work yet.
 
Just thought I'd put in a quick update. Progress has slowed on system development, progress is being made on the wider system strategy though.

Spent a bit of time looking at indicators again(why???) and my conclusion is that they useless - (sorry Vrothdar - but probably even in a voting system) . They look great with hindsight - but at the far right they are useless.

What exactly are you doing with indicators? I think they're generally fairly mis-represented as individually having significance for trading, while in reality most of them reflect a single aspect of what a price is doing, and need to be combined together if you're going to have any success with them.

I'm liking the way I can now visualise the trades in metatrader - much better than before when all I looked at were numbers. However - the setup of metatrader is proving difficult to move the theories into an EA. I want to know how prices reacted last time they did certain things - and before I could pull that easily from the SQL database - now it seems I have to try and read a chart backwards until I get what I want. Not actually tried implementing that yet - which is why progress has halted.

There should be a source code release of my platform this weekend. It's not in any state to use out of the box, but might be of interest if you wanted something to try adapting into your own trading and backtesting platform...

So the rules are coming together - based back on the original theory of looking at prices under stress and how they react, have reacted and where they came from - however I have had to use new methods to determine this stress area and the reaction. This is a positive in many ways as a few more pieces have found their place and it has helped me develop my thinking, but it is proving a negative in others and I am no nearer actually making the whole work yet.

Sounds good!

I'm mostly exhausted at the moment, and having to stop myself from trading by hand; it would be messy. It's frustrating seeing my auto-trader make mistakes that I'd never make by hand, and thinking how much work it's going to be to smooth them out, but not quite as frustrating as the results of letting me trade :LOL:

Also trying not to despair as the GBP plummets through the floor. Considering changing most of everything I have into AUD, hope that holds its value better... in retrospect, though, around the time I'm panicking and despairing is probably the worst point to trade, from experience!

Plan for the weekend basically involves getting enough documentation into my platfor that others can read the code, release it, then get on with restructuring the datafeeds around per-tick data.
 
Code release!

There's no instructions because it's meant as sample code, not as a working application. You get it working, well done, but... as said, it's mostly there for people building their own platforms to see how I've structured mine.
 

Attachments

  • Forex Quant-451.zip
    170.1 KB · Views: 138
Learning to hate architecture

So... all I need to change, really, is for the code to change the stake depending on the profitability of the trades to date. Simple, right?

Except, the code architecture was never designed for this. To start with, there's no recording in the code of the profitability of a single trade pair. It can be figured out from the database, but nothing really has any way of telling anything else when the whole lot completes, and certainly not of figuring out the profit.

I'm forming the conclusion it's upside down. Rather than data coming in, going to the thread for that currency pair, and then passing down the strategy, I'm thinking it should come in and go direct to the strategy. Which in turn then tracks the positions it's holding. A little more complicated, but better maps what I really mean.

'course, that's a lot of rewriting.

Joy.

Rant finished.
 
I'm forming the conclusion it's upside down. Rather than data coming in, going to the thread for that currency pair, and then passing down the strategy, I'm thinking it should come in and go direct to the strategy. Which in turn then tracks the positions it's holding.

Yes. The strategy should receive events for each instrument and potentially position it is interested in and those events should trigger action on the instrument(s). However the events fed to the strategy should be high level events (ie entry signal, exit signal). The strategy can then take decisions on position sizing etc. Production of the signals (eg for simplicity cross of a signal line, or timer firing) should be done by lower level event handlers associated with each instrument and driven by raw time series events coming upstream.
 
Hell Micoll

Could you tell me a bit about auto-trader? Is it alright to use the software?
Could you drop me a link where can I find the oftware, please?

Thank you,
Arek

What exactly are you doing with indicators? I think they're generally fairly mis-represented as individually having significance for trading, while in reality most of them reflect a single aspect of what a price is doing, and need to be combined together if you're going to have any success with them.



There should be a source code release of my platform this weekend. It's not in any state to use out of the box, but might be of interest if you wanted something to try adapting into your own trading and backtesting platform...



Sounds good!

I'm mostly exhausted at the moment, and having to stop myself from trading by hand; it would be messy. It's frustrating seeing my auto-trader make mistakes that I'd never make by hand, and thinking how much work it's going to be to smooth them out, but not quite as frustrating as the results of letting me trade :LOL:

Also trying not to despair as the GBP plummets through the floor. Considering changing most of everything I have into AUD, hope that holds its value better... in retrospect, though, around the time I'm panicking and despairing is probably the worst point to trade, from experience!

Plan for the weekend basically involves getting enough documentation into my platfor that others can read the code, release it, then get on with restructuring the datafeeds around per-tick data.
 
This post: http://www.trade2win.com/boards/for...hanical-forex-systems-work-19.html#post485016

has most of the working code in it. However, I don't have anything that works without an understanding of the markets, or is stable enough to use as is. Your best bet is probably to get a copy of NinjaTrader and look for pre-made strategies for that. Amazon.com: Mechanical Trading Systems: Pairing Trader Psychology with Technical Analysis (Wiley Trading): Richard L. Weissman: Books is a really good book to start looking at to understand how this all works.

I'm aware it can be frustratingly slow to have to learn all of this, but in the long run it will help ensure you stand a better chance of things not going horribly wrong.
 
So... all I need to change, really, is for the code to change the stake depending on the profitability of the trades to date. Simple, right?

Except, the code architecture was never designed for this. To start with, there's no recording in the code of the profitability of a single trade pair. It can be figured out from the database, but nothing really has any way of telling anything else when the whole lot completes, and certainly not of figuring out the profit.

I'm forming the conclusion it's upside down. Rather than data coming in, going to the thread for that currency pair, and then passing down the strategy, I'm thinking it should come in and go direct to the strategy. Which in turn then tracks the positions it's holding. A little more complicated, but better maps what I really mean.

'course, that's a lot of rewriting.

Joy.

Rant finished.

Worth looking up the Kelly Criterion and variants of this to help your money management. This is an approach to sizing your bets to maximise your long-term bankroll.
 
OK I thought I'd resurrect this thread. I THINK I have finally completed my first proper EA. Anyone who is thinking about auto trading should note when this thread started and add a year of work on top of that which would get a reasonable expectation of what I believe is necessary to produce a winning EA.

So I guess the question is - do I now have a profitable EA?

Answer - Not sure.


As I've had a glass of wine or two I thought it would be a good idea to share my forward testing. Unfortunately I can't backtest the system for many and varied reasons so I have to run this forward for a while until I go live.

I have a new job to start on Monday so development will stall for now, and as I have taken his idea about as far as I can further work is going to move to my other 2 ideas. So this is now sink or swim for this one, but even if it fails then I have a lot to build on.

Todays results are below and I will post regular updates if people are interested. I will also post if it all goes tits up too just to let you know that it's all over for this baby.

I would say that the EA is very conservative in managing the trade, and that needs to be improved as I think it could hold and build positions as the trades are all basically contrarian positions where the potential for large gains lie. However getting an EA to do that is beyond me at the moment.

Anyway good first day.
 

Attachments

  • Statement.htm
    15 KB · Views: 281
OK I thought I'd resurrect this thread. I THINK I have finally completed my first proper EA. Anyone who is thinking about auto trading should note when this thread started and add a year of work on top of that which would get a reasonable expectation of what I believe is necessary to produce a winning EA.

Holy thread necromancy, Batman! Seriously though, good to have you back. Was just thinking about you and Vrothdar recently, actually! Just to add to your comment on how long... one of the things people tell me when I talk about automated trading is "If it was that easy, everyone would be doing it". I've got to say, I'd never call this easy; automated trading is a different way of trading, not an easier or harder way. I don't know what the skill set of the others is, but for example I'm a published researcher (currently writing up my PhD thesis part time).

Looking positive there! The market's really stabilised this week, I think. My own system (this week's results attached) has made 3.73% before margin, which means closer to 30-40% after margin. Fairly nice going, IMHO.
 

Attachments

  • trades_20081127_2101.xls
    19 KB · Views: 209
I did notice your thread pop up recently and was glad to see I'm not the only one too stubborn to give up. Like the trades - hows the overall platform? I'm liking MT4 but also cursing it as I have no Database to be able to utilise from it.
 
I did notice your thread pop up recently and was glad to see I'm not the only one too stubborn to give up. Like the trades - hows the overall platform? I'm liking MT4 but also cursing it as I have no Database to be able to utilise from it.

I'm merging my stuff into JBooktrader, at least for the pure automated trader, in order to get more assistance with development. They've really helped me firm up the database design, for example (and finalising database support there is my task for this weekend). My own platform is rock solid, but is going to get a bit of a re-think. I'm looking at guided trading, using a human to tweak some of the variables while an auto-trader handles the heavy lifting, right now....
 
Glad to hear it. I think I am OK for the moment with MT4 - but some of my ideas just won't work without a DB. However they can wait for now. I also have the basic Human interaction sorted such as pre-warning of volatility on news which should be enough for now.

If this does work however...
 
Glad to hear it. I think I am OK for the moment with MT4 - but some of my ideas just won't work without a DB. However they can wait for now. I also have the basic Human interaction sorted such as pre-warning of volatility on news which should be enough for now.

If this does work however...

Do keep an eye on JBookTrader, it is being fairly actively developed, and having the complete source to your platform rocks IMHO.
 
Tis bookmarked. Only require a move to another language ( although tbh I have written in java many many moons ago). Any sign of Vrothdar and how his ideas were working out?
 
Thanks zupcon. It really could be of use. Was starting to think of dumping info to a text file, finding some sort of auto import, then dumping from SQL to txt and having mt4 read these in. This may be easier!

Can't rep you anymore!
 
Thanks zupcon. It really could be of use. Was starting to think of dumping info to a text file, finding some sort of auto import, then dumping from SQL to txt and having mt4 read these in. This may be easier!

Can't rep you anymore!

Recommended him for ya :)
 
Ta.

OK - All trades have closed so I feel that it has come to a nice natural break to close it down for a Friday as I'm not a big fan of keeping trades open over the weekend unless they are longer timescale ones and there don't seem to be any of those developing.

Today wasn't up to to too much. It did fine - but not in the order of yesterday. however it is 10% up over 2 days so I can't complain. the reason for todays lack of performance was the risk/reward strategy.

You will notice 3 trades which all closed out for next to nothing - all of these went much further. I can see a reason on at least one of them where a re-adjustment of the reward it is looking for could have occurred.

So there is the first job for the weekend, and I will then run in comparison to this version to see what difference it could make.

It also passed on a few good trades. This was due to one of the filters I recently introduced. The filter is important - but my implementation of it is crude. So I need to look at the trades it is passing up on this and see how I can make it a little more accurate (read complex!).

Have a good weekend all.
 

Attachments

  • Statement.htm
    18.8 KB · Views: 273
Top