Can mechanical forex systems work?

While I'm thinking about it... do you ever find yourself staring at your system going "Why won't you trade?" when it seems to be missing obvious money? I mean, I know I'm just seeing artefacts of the statistics (I'll miss some winning trades, but hopefully less than I miss losing trades), but it's kinda frustrating...



Yes I spent a long time getting to grips with that problem. I was even going as far as second guessing the system and opening trades that I thought were going to happen(n) At one point I actually had to remove the indicators from the screen to stop me doing that.

I don't seem to have that problem at the moment though - I was expecting about 1-2 trades a day with a few days with more than that. The past few days have been those.

Didn't have to wait long and I think I've found the issue with opening trades.

Anyway losing streak ended, although I only had £5 a pip on it.

So 15 trades, 3 losses +150 pips.


FYI the losses were
today
11.52 USD/CHF sell 10052
11.52 EUR/CHF sell 16014

yesterday

13:15 USD/CHF sell 10074

The trade that just hapened was a buy of USD/CHF which only increased the nerves.

So far in the last 2 days it's traded on 5 pairs, 5 long, 10 short .
 
Yes I spent a long time getting to grips with that problem. I was even going as far as second guessing the system and opening trades that I thought were going to happen(n) At one point I actually had to remove the indicators from the screen to stop me doing that.

Having just seen the market pause briefly before run straight past my entry point without even slowing down, I'm currently rather pleased with my system :)

I don't seem to have that problem at the moment though - I was expecting about 1-2 trades a day with a few days with more than that. The past few days have been those.

Didn't have to wait long and I think I've found the issue with opening trades.

Anyway losing streak ended, although I only had £5 a pip on it.

So 15 trades, 3 losses +150 pips.

Very nice! My system is heavily USD-centric, so... well, the last couple of days have been "interesting". Still having issues with exit conditions, blah.

FYI the losses were
today
11.52 USD/CHF sell 10052
11.52 EUR/CHF sell 16014

yesterday

13:15 USD/CHF sell 10074

The trade that just hapened was a buy of USD/CHF which only increased the nerves.

So far in the last 2 days it's traded on 5 pairs, 5 long, 10 short .

Interesting that you're trading CHF crosses. I tried USD/CHF and EUR/CHF with my system, and... well, fairly much it broke so hard I had to fetch the pieces from next door's garden. *pause* Y'know, does occur maybe I should turn my system upside down and see if that works on CHF crosses. I'm trading GBP/USD and USD/CAD solely at this point, although EUR/AUD also showed promise...
 
Having just seen the market pause briefly before run straight past my entry point without even slowing down, I'm currently rather pleased with my system :)



Very nice! My system is heavily USD-centric, so... well, the last couple of days have been "interesting". Still having issues with exit conditions, blah.



Interesting that you're trading CHF crosses. I tried USD/CHF and EUR/CHF with my system, and... well, fairly much it broke so hard I had to fetch the pieces from next door's garden. *pause* Y'know, does occur maybe I should turn my system upside down and see if that works on CHF crosses. I'm trading GBP/USD and USD/CAD solely at this point, although EUR/AUD also showed promise...



Exactly - the system has refused to enter the trade for a reason - we thought up that reason in the first place - just to need to remember that and stop trying to think that in the moment decisions could be better than the reseached and thought out ones.

TBH - I'm trying not to keep too close an eye on the actual markets - too tempting to begin second guessing - but yeah the dollar has featured quite heavily in my trades recently.

I just fix my limit and stop at the entry - it's hard enough trying to work out an entry let alone trying to work out a way to maximise profits from that entry.

One reason I'm encouraged is that it doesn't seem to show any bias to particluar pairs over the longer term - although that is somthing I'm going to keep an eye on. It also doesn't show any real bias to long or short.


It's interesting that you are thinking of reversing your system because my entry points are actually a reverse of what they were in version 0.00000000001a. I figured that if something tanked that bad then reversing it would be a great thing to do - OK so lots of mods and building on other ideas since then (actually the algorithm has got simpler and simpler and could be stated on about 4 lines now) - but sometimes you do see that needle in the haystack that moves you on.
 
I just fix my limit and stop at the entry - it's hard enough trying to work out an entry let alone trying to work out a way to maximise profits from that entry.

Yeah... I'm a bit limited because my approach is very statistical rather than rule based. Trying to both fix the exit point and not end up increasing my risks of overfitting. As I think I said, my exit condition currently looks for extreme conditions (which are more a reversal indicator, frankly), and it needs to start looking for stability instead. Might have it close out when it hits SMA...

One reason I'm encouraged is that it doesn't seem to show any bias to particluar pairs over the longer term - although that is somthing I'm going to keep an eye on. It also doesn't show any real bias to long or short.

That's interesting. I can make mine work for pretty much anything I've tried (EURGBP is... well, we don't talk about EURGBP), but USDCAD and GBPUSD both show dramatically more profit than any other pair, and USDCAD shows far more resilience to me screwing up the parameters too. On the other hand, other systems I have frequently work better for specific currency pairs. My first idea hated GBPUSD for example, but worked fairly well on EURUSD. One of my experiments made fantastic profits on GBPJPY (but really, wouldn't it just be less painful to feed my arm into a grinder).

