Long Japanese Yen & Nikkei trade signals

Today my automated strategy code fired off some trading signals.  A quick discussion of how I reviewed and analysed the signals, and details of some additional code I created to make the process more streamlined and to provide with more tools.

Over the last three trading sessions, my TradeStation strategy code generated close to zero signals.  Possibly due to many markets reversing following the US employment report released on Friday last week.  As many of the FX and equity markets turned a bit ‘choppy’, the “clean trending conditions” component of my setup failed on most of these markets and consequently no trade signals were indicated.  This is exactly how I want my code to operate – so far so good.

During last night’s Asian session (from Tuesday to Wednesday) was the first time the code started generating signals – on nearly all of the Japanese Yen FX pairs and on the Nikkei (the Japanese stock market).  I missed all of these signals because I was fast asleep at the time.

Review & Analysis – False Positives and False Negatives

I did however go over those setups this morning to judge whether, if I had been awake, I would have entered trades on the basis of these signals.  Some of them – AUDUSD and AUDJPY – I would have skipped  because of a pending Australian economic data release (at 2.30am UK time) and another – CADJPY – because the price’s recent pullback was too drastic for me – however the code gave it a green light.  These cases are classified as “false positives”.

Finally there were 1-2 situations where the code didn’t generate a signal but where I would have wanted to take a trade, for example buying NZDUSD in the middle of night.  This is classified as a “false negative”.  Ideally I want to have as few false negatives or positives as possible.

The signals on USDJPY, EURJPY, NZDJPY and Nikkei I agreed with and would have taken, had I been awake.  Some of the JPY trades would have worked out very well such as this Nikkei one:

Nikkei Jun6


There was one signal at 9am on AUDCAD, which I did trade.  Due to afternoon’s Weekly Oil Inventories data release, which tends to have a significant impact on the Canadian dollar, I took off 75% of the position for a partial loss prior to the data.  Following the data, the remaining 25% is around 20 pips in profit at time of writing, needing another 40 pips to hit the target price.

Coding Stops and Targets

Next I worked on creating further code based on some of the ideas I had recently whilst I was busy working on another project.

The first part related to programming stops and targets.  Over the last 3 weeks I have steered towards using most recent swing points for setting stops and using a simple 125% multiple of the stop loss size for determining the target price levels for trades.  This was fairly straight forward.  Prior to this I simply used a “exit after N bars” rule.

Next, I compiled some code to collect information relating to each trade signal, such as the time of entry, maximum adverse and maximum favorable price movements (MAE and MFE), price volatility data, the trade’s profit+loss results and the time duration of the trade.  This will help me in quickly collecting data for reviewing and analysing signals going forward – something I am planning to spend a fair bit of time on tomorrow, thanks to the other (non-trading) project winding down a bit.

Following this addition to the code, here’s an example of what the early morning’s AUDJPY signal looked like (with some of my comments added):


It’s quite amazing what one can do with a bit of EasyLanguage code.


That’s all for today – happy trading everyone.


This entry was posted in Financial Markets 101, Trend-Following Strategy. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.