Algorithmic and Mechanical Forex Strategies | OneStepRemoved

  • Articles
  • Sophisticated Web Sites
  • Automated Trading
  • Testimonials
  • Contact

Identifying a Trend Change

February 19, 2015 by Richard Krivo 7 Comments

One of the questions most often asked of me is how, as a trader, do you know the trend has changed.  While it is definitely an important question, the answer is also one of the most elusive – and the answer is by no means clear cut.

Let’s take a look at a historical Daily chart of the AUDUSD currency pair below…

aud trend

 

The last candle on the left of this chart is dated December 15, 2011.  This is when the uptrend depicted on the chart began.  We can see that the uptrend consisted of price making higher highs and higher lows and breaking through the significant resistance level presented by the 200 SMA.  Also, during the uptrend the AUD was one of the strongest currencies and the USD was one of the weakest.

When all is said and done regarding the uptrend, price reached its highest point on February 29, 2012.  This bullish move to the upside lasted about two and one-half months and was comprised of roughly 1,000 pips.

So when did the downtrend begin?

To answer that, let’s look at the first range identified on the chart.

Oftentimes, when an uptrend comes to a halt, price action will trade in a range consolidating for a period of time.  The upward trend “stalls” and the pair just bides its time until the market decides how the pair will continue to move over going forward.

Trend Change

In hindsight, we can see that when price broke out of that rectangle to the downside for the first time, THAT was the official beginning of the downtrend.  However, since none of us possess that infallible crystal ball, no one knew that this was the end of the uptrend and the beginning of a prolonged downtrend.  Only the passage of time will provide us with that answer.

As traders, what do we need to see that indicates a growing potential that a trend change is happening and is likely to continue?

Let’s reverse engineer what we saw happening in the uptrend.  If we look for the opposite of an uptrend we should be looking at a downtrend.

Since higher highs and higher lows make an uptrend, than lower highs and lower lows will make a downtrend.  In looking at the right hand side of the chart we can see that this in fact is taking place.  The more this process of lower highs and lower lows continues, the greater the likelihood becomes that the trend will continue.

We also note that as this move to the downside continues, the AUD is becoming weaker and the USD is becoming stronger.

While at no point in this process is a trend change guaranteed, the more the move continues, the greater the chance becomes that a short term trend change will strengthen and continue to evolve into a long term trend change.

Let’s look at three areas that I monitor when considering whether or not a trend change has taken/is taking place.

1)  If the pair continues to make lower highs and lower lows and take out levels of prior support as it moves down, the pair is building a downtrend.  The longer that process continues, the more likely it is that there will be a trend change.  So how long is longer?  Again, there is no black and white answer. Aggressive traders will call the trend change earlier and start taking short positions sooner than will a conservative trader.

2)  As price begins to move closer and closer to the 200 SMA, the closer it gets to it the more likely that we are looking at a potential trend change.  Once it trades through the 200 SMA and closes below it, that is very compelling data that the trend has changed.

3)  If the currency in the pair that has been the stronger currency has become the weaker currency in the pair and that change continues over time, that is pointing to the probability that we are looking at a trend change.

So while there is not much certainty in calling a trend change in the short term, the above three points are what I monitor to determine if a trend is continuing or losing momentum and ultimately changing its direction.

 

All the best and good trading,

Richard Krivo

RKrivoFX@gmail.com

@RKrivoFX

Filed Under: How does the forex market work? Tagged With: AUDUSD, range, trend, trend following

Are You Sabotaging Your Projected Trend Following Profits?

February 20, 2014 by Andrew Selby Leave a Comment

It is widely understood that most of the profits from trend following and momentum strategies come from a select few big winners. Despite that understanding, traders generally don’t appreciate exactly how few trades make up that select few.

As quantitative traders, we willingly forfeit the desire to pick and choose between signals that our strategy triggers. Even though we aren’t making discretionary decisions about entries and exits, there is still a level of respect that needs to be paid to the importance of the select few trades that will drive our performance.

trend following

Missing just one trade can have a severe impact on your overall return, so if you aren’t committed to taking every trade you might be better off with a buy-and-hold strategy.

