TradersEdgeSystems.com

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

November 2012 Stocks and Commodities Traders Tips


Identify The Start Of A Trend With DMI

AIQ Version:

Original article by BC Low, CMT
AIQ Code by Richard Denning

The AIQ code for BC Low’s article , “Identify The Strart Of A Trend With DMI”, is provided at the web site noted below. Several of the terms used by the author had to be interpreted to be converted into signal code such as “cluster drifts down below level 30” , “converging”, “turning up”, etc. My interpretation might differ from what the author intended and other interpretations are possible. Also I had to come up with exits for the signals as none were given. In testing using the NASDAQ 100 list of stocks, the long only system was profitable over the test period whereas I could not get the short only system to be profitable.

To test the author’s 3X DMI system, I used the NASDAQ 100 list of stocks and AIQ’s Portfolio Manager. A long-only trading simulation was run with the following capitalization, cost and exit settings:

  • Maximum of 10 open positions
  • Size each position at 10 % of mark-to-market total capital
  • Take no more than 3 new positions per day
  • Compute the mark-to-market capital each day
  • Three cents per share was deducted for each round turn trade
  • Select trades based on the highest 14 bar ADX reading
  • Exit trades if the end of day stop loss exceeds 3%
  • Exit trades by protecting 50% of profits once profit level reaches 10%
In Figure 1, I show the resulting statistics and long-only equity curve compared to the NASDAQ 100 index. For the period 12/31/99 to 9/17/2012, the system returned an average internal rate of return of 20.7% with a maximum drawdown of 58.2% on 3/9/2009.

Captions:
Figure 1–Long-only equity curve compared to the NASDAQ 100 for the test period 12/31/99 to 9/17/12 trading the NASDAQ 100 list of stocks.

EDS Code:
DMI Trend.EDS
(right click and choose Save As)


 

Traders Studio Version :

Original article by BC Low, CMT
Traders Studio Code by Richard Denning

The TradersStudio code for BC Low’s article , “Identify The Strart Of A Trend With DMI”, is provided at the web sites noted below. The following code files are provided in the download from the websites:

  • Indicator plot: “THREE_ADS_IND” for plotting the 3X ADX indicator
  • Indicator plot: “THREE_DMIplus_IND” for plotting the 3X DMIplus indicator
  • Indicator plot: “THREE_DMIminus_IND” for plotting the 3X DMIminus indicator
  • Function: “COUNTOF” a helper function that returns the number of times a rule is true
  • System: “THREE_ADX” my interpretation of the author’s description of the four entry signal types. Exits are of my design and parameters were adjusted based on optimization.
Several of the terms used by the author had to be interpreted to be converted into signal code such as “cluster drifts down below level 30” , “converging”, “turning up”, etc. My interpretation might differ from what the author intended and other interpretations are possible. Also I had to come up with exits for the signals as none were given. I tested using a portfolio of currency futures contacts using Pinnacle data. The following symbols were used: AN, BN, CN, FN, JN and EC. I also used trade-plan code “PCTMARGINPLAN” that is provided with the TradersStudio software with the percent set to 10% to come up with the log equity and underwater equity curves shown in Figure 1. For the test period of 2/13/75 to 9/14/12, the system which trades both long and short showed an average return of 11% with a maximum drawdown of 48%. Of the 38 years in the test, 22 were profitable.

Captions:
Figure 1–Log equity & underwater equity curves for a currency futures basket from 1975 to 2012.

Traders Studio Code:
THREE_DMI_ADX_TSZ.zip
(right click and choose Save As)

 

 

 

 

 

 

 

 

 

 

 

 

 

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