Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

jswanson

FirstStrike Trading System

Recommended Posts

Every once in a while you run accross a free trading system while surfing the web. Often I don’t spend much time with these systems since, more often than not, most turn out to be worthless. I decided to look into this system because it was a breakout method that was designed for the FOREX market. Breakout methods can have some validity and the rule base for the system was simple. I also figured I could simply use the currency futures markets to test it. In short, this system was very simple and to me, it just might be worth looking into. If this system does not do well, perhaps a few simple tweaks may make it worthwhile. If all else fails, it will be an exercise in properly modifying and testing a trading system.

 

The system is called Firststrike and the original PDF document describing the system can be found here. The first thing you are presented with is this wonderful looking equity curve based on trading the GBP/USD pair.

 

First-Strike-PDF-EQ-Curve.png

 

The rules of the breakout system are very straightforward and clear in the original PDF document. Here they are:

  1. On Monday morning (0000 Central) note the opening price
  2. Place a buy stop 50 ticks above the opening price
  3. Place a Sell Short stop order 50 ticks below the opening price
  4. Once in a trade set your stop to 60 ticks.
  5. Exit all open positions on Friday afternoon at 1500 Central

 

That’s the basic system. What we have is a simple breakout system that enters a trade either long or short, depending upon when price reaches 50 ticks above or below the weekly opening price. Once we are in a trade, how do we manage it? A simple 60 tick stop loss is placed and we exit all open trades at the close of Friday’s session. With this system you make one trade per week and you can either get stopped out or exit on Friday. Simple!

 

I coded these rules in TradeStation’s EasyLanguage which is available at the bottom of this article. Now the question becomes how well does the system perform? I don’t trade FOREX so I’m going to test it on the Euro currency futures. I will apply the strategy to a 15-minute chart and will deduct $50 per trade for commissions and slippage. All back testing will be performed from May of 2001 – December of 2010. The dates beyond December 2010 will be used to test our modifications on “unseen” data.

FirstStrike-Baseline-Results.png

 

Baseline_Equity_Curve.png

 

IMPROVEMENTS

 

Clearly the system on the Euro has no resemblance to the original equity curve for the GBP/USD pair. On the postive side we do see a postive net profit. However, it’s far from an ideal equity curve. The system could easily use improvement. In this article I want to show you the process I use to help test various filters in an attempt to find a tradable system.

 

What I wish to do now is to apply additional filters, modify entry rules and modify exit rules in an attempt to find a better system.

 

One of the first things I like to test is applying a regime filter. This is a macro type change that broadly divides the market into two distinct modes: bullish or bearish. I will use a 100-daily simple moving average (SMA) to do this. With our regime filter in place, we modify the system to only open long trades when price is above the 200-day SMA and only open short trades when price is below the 100-day SMA. The idea here is to take the trades that are congruent with the primary trend as defined by our regime filter. To do this we will need to add a daily bar chart to our existing chart. This is simply done by adding an additional symbol to our current 15-minute chart. This symbol will be the Euro futures with a daily interval. To access this daily price data, we simply reference “data2? within our EasyLanguage code.

 

Below are the code segments which shows how I create a regime filter and use it in conjunction with the buy/sellshort TradeStation commands. The first part of the code sets the BullMarket and BearMarket flags to boolean true or false based upon the closing price relative to the 100-period simple moving average applied to data2. Data2 is our daily price data on the second data stream of our chart. The first data stream is our 15-minute chart.

 

BullMarket = Close > Average( Close data2, TrendFilter );

Bearmarket = Close < Average( Close data2, TrendFilter );

Based on the BullMarket and BearMarket flags we will take long trades or short trades when price hits our breakout level.

if ( BullMarket ) then Buy("LE") next bar at UpperBand stop;

if ( BearMarket ) then SellShort("SE") next bar at LowerBand stop;

Below are the results of the Firststrike system with our regime filter applied.

FirstStrike-With-Regime-Filter-Results.png

 

First_Strike_Regime_Filter_Equity_Curve.png

 

The first thing you may notice is we make less profit. But net profit is not the only thing to consider when testing a trading system. Look at the equity curve and ask yourself which one is more tradable? Clearly the regime filter has helped make this system more tradable. The new equity curve appears more linear in nature. It climbs from left to right as apposed to the original equity curve which languishes near the zero line during the first half of the chart. Looking further into the numbers you can also see we reduced the number of trades while slightly increasing the profit factor and the average dollar per trade. It’s not a big difference, but it is a positive change. This tells me we removed some unproductive trades. In short, only taking trades in the direction of the primary trend improve the system.

 

