The Most Profitable Trading Pattern You Will Ever Encounter

Hi Guys,

Read through this thread whilst at work last week, still demo trading very new to this, but saw this set up on Thursday I know I set my stops wrong but think everything else looks solid. Did anyone else see this and get in?


My pleasure. As I think you are really onto something, I want to help all I can, and definitely transition personally to FX trading. A couple of things:

  • The results and code are Version # 1. I just found a mistake in my logic (and I’m sure I’ll find more, so feel free to question me on ANYTHING), but based on your prior comment to me, I wasn’t calculating LOWs (prior to crossover) and HIGHs (prior to crossunder). My bad; I will need to re-run my algorithms and I will re-post everything as Version # 2;

  • Yes, I will be able to provide Avg Win, Avg Loss, Biggest Gain, Biggest Loss, given my simplistic money mgmt testing scheme;

  • This is DOW Daily data, and would love to test on FX (preferably 4H data). My Wealthlab system has a facility to load delimeted text data (among other data formats). Only issue is that you would need to separate every CCY pair into a separate text file, and contain records that have Date, Time, High, Open, High, Low, Close, and Volume (Vol is optional, but maybe we could use it at some point).

Let me re-run everything and I will re-post, along with additional info you asked for. I am a big NCAA basketball fan, so hopefully, I won’t mix things up -:).

I’d also be willing to help. Let me know if you guys need a guinea pig!

Here is REVISION #2 of my back-tested results of Philip’s algorithm. The difference between this revision and my first posting is that I neglected to capture the prior LOW prior to Cross-over of EMA’s, and neglected to capture the prior HIGH prior to Cross-under of EMA’s. This has been fixed, by commenting out 2 lines of code, which are noted in my Code attachment. PLEASE REVIEW MY CODE TO SEE IF I’VE MADE ANY OTHER GRAVE ERRORS. This is a work-in-progress, and hopefully, will continue to evolve. And yes, the goal is to get some FX data (preferably 4H data), and run this model against that, once we shake out any bugs and/or issues.

Here are some back-tested results of Philip’s great system, using Daily DOW-30 Daily data from 1982-present (32+ years). I am not currently an FX Trader, but I plan to be. My supposition is that a trending system should work with any instruments. As Philip pointed out, stocks have largely been in an up-trend over the years, so he felt that given my data, ONLY Long trades should be used - he was correct, the system falls short (no pun attended) when using it as a Short system. The system was implemented in WealthLab Developer 3.0, which uses a robust, Pascal-like programming interface. Even if you are not a programmer, you should be able to follow along with my implemented algorithm. By the way, feel free to point out any flaws in this implementation that you see, or ask any questions about the coded algorithm, which I’m hoping you can port to your favorite back-testing system.

Here are the basics of the system:

  • Daily data for 31 DOW stocks (I added Apple and left AT&T in) from 1982-present;
  • I Start with a $250,000 account;
  • Very basic money management; I take trades which are 10% of my equity;
  • I implemented Philip’s Fib Extension rules and incorporated into the model;

I ran 3 different implementations of the system:

(1) Full Long/Short system, which uses High/Low Initial Stops, uses Fib Extensions
to preserve gains, and uses Philip’s EMA Cross, Stochastic movement to opposite
end, and stochastic cross as an Exit in the Overbought/Oversold areas (if Stops aren’t hit);

(2) Long system only, which uses High/Low Initial Stops, uses Fib Extensions
to preserve gains, and uses Philip’s EMA Cross, Stochastic movement to opposite
end, and stochastic cross as an Exit in the Overbought/Oversold areas (if Stops aren’t hit);

(3) Long system only, which eliminates initial High/Low Stops (this is what Philip
does), uses Fib Extensions to preserve gains, and uses Philip’s EMA Cross,
Stochastic movement to opposite end, and stochastic cross as an Exit in the Overbought/
Oversold areas (if Stops aren’t hit);

Here are the results of each:

(1) FULL LONG/SHORT SYSTEM (with Initial Hi/Lo Stops)