The Dorsey Wright Money Management blog published a post earlier this month that did a tremendous job of breaking down exactly how the top 20% of returns of a momentum strategy were relative to the other 80%. The post also showed how each quintile performed relative to a buy-and-hold benchmark.

Breaking Down Performance of Trades

The article took a basic sector rotation strategy that trades S&P 500 sub-sectors and broke its returns into five groups that each made up 20% of the total trades after sorting all trades by performance. They charted the performance of each of these groups and compared it to a chart of a equal-weight strategy that held all of the sub-sectors and rebalanced monthly.

The charts show that, regardless of lookback period, the bottom 60% of the strategy’s trades underperform the benchmark. The next 20% of trades just barely outperform the benchmark, and more or less match it after transaction costs. The only group that significantly outperforms the benchmark is the very top 20% of trades.

The Best Trades Are Critically Important

The point that the post is trying to make is that you absolutely must be willing and able to take every single trade that your trend following or momentum strategy produces. Omitting even one trade from the top 20% could cripple your overall performance because. Because we have no way of knowing what trades will end up producing the best profits, we cannot afford to miss out on any of them.

The article sums up this theme quite nicely:

If you are unwilling to constantly cut the losers and buy the winners because of some emotional hangup, it is extremely difficult to outperform.

Even the Best Traders Learn the Hard Way

Market Wizard Tom Basso tells a great story that fits in well here. Early in his trading career, Tom took a day off to spend the day with his parents who had come to visit him. On that day, he missed a signal for a silver trade that would have ended up being hugely profitable. That single trade would have made the difference between a profitable year and a losing year.

The moral of the story is that if you are going to trade a trend following or momentum strategy, you absolutely must be willing and able to take every single trade signal. There are no exceptions, because just one exception could ruin your performance.

Filed Under: Trading strategy ideas Tagged With: momentum, rotational strategy, trend following

Data Mining a Forex Majors Strategy

January 19, 2014 by Andrew Selby 1 Comment

Because of the unique characteristics of different currency pairs, many quantitative Forex strategies are designed with a specific currency pair in mind. While this can produce many profitable trading strategies, there are also advantages to developing strategies that can be traded across multiple currency pairs. This introduces an element of diversification that can provide an additional level of downside protection.

Daniel Fernandez recently published a system that he designed to trade on each of the four Forex majors. His goal was to find a system that would have produced a 20 year track record of profitable trading on EUR/USD, GBP/USD, USD/JPY, and USD/CHF.

forex majors

Daniel uses a data mining approach to develop a strategy for trading the four Forex majors.

In order to construct his system, Daniel used his data mining software to define entry and exit signals that would have produced a profitable trading strategy on each of the four currency pairs over the past 20 years. What he comes up with is a combination of three price-based rules that form the foundation of his Forex Majors strategy. 

Daniel’s Forex Majors Strategy

Daniel’s Forex Majors strategy is very simple in that it always has a position, either long or short, in each of the four currency pairs that it trades. It bases all of its trades on daily charts.

The strategy goes long when the following three conditions are met:

  • Close[9] > Close[10]
  • Open[158] > Low[130]
  • Close[156] > Close[173]

The strategy goes short when the following three conditions are met:

  • Close[9] < Close[10]
  • Open[158] < Low[130]
  • Close[156] < Close[173]

As you can see, the strategy is basically an optimized trend following strategy. This makes sense, because Daniel states at the beginning of his article that long-term trend following strategies are generally the best strategies for trading multiple markets.

One additional rule that Daniel’s strategy makes use of is an ATR-based stop-loss. The fixed stop-loss is set at 180% of the 20-day ATR. If the stop-loss is triggered, the strategy remains out of the market until a signal is generated in the opposite direction. Testing indicates that re-entering on a signal in the same direction negatively affected performance.

Backtesting Performance

The backtesting results that Daniel included in his post show that the strategy was quite profitable. It produced a win ratio of 45%, a profit factor of 1.38, and a reward to risk ratio of 1.68. Daniel’s biggest concern about the strategy was that the maximum drawdown period represented a very long time.

According to Daniel’s numbers, the mean annual return was 9.67%. This consisted of 16 profitable years, 4 losing years, and one year that basically broke even. The best year was a return of 37.76%, and the worst year was a loss of 20.2%.

