Deadline June

Re: Pass me the axe

Stupid newbie error. IB closes the NZD pairs from 13:00 NY time so they say - although I'm sure I traded it at 15:00. Whatever, that was why I suffered such immense slippage - my stop wasn't executed until IB re-opened the NZD/USD pair at 17:15.

I don't think I can trade that.

That's BS. Your IB is BS. Watch around 5pm EST. They done you bad. You should pull stops for 15mins from 5pm EST to 5:15pm EST Monday to Friday, you could see massive slip around these times. NZDUSD is tradable 24 hours. You should really ask your IB what the hell is going on there. They screwed you bad there when they shouldnt have.
 
There's really jack **** I can do about it now. They just state simply that the market isn't open. In fact that's the case for all the forex pairs in that time window you give - 5pm EST to 5:15.

I'm not too fussed about it as it can cut both ways. I've had a few dollars from gap openings before. No surprise that I'll give them back.

I just pulled NZD/USD from my basket of forex pairs.

Shame IB can't sort it out better. They must have some crazy old reasons for it.
 
There's really jack **** I can do about it now. They just state simply that the market isn't open. In fact that's the case for all the forex pairs in that time window you give - 5pm EST to 5:15.

I'm not too fussed about it as it can cut both ways. I've had a few dollars from gap openings before. No surprise that I'll give them back.

I just pulled NZD/USD from my basket of forex pairs.

Shame IB can't sort it out better. They must have some crazy old reasons for it.

Hey Adam

Do you have access to FTSE 100 Cash Intraday data, or have any idea where i can get it from?

Brett
 
I don't. Cash intraday? You mean the index? My advice would be to go direct to the source. FTSE or LIFFE I guess.
 
Have to post a link to this interesting article here (thanks to NVP for pointing it out): learning to become a successful trader

Otherwise, still living in whipsaw land as far as trading goes, and getting my bollox squeezed in the vice that is NinjaTrader. I should commit myself to the 10 days or month that it takes to swap over to Amibroker but I keep thinking NinjaTrader will improve and that Amibroker will have a bunch of its own issues with IB, with data, with anything imaginable, plus of course it wouldn't take just ten days to learn all the quirks and tricks in Amibroker that I know for NinjaTrader. I need to clone myself.
 
Cut your losses and move to Amibroker NOW. You'll pick up the code in no time and the amount of information related to it on the internet is immense.