Starting Capital:   $   250,000
Ending Capital:     $ 1,579,427 
# Trades:           1,209
# Long Trades (% Winners):  56.50%
Long Trade Profit:  $ 1,989,510
# Short Trades (% Winners): 36.30%
Short Trade Profit: $ (660,083)
Overall % Winners:          47.01%
Avg Overall $ Win:  $     7,768
Avg Overall $ Loss: $    (4,832)
Avg Long $ Win:     $     8,884
Avg Long $ Loss:    $    (4,459)
Avg Short $ Win:    $     5,811
Avg Short $ Loss:   $    (5,120)
Largest Long Gain:  $   164,004
Largest Short Gain: $    33,913
Largest Long Loss:  $   (30,661)
Largest Short Loss: $   (35,486)

(2) LONG SYSTEM ONLY (with Initial Hi/Lo Stops)

Starting Capital:   $    250,000
Ending Capital:     $ 10,074,658
# Trades:         921
# Long Trades (% Winners):  55.27%
Long Trade Profit:  $  9,824,658
Avg Long $ Win:     $     35,559
Avg Long $ Loss:    $    (20,085)
Largest Long Gain:  $    855,860
Largest Long Loss:  $   (148,504)

(3) LONG SYSTEM ONLY (No Initial Hi/lo Stops)

Starting Capital: $    250,000
Ending Capital:   $ 15,731,179
# Trades:         850
# Long Trades (% Winners): 63.65%
Long Trade Profit:  $ 15,481,179
Avg Long $ Win:     $     44,842
Avg Long $ Loss:    $    (28,410)
Largest Long Gain:  $  1,222,774
Largest Long Loss:  $   (490,190)