Daniel notes that this system would not represent a good standalone strategy because of its returns relative to maximum drawdowns. However, he suggests that it could be an interesting piece of a larger, multi-system strategy.

Filed Under: How does the forex market work?, Trading strategy ideas Tagged With: data mining, forex majors, trend following

Backtesting Three Trend Following Robots

January 2, 2014 by Andrew Selby Leave a Comment

There is no shortage of publicly available expert advisors. Actually, there are so many different trading robots available that it is easy to get overwhelmed with the options.

One of the bloggers at BabyPips attempts to help narrow down the options by backtesting and publishing the results of three expert advisors they find interesting each month. This is a great resource for new traders looking for a strategy they can work with. It can also be beneficial to seasoned traders looking for new ideas or different options.

trend following robots

BabyPips found and tested three different trend following robots that each appear to have potential to be profitable.

This month, the BabyPips post focused on three trend following robots. Each of the EAs is designed to identify breakouts and then establish positions in the direction of the trend. The article backtested each of the robots from November 2012 through November 2013.

As with any backtesting data, there are pros and cons to each of these results. Any of these robots could produce dramatically different results with only a slight adjustment in market, time frame, or position sizing. For that reason, both the good and bad aspects of each EA should be taken with a grain of salt.

PZ Reversal Trend Following EA

The PZ Reversal Trend Following EA is a reversal trend following system that is always either long or short the market it is trading. It bases its position on the previous 100 bars. The robot signals a long entry when the market breaks into a new 100-bar high, and it signals a low position when the market breaks into a new 100-bar low.

The BabyPips article does not specify what market or time period it backtested this robot on, but there were eight signals generated over the course of one year. The overall profit was 5.95%. The win ratio was 62.5%. The average profit was 2.69%, while the average loss was 3.56%. The maximum drawdown for the year was 8.37%.

Maximus vX Lite EA

The Maximus vX Lite EA is designed to identify price consolidations and then either buy a break above the consolidation or sell a break below the consolidation. This robot was designed specifically for the EUR/USD currency pair.

The BabyPips article specified that it used 1-hour bars on EUR/USD for its backtest. The results were a total of 13 trades with an overall profit of 0.43%. The win ratio was 76.92% with an average profit of 6.33% and an average loss of 5.86%. The maximum drawdown was 23.98%.

Charles 1.3.3 EA

The Charles 1.3.3 EA looks to identify price breakouts and take positions in the direction of the trend. Once a position is established, the robot continues to place orders progressively in order to pyramid profits. The EA also attempts to scalp pips once a trade is profitable. It is designed to be used with any currency pair.

The BabyPips article tested this robot on the EUR/USD currency pair using 15-minute bars. That produced 310 trades with an overall profit of 35.70%. The win ratio was an impressive 88.39%, but the average profit was much smaller than the average loss. The maximum drawdown was 47.75%.

 

 

Filed Under: How does the forex market work?, Test your concepts historically, Trading strategy ideas Tagged With: expert advisors, trend following

Mixing Strategies: Trend Following with Options

December 5, 2013 by Andrew Selby Leave a Comment

I have always thought of options trading as an interesting way to leverage a trend following strategy. Dneagoy from Theta Trend has the exact opposite thoughts.

In his recent post, He discusses how he was having a difficult time trading an Iron Condors strategy on the SPY back in 2009. He quickly realized that the strategy was not going to perform well in such a strongly trending market.

trend following with options

Creatively mixing pieces of different strategies can produce interesting results. Trend Following with Options seems to be a natural combination. 

This was the catalyst for the Theta Breakout System idea that he would develop. His basic goal was to use market trends as a filter to time which option strategies to use.

Here is how he explains it:

Many options traders attempt to trade the same strategy every month, but certain strategies work better in different months than others.

The reason that certain strategies work better in some months than others is due to some combination of market and volatility conditions.

The Theta Breakout system is a way to objectively step back and be aware of what the market is doing rather than hoping some particular strategy works well.

What dneagoy was attempting to do, was define the best time to trade an options strategy with respect to a market’s trend and then only trade the strategy during those periods.