Before we continue testing another filter, what else can we do? Currenly we are only taking trades in the direction of the primary trend. But what if we test the opposite of what we just did? That is, only take long trades when price is below the 100-day SMA and only take short trades when price is above the 100-day SMA? This seems counter intuitive, but we really don’t know what the results will be until we test. Continuing with this line of thinking, we should test taking long trades during a bull and bear market, but only taking short trades during a bear market. Do you see how we can come up with many different combinations to test with this simple filter?

 

OTHER IDEAS

 

There is so much to test! I hope you can see how you can start with a simple trading concept that upon first glance appears worthless but, a tradable system may be lurking just around the corner. While this system is far from tradable, we are far from testing and experimenting. Other ideas we can test include:

  • Adaptive stop
  • Dynamic breakout range size
  • Limit orders
  • Trailing stop
  • BE stop
  • Profit target based on volatility
  • Profit targets based on the markets trendiness
  • Position sizing
  • Volatility filter to exclude trades

 

In the future I will add to this post, testing various filters. Together we can continue to modify this system in an attempt to find a tradable solution. At the time of this writing I have no idea if this trading system will be tradable or not. However, either way this is a great exercise in how to test a system.

 

DOWNLOAD

 

If you would like to download the Easylanguage code used in this post, you can it on this page.

Share this post


Link to post
Share on other sites

try searching for "stops flexible" and easylanguage for a great trailing stop strategy you could layer into it. I did that on some other things i played around with and it was a great addition.

Share this post


Link to post
Share on other sites

what portion of the backtest data is walk-forward tested? I suppose that would be difficult without tick data, but tradestation does include tick data, correct? I think between 6 months and 2 years? And minute data goes back even further.

Share this post


Link to post
Share on other sites

Clearly the system on the Euro has no resemblance to the original equity curve for the GBP/USD pair. ...

 

Why didn't you use the BPM12 contract which is basically the same as the GBPUSD the system was based on?

Share this post


Link to post
Share on other sites

Sounds like a great method - Is there any way to make a program for Think of Swim with TD Ameritrade? Also - Just an idea but it would be nice if the program calculated your risk based on capital - therefore increasing or decreasing size based on 1-2% of capital in account... Thanks again.

Share this post


Link to post
Share on other sites
try searching for "stops flexible" and easylanguage for a great trailing stop strategy you could layer into it. I did that on some other things i played around with and it was a great addition.

 

Thanks for the tip. I will try some various stops in futures posts.

Share this post


Link to post
Share on other sites
what portion of the backtest data is walk-forward tested? I suppose that would be difficult without tick data, but tradestation does include tick data, correct? I think between 6 months and 2 years? And minute data goes back even further.

 

All back testing will be performed from May of 2001 – December of 2010. The dates beyond December 2010 will be used to test our modifications on “unseen” data. However, I have yet to perform any type of walk-forward test.

Share this post


Link to post
Share on other sites
Will it work with Amibroker for EOD data?

 

Sorry, not sure if will work with Amibroker. Maybe some else can help out here? As for the EOD data that could be done, but I've never tested it. My next plan is to continue to refine the system with other entry methods, exit methods and filters to see if I can improve the performance.

Share this post


Link to post
Share on other sites
Why didn't you use the BPM12 contract which is basically the same as the GBPUSD the system was based on?

 

Purely selfish reasons. That is, I like trading the Euro and I'm always looking for new ideas in this area. Also, if I remember correctly I did test it on BP and it did not do nearly as well as on the Euro.

Share this post


Link to post
Share on other sites

amazing I read about this exact system on 1 of the metatrader forex forums back in 2006-2007.

 

The premise that trading less frequently was good.

 

Also at least 1 well known system developer has a system with good results called:

 

"buy monday, sell friday".

 

On that forum thread someone wrote a metatrader EA.

 

Being a newbie at the time I moved onto other things, but also just because it was metatrader, how trustworthy was the testing etc.

 

Interesting too see this again.

Share this post


Link to post
Share on other sites
Purely selfish reasons. That is, I like trading the Euro and I'm always looking for new ideas in this area.

 

Hi Jeff,

 

If you're interested in examining further EL strategy code for the Euro then drop me a private message - I have several things that I have developed but never traded. You'd get the benefit of hopefully seeing some new ideas, and I'd have the benefit of having another system developer's opinion of the robustness of my strategies.

 

Thanks,

 

BlueHorseshoe

