TradersEdgeSystems.com

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

December 2009 Stocks and Commodities Traders Tips


Making the Most of a Trend With the Disparity Index:

AIQ Version:

Original article by Dan Valcu
AIQ Code by Richard Denning

The AIQ code for the Disparity Index (DIX) from the article, “Making The Most of a Trend with the Disparity Index” by Dan Valcu, 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 three DIX indicators. The rules for the system are to go long when the DIX200 is greater than 5 and the DIX50 is greater than 3 and the DIX10 is less than -5 (long only). Positions are exited when either the DIX10 is greater than 5 (the profit target) or a loss of 15% is incurred at the close of a bar or a profit protect exit with settings of 80% protection after a 5% profit is reached. The idea is to buy stocks that are in intermediate and long term uptrends but are pulling back on a short term basis. I did not attempt to optimize these parameters but rather just observed a chart of EMC for what appeared to be good levels and then tested the entire list of NASDAQ 100 stocks over the last ten years.

A sample trade on YHOO from the back test is shown in in Figure 1 and the results of testing all signals using the EDS module is shown in Figure 2. Although many of the metrics are excellent, the one problem is that there are too few trades and probably some trade bunching. These problems would be more obvious if we ran a trading simulation using the AIQ Portfolio Manager module which emulates real trading. The quick test shows these indicators can be used to build an effective trading system.

EDS Code for Disparity Index:
DIX.EDS
(right click and choose Save As)



Traders Studio Version :

Original article by Dan Valcu
Traders Studio Code by Richard Denning

The TradersStudio code for the Disparity Index (DIX) indicator, function and system, from the article, “Making The Most of a Trend with the Disparity Index” by Dan Valcu, 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 three DIX indicators. The idea behind the system is to buy short term pull backs against the intermediate and long term trend of the futures contract. The DIX10 is used to find the short term pull backs and the DIX50 and DIX200 indicators are used to find the intermediate and long term trend. I use three parameters that represent the level of the DIX. The rules for the system are:
1) Go long when the DIX200 is greater than “ltLvl” and the DIX50 is greater than “itLvl” and the DIX10 is less than “stLvl”.
2) Long positions are exited when either the DIX10 is greater than “stLvl” (the profit target) or a loss of 15% is incurred at the close of a bar. Positions are also exited on a reversing signal.
3) Reverse the rules 1) and 2) for the short side.

I used three of the grain futures contracts, corn, soybeans and wheat, day session only, to test the indictors. I experimented with parameters “stLvl”, “itLvl” and “ltLvl” and found that the “stLvl” was the most sensitive. I also found that small values between 0 and 1.0 represent the most relevant range. I did not change the three indicator lengths of 10, 50 and 200.

To measure the robustness of the parameter sets from the DIX system optimization, I show in Figure 1, two three-dimensional models. The left model shows the “stLvl” and the “itLvl” parameters compared to the net profit and the right model shows the same two parameters compared to the average profit per trade. I used the TradersStudio add-in to produce the three-dimensional models.

Traders Studio Code for Disparity Index:
DIX System.zip

 

 

 

 

 

 

 

 

 

 

 

 

 

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