From the May 2013 issue of Futures Magazine • Subscribe!

Creating custom indicators

A technical indicator is used to provide a distinctive perspective of market activity that may be unavailable by simply viewing price charts. Each indicator is essentially its own program that tells the computer what data to use, which calculations to apply and how to display the results. While there are hundreds of readily available technical indicators, such as moving averages and stochastics, some traders may wish to design their own indicators to perform specific functions or spot unique conditions in the market.

Many of today’s trading platforms enable users to program their own custom indicators using some sort of proprietary language (such as TradeStation’s EasyLanguage or NinjaTrader’s NinjaScript) that interprets the concept for the computer. A list of commands is written in a specific syntax (known as the code), and after the code is entered into the trading platform, it is compiled or verified by the computer. Then it can be displayed as an indicator on a chart.

Here, we introduce a step-by-step process for building a custom indicator, using as an example the Volumizer indicator, designed to evaluate the relationship between average price and average volume. The graphic in “Go with the flow” (right) provides an overview of the development process that we will use.

Define the concept

The idea for a custom indicator can come from fields outside of trading; for example, a trader may wish to apply an idea from mathematics, statistics or simply the result of observation. A trader might notice a specific price or volume tendency, or an intermarket relationship and decide to investigate further. This is critical: It is important to have a specific goal in mind before attempting to develop an indicator, and traders must be able to verbally (and eventually mathematically) express what it is that they want the indicator to do.

For our example, we use a daily price chart of the SPDR S&P 500 exchange-traded fund, with volume inserted as a sub-chart. From observation, there appear to be trading opportunities as price and volume diverge and converge (see “Behind the moves,” below). Further, it seems that there are often changes in the average volume preceding strong market trends.

Because we are looking at price and volume on two completely different scales, however, it is almost impossible to measure this type of movement in this context objectively. If we were simply to superimpose volume on an existing price chart, the relationship between price and volume would be distorted by the scaling of the chart. In other words, more data (a wider chart) would provide a much different relationship between average price and volume than a chart with less data (a narrower chart). This would render this type of trading analysis useless because it would be subjective and, thus, difficult to reproduce for the purpose of making consistent trading decisions in the future.

This is where a custom indicator can help confirm (or negate) the hypothesis that divergence and convergence between average price and average volume may be an early indicator of strong price trends. Our next step is to combine these two data sets into a single indicator to visualize the analysis and help determine if it has merit as a trading indicator.

Page 1 of 4 >>
Comments
comments powered by Disqus
Check out Futures Magazine - Polls on LockerDome on LockerDome