It's interesting that you are thinking of reversing your system because my entry points are actually a reverse of what they were in version 0.00000000001a. I figured that if something tanked that bad then reversing it would be a great thing to do - OK so lots of mods and building on other ideas since then (actually the algorithm has got simpler and simpler and could be stated on about 4 lines now) - but sometimes you do see that needle in the haystack that moves you on.

Yeah; as long as your system isn't within 0 - commission +- error margin, chances are you've got something that works. I did try turning one version upside down and see if I could make it work on EURGBP, but it didn't like it too much. I'll try the latest on EURCHF & USDCHF though, see what they do.

I've got 6 conditions I test; 4 entry, 2 exit. The class comes to 276 lines, including comments, structure, error handling, and special states like market close. Then there's another 8,000 lines of support code to drive it!
 
I have no idea how many lines of code there are supporting this one algorithm - but it's quite a lot. I am getting bored as there have been no trades for a while so maybe i'll go and count them:cheesy:

Out of interest what is your written in? Mine is just a VB app. I'm wondering if I should look into using a platform - but I'm not sure how well it would work in these as the idea behind it is a bit different to your normal TA stuff. Also not sure I want to learn a new language to just do what I have already done.
 
Mine's Java based. It's also fairly flexibly designed towards being adapted to other strategies later if I want, which is a lot of the code, and has a lot of self-tests too...

Generally, if what you've got works, go with it. Don't fix it if it ain't broke :)
 
Today's new feature is a giant "EMERGENCY STOP" button. Does what it says on the tin :)

So far today, my system (once started; I've given up getting my broker's stuff to be stable overnight, and I'll find a better broker in the long term if they don't fix it) bought USD/CAD at 1.0008, sold at 1.00023. It also sold GBP/USD at 2.0031, and then apparently decided to hang on to it. Not quite sure what it's doing in there, think I may need to tweak or at least double check some of the calculations.

How are you doing so far?
 
Not a sausage since I last posted. A few that looked like they may - but failed to do enough for me to enter.
 
Not a sausage since I last posted. A few that looked like they may - but failed to do enough for me to enter.

Very sensible.

As the GBP/USD dives through 1.9992, I can only assume that my data feed has got stuck again.. I can't see how my system would not have closed out by now. Still, it has extensive logging, I can check when I get home.
 
Today's score:

Me: 10 pips
Automated system: 25 pips, one earth shattering kaboom

Wait, earth shattering kaboom? Yes, earth shattering kaboom...
earth%20shattering%20kaboom.png


Not something you want to see from your live trading system when it's just entered a trade (sold GBP/USD at 1.9985 about 14 minutes ago)!
 
Yikes... did you manage to resolve it?

More or less. Experience has taught me that if it goes wrong, you get out ASAP, and I happened to make a $15 profit that time. The actual bug that caused it all to explode was fixed on one version of the code, but I hadn't copied the changes onto my live version. Doh!


Feeling a little like I've inadvertantely hijacked north5's thread... north5, how are things going out there?
 
More or less. Experience has taught me that if it goes wrong, you get out ASAP, and I happened to make a $15 profit that time. The actual bug that caused it all to explode was fixed on one version of the code, but I hadn't copied the changes onto my live version. Doh!


Feeling a little like I've inadvertantely hijacked north5's thread... north5, how are things going out there?

Feel free - I want to find out how others are getting on. Source control isn't my strong point either. I'm always changing stuff then when I want to change back or do something I've done previously I normlly have to recode it as I never kept a copy.

I haven't been around to watch it - so cut back to £2 per pip. Glad I did because it has had a bad run. It now stands at

20 trades, 13 wins, 7 losses (0.65%) + 50 pips

That is a decent enough amount of pips for the week I suppose, but considering it had +190 pips at one point also a bit frustrating. It's not broke I don't think and hope it has a good week next week. I have made some adjustments to some other strategies today so may give them a week or two and go live with them if they bear up like I hope.

May have chance to do some trading myself this week - I like your idea of competing with it - may see who comes out on top - me or the comp.
 
Feel free - I want to find out how others are getting on. Source control isn't my strong point either. I'm always changing stuff then when I want to change back or do something I've done previously I normlly have to recode it as I never kept a copy.

Have you looked into something like Microsoft SourceSafe (I think that's the VB equivalent to what I'm using) to handle version control? It will iteratively track changes to code so you can step backwards through committed versions of your code.

Decent version control is one of the features I think is most missing from automated trading platforms. I want it to be the case that when I run a backtest, it records parameters, dataset used, output, and which version of the source code I was testing on, so I can step back and see what's changed trivially. I want to be able to save code, edit it, save it again, and have the platform show me how the two compare to each other, and possibly also with the version I wrote last week.

This making any sense?

