TradersEdgeSystems.com

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

July 2011 Stocks and Commodities Traders Tips


A Color-Based System For Short-Term Trading :

AIQ Version:

Original article by Edgar Kraut
AIQ Code by Richard Denning

The AIQ code for Edgar Kraut’s article, “A Color-Based System For Short-Term Trading”, is provided at the web sites noted below. I coded the color indicators and three systems that use the indicators. Two of the three systems are discussed below.
I ran back tests using the Portfolio Manager module from 1/1/98 to 5/13/11 trading the NASDAQ 100 list of stocks.

In Figure 1, I show the test results of simulated-trading using the system that was proposed in the article for trading the SPY with the following capitalization parameters:
1) Maximum positions per day = 3
2) Maximum total positions allowed = 10
3) Choose candidates using highest volume on the day of the signal
4) Size each position at 10% of total account equity recomputed every day

For the test period, the original system using the 1% trailing stop as the only exit showed an average annual return of 4.95% with a maximum drawdown of 78.52% on 10/09/02.

Since the drawdown of 78.52% on the original system was more than most traders could tolerate, I added trend and market trend filters and also changed the buy rules and exit rules as follows:

BUY if there is a green or blue bar today and yesterday there were six consecutive bars of orange or red color and the 200 bar simple moving average of both the stock and the SP500 index are higher than they were 10 bars ago.

EXIT if there are four consecutive bars of orange or red.

All trades for both systems are executed at the next open after a trade signal occurs and commission of $0.01 per share round turn was used. The same capitalization parameters were used in testing the modified system and the original system.

In Figure 2, I show the test results of simulated-trading the NASDAQ 100 list of stocks using this modified system. For the test period, the modified system showed an average annual return of 20.24% with a maximum drawdown of 31.55% on 05/25/00.

In Figure 3, I show the color-based indicators applied to both the price and volume on a chart of ADSK. The arrows on the chart also show a sample trade from the modified system.

Captions:
Figure 1 – Equity curve compared to the SP500 Index trading the NASDAQ 100 list of stocks over the test period 1/1/98 to 5/13/11 using the original system with the 1% trailing stop as the only exit.

Figure 2 – Equity curve compared to the SP500 Index trading the NASDAQ 100 list of stocks over the test period 1/1/98 to 5/31/11 using the modified system.

Figure 3 – Chart of ADSK with color studies and arrows showing sample trade from modified system.

EDS Code for A Color-Based System for Short-Term Trading:
ColorBased.EDS
(right click and choose Save As)



Traders Studio Version :

Original article by Edgar Kraut
Traders Studio Code by Richard Denning

The TradersStudio code for Edgar Kraut’s article, “A Color-Based System For Short-Term Trading”, is provided at the web sites noted below. I coded three systems that use the color based rules. The last input to the system determines which of the three systems is run. Here is an explanation of the system parameters:

Parameter

Default

What it does

Applies to System#

len1

15

Lookback length in bars for color rules

0,1,2

maLen

200

Simple moving average length for trend determination

1,2

trailStopPct

1

Percentage value for trailing stop

0

entryRObars

1

Count of red or orange bars in a row (minimum) for entry

1,2

exitRObars

6

Count of red or orange bars in a row (minimum) for exit

1,2

sysType

2

Chooses which of three systems to run

0 or 1 or 2

sysType = 0: system that was defined in the article with the 1% trailing stop

sysType = 1: added rule that requires certain number of orange or red bars to occur before the green or blue bar plus a rule that requires the stock’s trend to be up (200 bar simple moving average of the stock is higher than it was a certain number of bars ago; exit if there are a certain number of red or orange bars in a row.

sysType = 2: same rules as sysTypes 0 and 1 plus a rule that requires the trend to be up on the SP500 index.

I tested the above systems on the following ETF portfolio: DIA, IWM, MDY, and SPY. In testing sysTypes 0 and 1, I found that they had too much drawdown for my taste. Consequently I focused on sysType 2 by running robustness tests using the optimizer and 3-D parameter maps-see Figure 1. The system appears robust as all of the parameter sets showed a profit and there are no sharp spikes on the maps. The “len1” parameter was the most sensitive with a peak value of 16 with fall off on either side.

After examining the parameter map, I chose a parameter set of (15,200,1,1,6,2) and ran a back test using the Tradeplan module from 4/1/94 to 5/13/11 choosing the “TS_StockTradingPlanSimple” tradeplan script that ships with the product. This tradeplan divides the capital into 4 equal dollar pieces so that all signals could be taken. In Figure 2, I show the Tradeplan equity curve and in Figure 3, I show the Tradeplan underwater equity curve. Most of the drawdowns are limited to about 9%. For the test period, the compound annual return was 3.79% with a maximum drawdown of 11.88% on 7/6/2010.

Captions:
Figure 1: Three dimensional parameter maps for sysType 2 trading one share each of the ETF portfolio.

Figure 2: Tradeplan equity curve for sysType 2 using equal equity sizing, trading all signals from ETF the portfolio.

Figure 3: Tradeplan underwater equity curve for sysType 2 using equal equity sizing, trading all signals the from ETF portfolio.

Traders Studio Code for Color-Based System for Short-Term Trading:
ColorBasedSystem.zip
(right click and choose Save As)

 

 

 

 

 

 

 

 

 

 

 

 

 

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