Share this post


Link to post
Share on other sites
Hi Jeff,

 

If you're interested in examining further EL strategy code for the Euro then drop me a private message - I have several things that I have developed but never traded. ...

BlueHorseshoe

 

So let me get this straight. Rather than help everyone by trying to develop a concept in this thread in public, you want to take it offline and keep "the good stuff" all to yourself. Does that about sum it up?

Share this post


Link to post
Share on other sites
So let me get this straight. Rather than help everyone by trying to develop a concept in this thread in public, you want to take it offline and keep "the good stuff" all to yourself. Does that about sum it up?

 

While I can't speak for BlueHorseshoe, I think he is planning on sending me code from something unrelated to this code presented in this topic (FirstStrike). I think it's his own personal code and simply wishes for me to give my opinion and any recommendations. So, I can understand why he may not wish to share it with everyone.

 

As for FirstStrike, I plan on continuing my research and posting it here with open source code available.

Share this post


Link to post
Share on other sites
So let me get this straight. Rather than help everyone by trying to develop a concept in this thread in public, you want to take it offline and keep "the good stuff" all to yourself. Does that about sum it up?

 

Hi Bakrob,

 

You are correct in saying that I don't want to develop a concept in this thread in public, but incorrect in saying that I want to keep "the good stuff" all to myself. If you would especially like to see the code in question then PM me and I'll send it through to you - it's hardly a massive secret.

 

The approaches that I actually use in my trading (of the ES - I don't even trade the Euro) are things that I discuss regularly on this forum and think that I am fairly open about, so I feel that your criticism is a little unfair.

 

Kind regards,

 

BlueHorseshoe

Share this post


Link to post
Share on other sites
Hi Bakrob,

 

You are correct in saying that I don't want to develop a concept in this thread in public, but incorrect in saying that I want to keep "the good stuff" all to myself. If you would especially like to see the code in question then PM me and I'll send it through to you - it's hardly a massive secret.

 

The approaches that I actually use in my trading (of the ES - I don't even trade the Euro) are things that I discuss regularly on this forum and think that I am fairly open about, so I feel that your criticism is a little unfair.

 

Kind regards,

 

BlueHorseshoe

 

 

Thanks for the offer. I rescind my early comments.

 

R

Share this post


Link to post
Share on other sites
...As for FirstStrike, I plan on continuing my research and posting it here with open source code available.

 

That would be good...please do not abandon the thread..

Share this post


Link to post
Share on other sites

It's been suggested elsewhere the value of knowing the success another trader has acheived at best limits us. It can be claimed that statement is off-topic or tangental within the thread where it occurs. It's not my intent to be off-topic anywhere. By responding to it here it ties into something I've considered sharing here for a long time. Comparing my returns to others has helped me see truth.

 

If what I say doesn't make sense consider I'm carefully avoiding saying anything at all. It's not easy helping those smart enough to discern what I'm not saying. The deserving who will eventually figure it out on their own and go on to substantially contribute to the evolution of our species.

 

Proper methodology for testing a strat is an area one can easily invest a lifetime without attaining results. Until one gets this, proper methodolgy is a hindrance that prevents seeing what can be assimilated in an instant. I'm aware of traders who develop viable strats directly through backtesting but the odds of duplicating their results are astronomical unless one follows their methodology precisely. It's an interesting methodolgy one could find a lot of enjoyment in but there are easier ways more suited for and responsible for a larger segment of those who eventually develop profitable strats. Until you develop some profitable strats and narrow the population of ideas worth exploring , it's going about things backwards by attempting to use backtesting as a development tool. There are extenuating reasons it's not so backward for some to choose that procedure from the get go but everyone else should forget about backtesting until after they've developed some profitable strats. For 99% of traders backtesting is the wrong place to look for viable ideas.

 

If this system does not do well, perhaps a few simple tweaks may make it worthwhile. If all else fails, it will be an exercise in properly modifying and testing a trading system.

Share this post


Link to post
Share on other sites

Just a quick update to let you know I still plan on updating this thread. I've just been too busy to dedicate time to it. I would also like to point out two errors on my original post.

 

1) I make reference to a 200-period regime filter which is a typo. The code uses a 100-period regime filter.

 

2) I discovered a small bug in the code. The code incorrectly used 1445 (central) as the exit time for Friday. Well, the order is placed at the open of the next bar which means a trade is held over the weekend. I'm adjusting the code to exit at 14:30.

 

I will post the updated results soon and continue with this thread.

 

Thanks!