I haven't been around to watch it - so cut back to £2 per pip. Glad I did because it has had a bad run. It now stands at

20 trades, 13 wins, 7 losses (0.65%) + 50 pips

That is a decent enough amount of pips for the week I suppose, but considering it had +190 pips at one point also a bit frustrating. It's not broke I don't think and hope it has a good week next week. I have made some adjustments to some other strategies today so may give them a week or two and go live with them if they bear up like I hope.

It's been a rough week (hell, it's been a rough summer), with the markets switching rapidly between trending and cyclic, which will mess most systems up badly. I did well on Friday because I'm trying cyclic, I'm guessing your approach is more trending.

May have chance to do some trading myself this week - I like your idea of competing with it - may see who comes out on top - me or the comp.

Yeah, and it can be kinda fun too.

To be honest, I'm drifting towards the conclusion that the best approach is a platform that lets you switch strategies rapidly, or disable them completely, as well as possibly taking human input to drive a strategy (trade by wire). Let me tell the strategy the market is going up, and it figures out when it's best to buy/sell, if that makes sense? Or let me run it manually, then switch over to "autotrade" while I get coffee...

Now all I need is lots of funding and some free time to write all this in. So, err, nevermind.

Oh, last thing; what broker are you using? I'm with Interactive Brokers if I haven't mentioned, but their free stuff is decidedly wobbly at times (I got a price for GBP/USD of 1.006 late Friday, then the feed stopped entirely). OANDA look interesting, but $600 recurring fees for the API is a lot, and while my strategy means being unable to trade news isn't an issue, I do worry they'd still manage to eat far too much profit...
 
The more I read of this thread the more I think I should spend my time developing a system to use EoD data and each evening just whacking my OHLC into a spreadsheet running my algorithms and manually placing the trades as it tells me to.
 
I know I should use something like source safe - I just haven't got around to it.

The system is basically a trending system - essentially it buys into trends at reversals.

I have been thinking along the same lines - I want to devise some human parameters to feed in - just not sure what yet. Any ideas would be welcomed. I have put in a news excluder. i.e. I give it a date and time and it won't open trades for an hour after that.

I'm still going to get it to record the trades that I exclude - and compare if it makes a difference - just need to work out what I think I should be telling it....

In terms of account I use one the main spreadbetting companies - my system loads the web page into a control and then I can make it do what I would do manually (i.e click elements on the page). It has it's good and bad points doing this and one reason I was wondering if I should use a proper platform.
 
I have been thinking along the same lines - I want to devise some human parameters to feed in - just not sure what yet. Any ideas would be welcomed. I have put in a news excluder. i.e. I give it a date and time and it won't open trades for an hour after that.

I'm thinking 30 minutes before, make sure it's flat on news, and probably longer than an hour after (although it depends on the news). USD/CAD fairly much exploded on news on Tuesday, and it took until about Thursday before it got back into its normal swing. You might find it useful to know you can get upcoming Forex news in iCal format:

http://www.finotec.com/economic-calendar/weekly-outlook.ics

The descriptions are meant to be human parsed, but I'm fairly certain they're stable enough that a system could auto-parse them itself.

I'm still going to get it to record the trades that I exclude - and compare if it makes a difference - just need to work out what I think I should be telling it....

In terms of account I use one the main spreadbetting companies - my system loads the web page into a control and then I can make it do what I would do manually (i.e click elements on the page). It has it's good and bad points doing this and one reason I was wondering if I should use a proper platform.

That's somewhere between great and terrifying :) Either way, probably not any less stable than half the APIs out there, from what I hear. Automated trading is still considered "out there" and too small a market to really cater for, at least for free. IB do a $500 "industry standard" interface, as well as the free one I'm using, and I get the impression it's a hell of a lot stabler. On the other hand, I don't want to add another $500 to my outlay without having some proof this stuff will keep working long enough for me to make that back.

OANDA have a great API, from what I've seen, but it's $600 upfront and another $600 every month, reduced if you make enough trades. Still, if you're working well with a spreadbet firm, odds on that the spreads on OANDA wouldn't kill my system either, which is good to know.
 
The more I read of this thread the more I think I should spend my time developing a system to use EoD data and each evening just whacking my OHLC into a spreadsheet running my algorithms and manually placing the trades as it tells me to.

I'm nervous that EoD trading is too fundamental driven for a technical analysis to be terribly effective, but haven't actually checked. Certainly, worth a try, at least!
 
When I get back to testing systems in a more thoughrough and systematic way I'll post my findings in my journal. I'm expecting to find EoD systems that work but they'll probably use very different methods of analysis to any (successful) shorter term systems I come up with.

Definitely going to explore both avenues though. If I can develop EoD algorithms that are as successful as my shorter time frame ones I'd rather go with EoD and save on the headache of getting a system fully automated.

Mind you I'd probably try to automate it at some point anyway just for the challenge:whistling
 
Thank you north5 & rnicoll for this very insightful thread.... even though I don't trade with systems, it's a good thread to follow and I've learnt much. Keep it coming!
 
Top