Here are his system’s entry rules:

Initiate new options positions when a new 50 day Donchian channel breakout is triggered.

The options trades are always positive theta and in the direction of the trend.

If a new 50 day high is hit, the system will sell naked puts or put verticals while new 50 day lows will trigger the system to sell naked calls or call verticals.

The exit rules are based on expected profit and loss targets:

Always exit positions if the maximum risk is hit.

Because this system has a higher than 50% probability of success, the maximum risk is also equal to the maximum credit received.

For example, if a 50 day high is made and the system sells a Put for .50 with a profit target of .45, the maximum risk should not exceed .40-.45.

In other words, I’m not willing to take a loss that will take me more than one trade to recover.

The system also utilizes a trailing stop based on an ATR multiple.

While the author has yet to provide any backtesting support for this strategy, his combination of two different strategies is an interesting concept. He does a nice job of summing up his logic:

What we’re really doing with the Theta Breakout system is taking the good parts of the Theta Trend system including well defined entry and exit points, consistency across multiple asset classes, and rules for risk management.

We’re building on the system by adding Donchian Breakouts as a trend filter for options selling.

The original Theta Trend system just used an Average True Range trailing stop and was fairly agnostic about timing while this system times the market in an effort to reduce false signals.

Obviously, this is not a complete or tradeable system. At this point it is just an idea. However, it is certainly an interesting idea. With further development and fine-tuning it could evolve into a more complete strategy.

Filed Under: Trading strategy ideas Tagged With: options, theta breakout, trend following

Getting Started With A Simple MACD Trend Following System

December 2, 2013 by Andrew Selby 2 Comments

Do you catch yourself putting off actually trading in order to continually test and refine different types of trading systems?

Allowing small details of a system to hold up their trading altogether is one of the biggest mistakes that I see new traders making. While it is never prudent to rush into trading without doing the proper homework, many beginning traders take that “proper homework” part too far.

trend following system

One key aspect of trading is ACTUALLY TRADING. This is a simple system to get you started.

Once you have a general understanding of what types of systems are out there, the best thing you can do is pick one system and start trading it. You should obviously take precautions to make sure that you are properly capitalized and implementing good risk management practices, but after that you have to learn to actually pull the trigger.

An article posted on Daily FX by Walker England provided a nice example for setting up a very simple MACD Trend Following System designed for EURCAD. The first step he identifies in his system is a method of determining the overall trend:

One of easiest ways to find the trend is through the drawing of a trendline.

Traders can connect the lows in an uptrend and find a clear area of where price is supported. Below we can find an ascending trendline on the EURCAD.

Given the information above, traders should look to buy the EURCAD as long as it remains supported.

If the trend continues, expectations are that price will remain above support and new highs will be created.

Once Walker identifies the trend, he knows that he is looking to place trades in that direction. He then uses the MACD indicator to identify his entry points:

One of the easiest ways to find a technical trigger is through the use of an indicator.

Below we can see the EURCAD daily graph, this time with MACD added.

Since we have identified the EURCAD in an uptrend traders will look to buy when the MACD when momentum returns to the underlying currency pair.

This occurs whenthe Red MACD line to crossover the Blue Signal line, prior to executing their orders.

For the risk management aspect of this simple trend following system, Walker suggests putting stops under the trendline:

When trading markets, there will always be a degree of risk.

When trading trends, it is important to know that they will eventually come to an end.

In an uptrend like the EURCAD, traders may place stops under the established line of trendline support.

In the event that price breaks under support, traders will wish to exit any existing positions and look for other opportunities

If you’ve spent any amount of time reading this site, you have probably already seen much more sophisticated strategies that contain more indepth analysis and backtesting results. That means you know enough to get started.

Even if you are just paper trading, the experience of actually trading a specific system will give you far more knowledge than reading about yet another type of trend following system.

Filed Under: Trading strategy ideas Tagged With: MACD, trend following

89/13 Day Breakout System From Trend Following

May 16, 2013 by Andrew Selby 2 Comments

Richard Dennis once said that even if he published his trading rules in the newspaper, people wouldn’t follow them. With that idea in mind, let’s take a look at a trading system that actually has been published and widely distributed.