I recently finished coding a "drawdown limit" feature into my longer term trend system. The idea is that if drawdown exceeds x% from the most recent peak, then cut all positions, and then wait for new signals to re-enter (although note that you'll only get a new signal after the original trade ran its course).

To code this you need to use the "Custom Backtest Interface" which is about as complex as it gets (for what is a fairly simple idea). The point is, I am not a computer programmer yet I managed it, partly through emailing questions to Amibroker, but also by using the resources on the net.

As for trading pairs like NZD/USD - don't bother. Just stick to the pairs which are truly liquid, which is probably fewer than 10.
 
Oh man, if only you knew. My relationship with NinjaTrader is like one of those dumb relationships with girlfriends I use to have who would abuse me to hell but I would love them more for it. Mmm, the pain and the martyrdom.

Seriously though if I'm going to change I've got to check out Neoticker as well as Amibroker and others and even weigh up the time and effort it will require to do what I need to do in java myself.

The drawdown limit feature should be a cinch - I'm not sure I get your point.

I dropped NZD/USD on Monday or was it Tuesday. Crazy messed up system that is IB wouldn't let me trade it past 13:00 NY time. Everything else, fine. Even Singapore Dollars or Swedish Krona.

I've got 2 levels of currency pairs: a core set of about 10 which is what you mean, and the extended set of 20 which is tradeable for some systems, but it's wild. I should post some stories. Sometimes for instance on AUD/CAD, the price on the chart can jump 10 points either way without a tick in between, and the bid and the ask, forgeddabout.

Someone said that IB don't actually do those cross-trades, that they're just synthetic and IB would buy AUD/USD and then USD/CAD to give you the AUD/CAD trade. I thought that was crap when I first heard it but sometimes I think it might be true.
 
I think we had this discussion many, many pages ago but here it is again. There are real currency pairs, e.g. EUR/USD, and synthetic currency pairs, e.g. GBP/JPY.

A currency pair which is actively traded, and (usually) relates to two countries which do a reasonable amount of trade with each other, is what you should apply your mechanical system to.

EUR/USD, GBP/USD, EUR/CHF, USD/JPY, AUD/USD, USD/CAD for example.

Now - as I recall, you explained to me that your system's edge was that it followed trends. There have been some fairly clear trends in EUR/USD and AUD/USD this year, but less so in USD/CAD. Nonetheless, you're only likely to get trends in pairs that people actually look at ----- people bought AUD/USD above parity because they felt they had missed the party (thereby extending the move). Who looks at AUD/CAD? One or two people, but it's not the DRIVER.

I would suggest that mechanical systems only work on the driving (or "real") currency pairs. GBP/JPY is certainly not a driving currency - it is occasionally looked at but let's be honest, the real drivers there are GBP/USD and USD/JPY, so trade them instead.

In addition, GBP/JPY is illiquid so you'll get more slippage than you would like.

Now, is NZD/USD a real currency pair or is it AUD/NZD? Probably a bit of both, but NZ is a tiny economy with an illiquid currency, so watch out.

USD/CHF? Not a real currency pair, it's just a function of EUR/USD and EUR/CHF.

AUD/CAD - definitely not. This is just a function of AUD/USD and USD/CAD, and to trade it you'll have to cross those two spreads.
 
It wasn't that long ago at all, in fact it's quite fresh in my memory that we discussed this, although I don't think the conversation went anywhere because I see no reason except the additional costs for not trading those crosses.

AUD/NZD has costs that make it untradeable, but the others are OK on the probable returns forecasted by my testing. In fact it was also you who said I should trade systems that have a high enough return per trade to make the costs of trading irrelevant (more or less).

Tell me again why I should worry whether a particular currency pair is a 'driver' or not, or just a function of another couple of pairs? Isn't it a bit like saying, don't trade futures, only trade cash?
 
Unforced Errors

I think I have to start recording my errors, at least so that I've got a record.

Yesterday was particularly bad with at least 4 seperate errors.

The first was on the AUD/USD. The system went long at 0.9885 on Sunday night and set a target at 0.9955 which was never hit. By 11am Monday morning the Aussie/USD was slightly off its high and I had to restart my system. When it was back up, I realised my strategy hadn't put any target or stop in for AUD/USD so I checked the log and saw the system had hit the stop in theory in its initialization and was currently flat. It was 10 points off its high and I figured it would make it back up there - it didn't, it hit my stop instead, placed discretionarily at 0.9915. So 30 ticks down the toilet for 10 points potential profit - not a good decision. Wasn't thinking obviously.

The next was actually Sunday night on the opening when all the Euro crosses and the CAD crosses gapped open at 22:15. I went into the weekend long from Thursday at 1.0220 and it had closed Friday at 1.0177. It gapped open at 1.0163'5. When I initialized the system, the system decided that it had reversed on Friday night at 20:00. So I had to reverse too, but I figured that it was going to climb back up and fill the gap at 1.0177 - which it didn't, instead it continued to fall and I bailed out at 1.0140 - 23.5 ticks gone for real and 23.5 ticks gone in theory if my system hadn't swallowed the reverse signal. The gap was of course filled 12 hours later.

The third foobar was CHF/JPY. I went into the weekend flat but on restarting the system, it decided that it had gone long at 84.15 at 22:00 on Friday night, which isn't actually tradeable because IB closes down at 22:00. Bizarrely though IB continues broadcasting prices until 22:15 so there is data there. So I was flat but the system was already long and the market was falling. I got in at 84.07, 8 ticks better. No big deal, but the problem is a technical one and I don't know how I'm going to sort it out so it doesn't happen again.

CHF/JPY also foobar'd me again, or better said, NinjaTrader crashed again, around 20:00, and after restarting, I missed another error. During initialization after 20:00 on restart, the system decided that it had in fact reversed at 20:00 @84.05 and was now short. NinjaTrader didn't reverse it for me (I configured it not to) and so it just placed the orders that should be there - although of course I was long still from 84.07 but the system thought it was short. So it placed a buy stop where the sell target should have been, at 84.50. This looked fine to me - a position, a stop and a target. And I went to bed. Fortunately nothing happened until 06:14 this morning when my position size was doubled as the buy stop order was hit. The market carried on up a little and at 07:45 I realised my mistake and bailed out at 84.67. That made / saved me 2 ticks on the bad reversal, and 45 ticks on the bad short from that reversal, and then 17 double ticks at double the position size from the stop to the point I bailed, i.e. 80 ticks.

I had an error on EUR/CHF as well. At about 10:30am NinjaTrader crashed and it took me about 45 minutes to get back up and restart and check all the systems and I somehow didn't see that EUR/CHF had gone short according to the system initialization at 11:00am, i.e. 15 mins before. I should have seen it because NinjaTrader would have submitted the target and stop orders and I should have seen immediately that they weren't against a position. I would have been short from 1.3579 and EUR/CHF fell for the next couple of hours. I saw my mistake only then when it was about to hit the target at 1.3498'5 - 80 ticks down the toilet.

So my net loss yesterday from incompetence and technical failure: 23.5 ticks. I guess I'm really lucky the CHF/JPY trades went my way.

No more horrific fills to report either, touch wood - a very big bit of wood. Like mahogony. Or that really expensive blackwood they use for making clarinets.
 
Testing entries: what percent profitable trades will do?

Yesterday was error-free. NinjaTrader behaved itself completely and acted like a General Release rather than a Beta version. It seems to go through these unstable phases. Being optimistic perhaps but it feels that the stable phases in-between are getting longer.

Right now I'm testing the entries on my version of the 3 Ducks which is still up on blocks in the garage unfortunately.

I am testing it on the extended set of forex pairs and I'm looking for an entry mechanism that works. But what is 'works'? My long term approach has always been 55% profitable trades is the threshold before I go on to test an exit mechanism on it.

The default exit mechanism I use for testing entries is equally distant fixed targets and stops.

Neither of these 2 factors - the % threshold or the default exit mechanism - has changed over the last 2 years reallly and I'm beginning to think I need to be a bit wiser about it.

55% is probably what I heard or read was a suitable level. I can't remember. That's 5.5 out of 10. The thing is, it's damn difficult to achieve.

Secondly the exit mechanism for it - fixed targets and stops - is fine, but how far from the entry should it go? I figure the stop should be one that I can realistically expect to use as the initial stop in the final system, so I've already made an assumption about the risk profile I want for this system.

I use fibonacci pivot points for part of the entry trigger, so I decided that the exit stop should be set at the PP itself, and I set the target the same distance above / below.

It's taken me 3 days to find something that produces >55% profitable entries but I'm finally there - or at least I hope I am, I developed this on a 2 year window and I'm now testing it over 10 years to see if it held up.

The entries are based on the 3 Ducks, but used differently from Captain Currency's textbook implementation. Instead of a simple

Code:
if (Close[0] > slowMA[0] 
	&& Close[0] > mediumMA[0]
	&& Close[0] > fastMA[0])

which doesn't work in any combination I can see across all the currency pairs I use, I changed it to this:
Code:
if (ma3[0] - ma2[0] > ma3[60] - ma2[60]
	&& ma2[0] - ma1[0] > ma2[240] - ma1[240]
	&& fastStraightRuns[0] > straightRuns[0] 
	&& fastStraightRuns.LongAverage[0] > straightRuns.LongAverage[0]
	&& Weighted[0] > pivot.R1[0])

where ma1 is the long 4hr duck, ma2 = 1hr duck and ma3 = 5mins.

StraightRuns is a simple indicator I wrote to give the average number of consecutive bars in the same direction - the default is either long or short, and StraightRuns.LongAverage is the number just for up bars.

.ShortAverage for consecutive down bars.

And pivot.R1 is the standard 3 Ducks daily pivots entry trigger.

So that hits 55% profitable trades - but appalling stats otherwise! Only $5 per trade.

How I would love to find something that isn't curve fit that gave 60% profitable trades.

Argh! The backtest on 10 years just finished and the results don't hold up. It only shows 52.5% profitable trades. I have to admit it did smell slightly of curve fitting with those 5 degrees of freedom going just on the entry filter.
 
Back to where I started

Normally I get up at 6:00am to work a couple of hours before breakfast but a combination of overtiredness and sloth meant I just got up now. Despite hating myself for being emotional about my trading, I'm really chuffed to see my equity is back where it was 2 months ago after being in drawdown and being raided for rent and food money. So I'm now at £34K which will drop to £32.5K after taking out another £1.5K for subsistence through December. Fortunately my family does Secret Santa so there's only one present to buy, but I've got a skiing trip to pay for too. I have to admit I feel like I'm walking a tightrope, especially with only 1 proper system in place.
 
Laurence Beggs

This guy has good ideas.

The-ID-NR4-Setup

Asian-Session-False-Breakout

Notice I didn't say he comes up with good ideas - I just said he has them, as in he can write well about them and likes doing his newsletter. Not that that's a bad thing. I wouldn't have come across it on my own. And maybe he does think some of them up himself. Thanks to NVP for the tip who's a big admirer of the newsletter.
 
Last edited:
Re: Back to where I started

Normally I get up at 6:00am to work a couple of hours before breakfast but a combination of overtiredness and sloth meant I just got up now. Despite hating myself for being emotional about my trading, I'm really chuffed to see my equity is back where it was 2 months ago after being in drawdown and being raided for rent and food money. So I'm now at £34K which will drop to £32.5K after taking out another £1.5K for subsistence through December. Fortunately my family does Secret Santa so there's only one present to buy, but I've got a skiing trip to pay for too. I have to admit I feel like I'm walking a tightrope, especially with only 1 proper system in place.

I've been in drawdown since a rather heady peak in May. Still up for the year, but some ways from the top.

I've got two systems in action, a shorter term FX breakout system and a longer term trend system on FX, commodities and interest rates. The latter system has been flat for over a week now and I'm not close to getting any signals - I don't mind this though. The short term system is long USD against a few currencies.

I've made some modifications to the strategies over the year. Looking back at what I've done, the two things I've tried to achieve are a) simplicity and b) lower frequency of trading. For example, I originally had the stops 0.75 ATR away on the short term system, but I've now moved that out to 1 ATR, as it reduces the number of trades. It's not a big change, but it has aligned it more to how I want to trade.

I've now coded up an option pricer in Amibroker, the next challenge is to incorporate options into a mechanical strategy (this could take a while..!).

Hang in there Adam, you've put in a lot of work, will be a shame to let it go. As I always say, the hardest part is when you're losing money - BUT I find that the strategies usually start to make money when you're at a low ebb.
 
Re: Back to where I started

Options?!? You'll have my greatest respect, if you can do that. Just remember, the Black-Scholes formula only works 95% of the time. Are you going to price them, or do you have historical options data that you're going to work with? I thought about that once but decided the different strikes and months all trading at the same time made it too much of a black hole for time and effort.

I think wide stops are pretty much the way to go, they generally increase any given system's profitability for me in backtesting.

The system I'm currently running (not the 3 Ducks) sets its exits on entry - a stop and a target - and leaves them like that. When the stop's miles away, it makes it pretty hairy, especially when it's close to the target - at which point the stop is on average twice as far away from the market as it was when the trade entered. The nightmare scenario is of course checking up on the almost-at-target trade and finding a massive bar taking it down to the stop. Reminds me of snakes and ladders.

I was also going to say something - psychology. I can't say I've cracked it or anything but I do think I'm a pretty objective type and my approach is essentially do-or-die. I made my decisions and I know where my cut-off point is. And so I stick to that. It doesn't feel good, especially when my equity hit £23.5K on Monday, and of course it feels great when it goes the other way like Tues to today, but so far I have been successful at isolating the feelings that come from trading and not letting them influence my decision making.

My bail-out equity is when it falls to £20K so at least I would have a little to live off while finding another job. When my equity hit £23.5K, I admit I started thinking about what other kind of job I should look for, but I didn't stop or change my trading. In fact I thought that when it hit 29K, and then 27K, and 25K too.

It totally surprised me that I'm back up to £34K so quickly. Getting down to £23.5K was long and drawn out. Looking at the equity curve from my backtest though, it can happen. But then this is the future compared to that, and so anything can happen. I've got to get this 3Ducks back on the go and then I'll be less dependent on this one system I'm running now.

I'm actually also running a variant of the FMT system on GBP/USD which is hot at the moment. I spent quite a while trying to apply it to other markets but didn't find anything. FMT is so hot at the moment I know I should give it more leverage but I haven't done the grunt work yet to see how long I can expect it to last, and the big question right now is how it behaves over December and the New Year break.
 
Last edited:
Well, you could always look for a job anyway. If your system is automated, you can leave it running whilst you're at work?

For options backtesting, I'm going to have to make some fairly wild assumptions. I was thinking I could use historical vol to price, and add on 1 vol when I'm buying, and subtract 1 when I'm selling.. very crude but I can't overlay past implied vols onto a backtest.
 
Adam, it strikes me that in a month or two, your thread title will have relevance again, as it looks like you'll be shooting for June 2011 :)
 
It's an unfortunate side effect of trying to discover something, e.g. mechanisms for trading systems, that you can't predict how long it's going to take.

That is also true of any effort that relies on beta software like NinjaTrader 7.

Put them together and any prediction of project timelines is subject to non-linear influences.
 
More backtesting hell and damnation

This time it's stop orders.

I thought for a long time that I was incapable of writing a system whose exit strategy was based on trailing stops. There would always be a few instruments in the portfolio which just lost money wholesale. So badly that I just dropped it automatically.

I then discovered this weekend that actually it is possible to set trailing stops with appropriate parameters that make those instruments backtest quite profitably.

I haven't done any forward tests yet because the problem is on some of those instruments, e.g. EUR/CHF, and optimization run will always give the best parameters that pick out one monster trade.

Ninjatrader won't allow me to optimize on profits minus the biggest win, which I have seen on other platforms.

It looks like I'll be manually optimizing the trailing stops on my system now.

So I haven't got my second basket system in place yet. Productive weekend, but not productive enough. Meanwhile my first basket system (meaning one system running on a whole basket of different currency pairs) is in action and is beating a retreat from the equity high of Friday.

The weekend was good, with a nice gap in my favour on EUR/GBP - but today so far stinks. Down two grand GBP. Mustn't complain. I have no doubt my second system wouldn't like the conditions today either.
 
Last edited:
Top