Share this post


Link to post
Share on other sites

I'm not wanting to change the subject despite my own reservations as the the long term viability to such a concept, due to the fact that if it is deconstructed as to WHY it works, the conclusion I reach is that long term trends tend to play out over the long run (obviously, markets do have a tendency to trend)... and that whatever catalyst or change in sentiment that may take place over the weekend has in the past been large enough and relevent enough to keep some significant influence on the market participants in the future.

 

Essentially, I believe this to be circumstantial. Though markets behave differently than each other, I find by far the best "systems" or "methods" are ones that work across a broad spectrum of markets independently of one another.

 

This all not withstanding... you might consider this as a filter, because obviously, if your trading with the trend here, you have an order of magnitude better likleyhood of being successful, than if you are not.

 

1st: Open up a weekly chart on a saturday

 

2nd: determine if that previous week candle was bullish, or bearish, or "neutral"

 

HINT: long body green, small wick = BULLISH. Long body red, small wicks = BEARISH.

2nd HINT: Big range on a candle, but a small body near the top and a long wick below = BULLISH. Big range on a candle, but a small body near the bottom and a long wick above = BEARISH.

 

3rd: once you have determined if he previous week was bullish, check to see if it is the 3rd, 4th, 5th, or more green candle in a row (assuming it's bullish). If you see 3 or more green candles in a row, you stop what your doing, close the charts, and come back next week. HOWEVER, if it's the first, or 2nd bullish candle in a row on that weekly chart, you can get excited :) - if you determined the previous week was bearish, just do this step for bearish candles.

 

4th: Now, use your 100 period filter, and your solid.

 

BONUS: This will most likely work in all markets now, not just GBP, or EUR, or whatever. do it for GOOG, AAPL, CL, USD/JPY. whatever. Probably work best in commodities and currencies though....should still work in stocks.

 

RISK MANAGEMENT OPTION: Measure the length of the candle of last week. Lets say it's 200 pips. When your trade is between 100 - 200 pips up, reduce your risk somehow... ideally to zero risk. Stop to BE is the most direct way, but there are others. Consider them, test them across a broad array of market for a several year period (10 is good). Then, you will have some decent answer as to how to best eliminate risk.

 

Because, lets keep it real, if a candle from last week is 200 pips, and by wednesday of this week, your up 170 pips, but by friday, your down 30 pips...? Well, I'm willing to go out on a limb here and say your probably are near the end of a swing or move.... considering your about to have a 200+ pip pinbar on the weekly chart AGAINST your trade. Oh...and if this IS the case...I would NOT look to fade that pinbar this week! I would look to trade in the same direction of it.

 

 

 

If you can program this somehow.... I would be very very interested to hear the results. Hope the spirit of free information exchange continues.

Share this post


Link to post
Share on other sites

FirstStrike-Baseline-Results.png

 

Baseline_Equity_Curve.png

 

Wait a minute... I just realized this was NOT tested through the finanancial crisis of 08-09???

 

If not... It needs to be. And if it fails, one then has to realize that the first black swan event that rolls around (it will, because it always does, and always will more often and more dramatic than you think it will...) You'll lose your ass. You'll go to sit down one day, and you'll just fall right on over. you'll stand up, you'll try again, and you'll just not be able to stay on the chair. Why? That's right, because you lost your ass!

 

However, the filter I provided above using price action of weekly candles should keep it completely out of trouble, and even profitable through the financial crisis... but still, would need to be tested of course.

 

I find it somewhat amusing that if you look at the best 10 year period for 1 market, then... YA! it works!

 

It's just sounding more and more curve fitted than ever. One always has to ask themselves WHY it works I believe in most cases, and most of all, when it's the fundamental driving mechanism behind your system...well, ya, I think it's important to know why.

 

And in this case, all I can say is the reason WHY it works is that markets tend to trend, and monday can set the tone for this particular market... but, why monday? I'm not sure. It doesn't make a lot of sense actually, other than the amount of time between then and the weekend... so, that's why? Not good enough for me to believe it will continue that way for my trading and investing career... and in fact, if that's the only reason, I'll fade it with some long term out of the money options positions... so when the inevitable black swan moment shows up... I'll cash out with your losses.

 

I believe ANY and EVERY mechanical system that is going to be used needs to be tested against the 08-09 crisis to see if it really can stand up during some very powerful adverse moves in the market place.

 

I'm just thinking... 1 market, 10 years, no black swans, long term trend over all... feels like that curve was custom fit for that chart pic there...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.