TradersEdgeSystems.com

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

May 2014 Stocks and Commodities Traders Tips


A Trading Method For The Long Haul

AIQ Version:

Original article by Donald W. Pendergast Jr.
AIQ Code by Richard Denning

I provide code for the Long Haul system, which is modified somewhat from the author’s descriptions.

First, I did not implement the fundamental rule but this can be done if a data source is located that can export the fundamental fields needed for each stock into a csv file. This could then be imported into the fundamental module. Also I modified the exit to add an rsi profit target and changed some of the exit parameters.

To get the system code provided to run properly, the AIQALL list of stock and groups must be installed and updated on the user’s computer. The steps to do so are to get the most recent AIQALL list from the AIQ website, then add all the stocks from the latest data disk that have trading volume greater than about 200,000 shares. We need these in order to have enough stocks to compute the group indices. Next we would download data for all the stocks in the database up to the current date.

Then as shown in Figure 1, we would set the RS Tickers to the AIQALL list and also, as shown in Figure 2, recompute all dates for all the groups in the AIQALL list. The EDS file available from the above web site has the properties set to the AIQALL list. If you are building an EDS file directly from the code file on the traders.com web site, then be sure to set the properties to the AIQALL list.

Captions:
Figure 1 – Using the AIQ Data Manager to set the RS Tickers to the AIQALL list.

Figure 2 – Using the AIQ Data Manager to compute the Group & Sector indexes for the AIQALL list.

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


 

Traders Studio Version :

Original article by Donald W. Pendergast Jr.
Traders Studio Code by Richard Denning

The following code files are contained in the download below:

  • System LONG_HAUL – a trading system that employs most of the rules outlined in the article
  • Function VOLATILITY - returns the volatility value based on a standard deviation type formula
  • Function SUMM - returns the summation value of the price array input (helper function for volatility)
To setup of the system as the author outlines, we would create a session for each group of stocks that will be traded. Independent1 should always be set to a major market index like the S&P 500 and independent2 should be set to the group index for the stocks that are included in the session. Once a session is set up for each group to be traded, a trade plan could be written that would control how many trades are accepted from each group and the size of each trade. Note that I did not write the trade plan due to time constraints. I did test the system on just one group, the NASDAQ 100 group of stocks. I set independent1 to the S&P 500 Index (SPX) and independent2 to the NASDAQ 100 Index (NDX). I did a minor amount of optimization and also added an rsi profit target exit. My code also does not implement the fundamental rule. In Figure 1, I show the equity curve and underwater equity curve for the single session trading a fixed 200 shares of each stock.

Captions:
Figure 1 – Equity curve (blue) and underwater equity curve (red) for the Long Haul system trading a single group, the NASDAQ 100 group.

Traders Studio Code:
Long Haul May 2014_TSZ.zip
(right click and choose Save As)

 

 

 

 

 

 

 

 

 

 

 

 

 

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