Several revised preliminary conclusions:

  1. With the changes I made to use High PRIOR to cross-under, and LOW PRIOR to Cross-over,
    (as opposed to Highs/Lows BOTH occurring after EMA crosses), results in a much higher
    Winning % (avoids the quick STOP-outs), but overall $ returns are much worse with the
    LONG/SHORT system. Much higher Winning % with Long system (w/Initial Stops) with the
    same overall $ return and fewer overall trades (this is good!).

  2. With long-term up-trending stock market, LONG system works much better than SHORT system.
    System did not fare well in 2008 (25% loss; 32 trades; 28 of them were losers).

  3. The LONG system (w/o any Initial stops) also failed bad in 2008, but had the highest winning %
    (slightly lower than my Revision # 1 numbers, but close), the fewest trades, yet the most
    profit (higher than my initial revision #1).

  4. Regarding the dismal performance of the Long/Short implementation (system #1 above) in a
    couple of the years - I’m going to have to look at the trade data more carefully, but even though
    equities plummeted overall, I remember a lot of whipsawing in 2008: Down 5% one day, Up 2% the
    next day, Down 3% the next day, etc., etc. That could explain the poor performance, but that is
    the major intent of my analysis - will there be market conditions that could bust an account over
    a period of time? Food for thought, have to look at trades, and perhaps we can optimize entries/exits
    to guard against this, without flat out curve-fitting (cheating).

Again, this is a working model, and I would ultimately like to test in on 4 Hours (or Daily) FX
Data (so if you have any data that you want to share, send it over). This is a working
model; I plan to try to revise/optimize. This is Rev # 2.

Back-testing Wealthlab Code is attached. Again, please review it for accuracy.

Wow, amazing work doughayman!

Just took the AUD/CAD short position along with the EUR/SEK short. I might’ve jumped the gun on the EUR/SEK trade but I just love the overall trend it and where it’s positioned.

Good luck trading this week!

[QUOTE=“Shemski;688867”]Just took the AUD/CAD short position along with the EUR/SEK short. I might’ve jumped the gun on the EUR/SEK trade but I just love the overall trend it and where it’s positioned. Good luck trading this week![/QUOTE]

I’m not seeing a stochastic confirmation on AUD/CAD.

Shemski, I revised the Long/Short Trades, per your original request, to reflect Rev # 2, which I posed on this board this afternoon. Unfortunately, it’s not there yet, since I’m a Newbie, and all my posts need to be Moderator-approved.

Also, BabyPips doesn’t allow me to include .XLS attachments, so I created 3 files for you (all attached here):

  1. EMAStoch1.txt - Space-delimited file containing trades
  2. EMAStoch2.txt - This is the .XLS file, so after you download it, just rename it to an .XLS extension so Excel can
    recognize it
  3. EMAStoch3.txt - This is the new .CSV file (comma delimited) of all trades.

Why did you go short on AUD/CAD? The 20 EMA has been above the 50 EMA since last Friday?


He probably not waits for the signal/stoch crossover. But enters the trade as soon as the signal line penetrated the overbought zone.

Nice system Phil!

Yeah i consider this a failed short, so i’m attempting to pick up a 61% retracement


Strange, the 20 doesn’t cross the 50 until after i entered. I agree, the trade no longer looks good…

I hate trading any CHF pairs but the GBP/CHF looks like a nice long retracement. Going long now.

The importance of discipline in share trading cannot be obverstressed. That is because in most cases, when people are making money, greed makes them wait for more, and so they don’t book profits. When prices fall, fear makes them sell fast. These situations can be avoided if they know when to book profit/loss. For any writing work you can use this thesis writing service reviews for writing a better document in the future.

AUD/CAD trade turning around. Looks like the 20 EMA might cross back under the 50 EMA, setting up a new short entry.

Philip, could you please take a look at the pair and let me know what you think? Thanks

Well I hope Shemski can provide you with the data as I have no idea how to do that unfortunately.

I want to comment on your point no. 4 but I have to run. I will be back in half an hour or an hour to tell you what I have in mind.

Looking through the data now… Also quite challenged with it.

AUD/CAD trade looking decent, but have set my SL slightly below break-even. Will be happy o exit in the plus.
EUR/SEK not really moving… Patience I guess
GBP/CHF is my favorite right now, can’t wait for it to take off.

Anyone else enter the market this morning (day, evening, night)?

Philip, please send me a PM with your email details. I’d like to talk business with you.

Unfortunately I don’t have my original chart infront me which uses GMT candles.
I have the Trading View chart which uses Eastern Time. Looking at the chart 0.97743 or something, so you should be in the money.
It is a failed short, you should wait for stochastic to go to oversold. Then exit when stochastic main line crosses above its signal line. You still should make a profit on this one.
Note however that it could happen that by the time stochastic goes oversold, the 20 EMA crosses below the 50 EMA. In that case you don’t exit. I hope this makes sense.

There are two things I wanted to discuss;

  1. I did not choose to go long because the trend of Dow in the past was bullish. I chose to long because my bias on any stock market is bullish. My idea is in trading stocks, you cannot lose more than your investment. Even if the company goes broke you either lose the money you put in or get some of the money back.

So price can go to a set level lower, but it can go infinitely upwards. Hence my conclusion (long before applying the test. My background was actually stocks) was that any stock market is bullish by nature.

In forex on the other hand you can make infinite gains and infinite losses (given you can lose more than you invested) hence trend can go both ways.

My system initially started with trading stocks. I used to determine when to buy and when to know a particular index was about to rally or crash.

  1. On point 4 you raised. There is a potential problem we will face with the testing on forex. Basically this is a trend-following system, when the pair we are trading is in consolidation we will get whipsawed quite often.

The way I trade this is let’s say I found a short pattern in NZDUSD. I trade it and I lose money, I enter the long side (the opposite pattern). If I lose money I stop trading NZDUSD all together. I wait until it shows a clear trend (basically a winning pattern that I don’t trade). Then I start trading in that direction.

If however both longs and shorts of NZDUSD keep winning. I continue trading long and short until I face a long loser followed by a short loser. That’s my way of knowing a pair is in consolidation.

These things common sense to any human trader, but I don’t think machine traders are capable of that just yet. So we have to accept in a backtesting that we will get worse results than if we were trading ourselves.

For example not a single trader of us would have looked to long DOW 30 during the 08 crash, but the computer trader will do it. So we have to accept that worse result because the information the backtesting provide us generally is invaluable. It doesn’t mean that we will be cold and nonsensical as the computer when we trade.