About The System

One of the most distributed trading systems of all time can be found in the appendices of Michael Covel’s Trend Following. It is provided as a real world example of how a trend following system works. There is even some programming language included.

The system is designed to establish a position on an 89 day price breakout and exit that position on a 13 day price breakdown. It also uses a position sizing algorithm that factors in the dollar value that is to be risked on each trade but also makes sure that each trade risks less than 2% of the account. Backtesting was done across 15 commodity and currency markets over a ten year period.

The backtesting results show us that this simple system returned an average of better than 21% annually, while only profiting on 42.53% of its trades. The average winning trade was a little more than twice the average losing trade, and the maximum drawdown was 23.05%. The system has a Sharpe Ratio of 1.02, which is good, but not great.

Strategy Analysis

Like most of the systems I have looked at in this series, this would be a good starting point if you were developing a system from scratch. The system clearly has an edge, but when you factor in commissions and slippage that edge will shrink. There is also the constant threat of a Black Swan event destroying your entire portfolio.

The strong points of this system are that it is built to trade multiple markets, has a position sizing algorithm, and that is can be profitable while winning on less than half of its trades. The biggest negative of this system is that we only have 10 years of backtesting data. It would be interesting to see how the system fared from 2001 through 2012.

Position Sizing Algorithm

The most interesting aspect of this system is its position sizing algorithm. It is designed to make sure that each position is less than 2% of the portfolio, but also adjusts those positions based on the dollar value of the risk they are exposed to. The system does this by calculating the position size in two separate ways and then using the more conservative result.

The first approach simply calculates 2% of the total equity and then divides that number by the dollar value of the entry minus the stop, which is the amount being risked. This approach is just using the entry and stop to calculate how big the position can be to account for 2% of the total equity if it is unsuccessful and the stop is triggered.

The second approach takes 2% of the total equity and divides it by the dollar value of twice the average true range. This approach takes volatility into consideration, thus adding an extra layer of risk protection.

Price Breakouts

Trading breakout strategies can often seem far more complex than they actually are. Breakout systems are actually incredibly simple, however as traders, we tend to overcomplicate things. A Breakout of Breakdown is simply a new high or low for a given time period.

For example, this system uses an 89 day price breakout as an entry point. This means that the system would go long when a market hits an 89 day high, meaning the market is at its highest level for the past 89 days. In the opposite situation, where a market hits an 89 day low, the system would establish a short position.

When a position is taken, the system sets a stop at the 13 day high or low depending on the direction. If the position is long, the stop would be placed at the 13 day low. This stop value is then recalculated by the trading software every day.

Breakout Example

On this chart of the SPY, the red lines represent the 89 day highs and lows. The blue lines represent the 13 day highs and lows. These lines make it easier to visualize the breakouts that the system is looking for.

89-13 Breakout

An SPY chart showing the 89-13 breakout system

The system would have generated a buy signal when it broke through to a new 89 day high at the beginning of 2013. Having the benefit of hindsight, this was an ideal time to establish a long position. When the long position was established, a stop would have been set at the 13 day low, which is the solid blue line. That stop would have been triggered at the end of February.

There would have been another buy signal at the beginning of March. That position would have run until it was stopped out in April. Then another long position would have been taken in early May.

This system would have captured a significant portion of this markets uptrend over the first few months of 2013. This is similar to the results we have seen from other trend following systems that we have looked at. While each of these systems goes about it in a slightly different way, they are all attempting to capture significant portions of long term trends.

Filed Under: Trading strategy ideas Tagged With: breakout system, trend following

FREE trading strategies by email

Trending

Sorry. No data so far.

Archives

  • Dominari
  • How does the forex market work?
  • Indicators
  • MetaTrader Tips
  • MQL (for nerds)
  • NinjaTrader Tips
  • Pilum
  • QB Pro
  • Stop losing money
  • Test your concepts historically
  • Trading strategy ideas
  • Uncategorized
  • What's happening in the current markets?

Translation


Free Trading Strategies

Privacy PolicyRisk Disclosure

Copyright © 2023 OneStepRemoved.com, Inc. All Rights Reserved.