Coding Lab – Helping you Master EasyLanguage https://easylanguagemastery.com Helping you Master EasyLanguage Tue, 24 Jan 2023 22:48:03 +0000 en-US hourly 1 https://wordpress.org/?v=7.1 https://easylanguagemastery.com/wp-content/uploads/2019/02/cropped-logo_size_icon_invert.jpg Coding Lab – Helping you Master EasyLanguage https://easylanguagemastery.com 32 32 Battle of the Oscillators…Round 2 https://easylanguagemastery.com/indicators/battle-of-the-oscillators-2/?utm_source=rss&utm_medium=rss&utm_campaign=battle-of-the-oscillators-2 https://easylanguagemastery.com/indicators/battle-of-the-oscillators-2/#comments Mon, 17 Sep 2018 10:00:21 +0000 http://systemtradersuccess.com/?p=12370

In a past article, Predictive Indicators written by John Ehlers, he highlighted a unique indicator used to time market cycles. This indicator is a heavily modified Stochastic Oscillator and was demonstrated on the S&P. In this article, I want to put John’s Oscillator to the test by comparing it to another popular indicator Backtesting Environment for this entire article, the backtest will be conducted from January 1, 2000 to December 31, 2016. I will be deducting $5 in commissions and two-ticks of slippage per round trip. I will trade one contract per signal on a $100,000 account. Profits will not be reinvested. The backtest will be conducted on a basket of index futures. The markets I will use are:

  • E-mini S&P
  • E-mini DOW
  • E-Mini NASDAQ
  • E-Mini RUSSEL 2000
  • E-Mini S&P MidCap 400

 John’s Oscillator Performance

These are interesting results and seem to verify that for these stock index markets, this indicator is a decent predictor of market turning points. We have a profit of over $434K which gives us a compounded annual rate of 10.36%. The profit factor is 1.33 and drawdown only exceeded 18% once. Let’s now compare it to another popular indicator used to locate potential turning points.

​In the 2-period RSI Oscillator I created a simple strategy to open long trades when the 2-period RSI crosses below 10 and to sell short when price crosses above 90. This is a similar concept to John’s Oscillator as both strategies are either long or short. Below are the results of this strategy.

In this case, we can see the 2-period RSI under perform John’s Oscillator. Not only does it underperform in terms of net profit, profit factor, sharp ratio, and average annual return but the drawdown is larger. We have a profit of over $235K which is about $199K less than John’s Oscillator. The compounded annual rate is 7.37%. The profit factor is 1.24 and drawdown exceeds 20% many times and peaks at around 48%. John’s Oscillator does appear to pick turning points better than the 2-period RSI on the stock index markets. Using John’s Oscillator combined with these markets might just be a great place to start building a profitable trading system. In a future article, I’m going to compare it to a few other indicators and then move to other markets such as currency futures, commodities, and bonds.


]]>
https://easylanguagemastery.com/indicators/battle-of-the-oscillators-2/feed/ 2
A Complementary Approach To Trading Technical Indicators https://easylanguagemastery.com/building-strategies/a-complementary-approach-to-trading-technical-indicators/?utm_source=rss&utm_medium=rss&utm_campaign=a-complementary-approach-to-trading-technical-indicators https://easylanguagemastery.com/building-strategies/a-complementary-approach-to-trading-technical-indicators/#comments Mon, 21 Aug 2017 10:00:08 +0000 http://systemtradersuccess.com/?p=3960

In the October issue of Futures magazine, author Jean Folger discusses an important aspect in selecting two or more indicators when developing a trading system. While I don't recommend simply combining indicators to create a trading system, and I don't think that's what Folger is suggesting either, when there comes a time to introduce two or more technical indicators to a trading system, this is when Folger's advice is relevant. The author highlights a common mistake when selecting two or more indicators that could really hinder the performance of your system. By following Folger's advice you can multiply the effectiveness of your system by selecting two or more indicators when done properly.

Types of Indicators

When it comes to technical indicators we are talking about mathematical formulas that are applied to price or volume. These technical indicators include MACD, Moving Averages, Stochastics, ADX, ATR, CCI, and many others. Folger first organized these indicators into different categories based upon what they are measuring.

  • Trend - ADX, Moving Averages, MACD, Parabolic SAE
  • Momentum - CCI, RSI, Stochastics
  • Volatility - ATR, Bollinger Bands, Standard Deviation
  • Volume - Chaikin Oscillator, OBV, Rate of Change

Selecting Two Indicators

When it comes to selecting two indicators the mistake can be from selecting two from the same category. By selecting from the same category you are measuring the same market characteristics (Trend, Momentum, Volatility, or Volume). In this case you're not getting new information about the market. For example, if you select ADX and Moving Average you are simply looking at the trending characteristics of the market. I'm a believer in keeping things simple and if you are introducing two indicators that are telling you the same thing, this is not helpful and it needlessly complicates your trading system. Each indicator should be dedicated to a specific purpose, not telling you the same thing two different ways. The point is to look at different market characteristics to expand your view. This can be done by selecting two indicators from different groups, say from Trend and Momentum. Now you are gathering complementary information about the market and are better prepared to make a decision.

Example

An example strategy will make this concept even more clear. I'll take Folger's lead and create a similar strategy used in the original article. Let's create a simple strategy for the S&P E-mini futures market. We'll use a daily chart just to keep things simple. No slippage or commissions will be deducted. Entry signals will generate with the stochastic indicator move out from its overbought/oversold regions. The system will simply reverse its current position thus, we are always in the market.

  • Go Long when the SlowD line crosses above 20
  • Go Short when the SlowD line crosses below 80

Below are the results of this strategy.

One Indicator

One Indicator

Net Profit

$4,325

Profit Factor

1.03

Total Trades

137

%Winners

58%

Avg.Trade Net Profit

$31.57

Annual Rate of Return

2.08%

Sharpe Ratio

0.06

Max Drawdown(Intraday)

$50,325

Now let's try a complementary indicator. One technique I would like to utilize a lot is the use of a simple moving average to divide the market into two different regimes: bull market and bear market. Often a 200-period moving average applied to a daily chart will work just fine. However, Folger suggested an SMA crossover method to determine the market regime. A 50-period moving average and a 60-period moving average. If the 50-period SMA is above the 60-period SMA the market is considered in a bullish regime. Otherwise the market is considered in a bearish regime. Let's apply this filter here.

  • Go Long when the SlowD line crosses above 20 and within Bull Market
  • Go Short when the SlowD line crosses below 80 and within Bear market

With these rules added to our buy condition we have introduced a trend-based filter. This should reduce unproductive trades by only taking trades in the direction of the dominate market regime. As a result this should reduce the total number of trades and increase the profitability of our strategy.

Below are the results of this strategy.

Complementary Indicators

One Indicator

Two Indicators

Net Profit

$4,325

$48,275

Profit Factor

1.03

1.5

Total Trades

137

57

%Winners

58%

47%

Avg.Trade Net Profit

$31.57

$846.93

Annual Rate of Return

2.08%

10.18%

Sharpe Ratio

0.06

0.10

Max Drawdown(Intraday)

$50,325

$34,825

As you can see using two complementing indicators can really improve the results. Keep this in mind when developing a trading system. The example trading strategy is, of course, not a tradable system. It's only an example of how applying a complementary indicator to filter trades can improve the trading system's performance. I personally use this technique a lot. It really can do wonders for a trading system. You will find below the code used in this article along with a TradeStation workspace.

]]>
https://easylanguagemastery.com/building-strategies/a-complementary-approach-to-trading-technical-indicators/feed/ 6