TradersEdgeSystems.com

Consulting | Custom Trading Systems
Built-In Indicators | Custom Indicators

February 2010 Stocks and Commodities Traders Tips


The 350 Swing Trade :

AIQ Version:

Original article by Barbara Star
AIQ Code by Richard Denning

The AIQ code for the 350 Swing Indicator (TFS) from the article, “The 350 Swing Trade” by Barbara Star, is shown below. The coded version that I have supplied also includes a system that can be used to test the indicator. The system only uses the author’s TFS indicator. To test the indicator in comparison to the original RSI indicator from Wells Wilder I devised a simple system based the overbought and oversold levels that the author suggested. The rules for this long only system are to go long when the TFS is below the lower level (20). The long positions are then exited when the TFS is above the upper level. When the averaging parameter (maLen) is set to 1, the system is using the standard Wells Wilder RSI. I used the Portfolio Manager module to simulate trading a portfolio of stocks from the NASDAQ 100. I set the capitalization rules to invest 10% into each stock taking no more than 3 new trades per day with up to 10 open positions at one time. When there were more than 3 signals per day, the ones with the highest relative strength values based on the AIQ relative strength report formula were chosen. All trades were simulated as placed next day market on open.

In Figure 1, I show a comparison of the equity curve for the TFS versus the equity curve for the standard RSI over the test period from December 31, 1998 through December 8, 2009. The red line is the equity curve from the original Wilder RSI system while the blue line is the TFS system. Clearly the author’s TFS indicator was the better performer during this period.

EDS Code for The 350 Swing Trade:
Three Fifty.EDS
(right click and choose Save As)



Traders Studio Version :

Original article by Barbara Star
Traders Studio Code by Richard Denning

The TradersStudio code for 350 Swing Indicator (TFS) from the article, “The 350 Swing Trade” by Barbara Star, is shown below. The coded version that I have supplied also includes a system that can be used to test the indicator. The system only uses the author’s TFS indicator. To test the indicator in comparison to the original RSI indicator from Wells Wilder, I devised a simple system based the overbought and oversold levels that the author suggested. The rules for this system are:

1) Go long when the TFS is below the lower level (20).
2) Exit long positions when the TFS is above the upper level (upperLine).
3) Also exit long positions when max bars holding (maxHold) period has been reached.
4) Go short when the TFS is above the upper level (80).
5) Exit short positions when the TFS is below the lower level (lowerLine).
6) Also exit short positions when max bars (maxHold) holding period has been reached.

When the averaging parameter (smoLen) is set to 1, the system is using the standard Wells Wilder RSI but with the shorter 3 bar length parameter. When the max bars held is set to a large number (1000) the system no longer uses the max bars holding period as an exit and is thus always in the market.

To test the indicator, I used only the S&P 500 pit-traded futures contact with data supplied by Pinnacle Data Systems over the test period from 12/31/1988 to 12/08/2009. Since the Wilder RSI is the same as the author’s TFS with smoLen =1, to test whether the 3 bar smoothing, that the author added to the Wilder RSI indicator, improved performance amounted to running an optimization that included the 1 bar parameter. We then compare the 1 bar optimization to the optimizations using a 2 and greater smoothing parameter. On the left side of Figure 1, I show a three dimensional parameter map of net profit versus the smoLen and the maxBars held. We can see that the smoothing did not improve performance when the other parameters were set as shown with the best performance occurring with a 1 bar smoothing length and a 10 bar max holding period. After running this first optimization, I used the TradersStudio genetic optimizer on all parameters simultaneously and obtained the following as suggested best net profit parameters:

RSI length - rsiLen 2
Smoothing length - smoLen 1
Sell level - upperLine 70
Buy level - lowerLine 22
Maximum holding bars - maxHold 7 or 1000

I then ran an optimization on the rsiLen and the smoLen using the other parameters from the genetic optimization. The result is shown in the three dimensional parameter map on the right side of figure 1. Here we can see that the rsiLen is the most critical parameter as the net profit falls off rapidly as the length is increased from 2. Also we see that increasing the smoLen is not adding to the net profit. My conclusion from these tests is that as far as trading the SP with this indicator, I would stick to the original Wilder RSI but use a 2 bar length. Due to time constraints, I did not run tests on other futures markets which may show different results. When I tested a similar system on stocks, I did find that the smoothing on the RSI did show significantly better results than using the original RSI with a 3 bar length.

Captions:
Figure 1: Parameter maps for the TFS system trading the SP contract. The superior performance of the 1 bar smoothing length indicates that the TFS indicator did not improve the performance of this system on this market.

Traders Studio Code for The 350 Swing Trade:
TFS System.zip
(right click and choose Save As)

 

 

 

 

 

 

 

 

 

 

 

 

 

Disclaimer | Privacy Policy | Contact Us | Spam Blocker | ©2009 Traders Edge Systems