TradeStation 8 Solutions   
TradeStation Solutions   
MetaStock Solutions   
Bloomberg Solutions   
Historical data tools   
Trading tools   
Genetic Optimizer   
Real-Time Portfolio Analyzer   
TradeStation to Excel Link   
Wavelet Transform   
TradeStation to MatLab Link   
Trendiness   
Help   
Buy now!   
Custom software development   
Customer support   
Our partners   
About us   
Publications   
Discussion Forum   

    RT Soft Trading tools Trendiness 




What do most of indicators of Technical Analysis represent?


«What The Thinker thinks, 
The Prover proves...»
Orr law


Most of indicators of technical analysis are linear digital filters (DF). One part of filters values the velocity of price change and another part values averaged price that is used also for measuring velocity.
The rest of indicators are nonlinear DF working similarly. Moreover, there are indicators valuating not first derivative (velocity of price change) but second derivative (velocity of velocity change or in other words acceleration). 
Other complicated methods like neural networks for measuring velocity also can be counted as linear or nonlinear DF, destined for valuation of velocity or sign of velocity. 
Most of Trading Systems are built on valuation of velocity and consist from small number of enter/exit types (that have hundreds of different names).

Example

Such famous indicators like Momentum, Trix and all types of moving averages (MA) and prices value first derivative. For example, systems applying two moving averages from example for Genetic Optimizer – it is signal on valuation of velocity sign. Momentum is difference between two prices, today and K bars back – velocity of moving average K length.
Indicator MACD – zone filter, difference between two moving averages or in other words aligned valuation of velocity. Signaling line in MACD – it is additional alignment of velocity. Calculation of signaling line from basic line MACD is valuation of second derivative - acceleration or powers impacting price.
Well known oscillators RSI and Stochastic – valuation of velocity and crossover of their levels inside. It is signal on valuation of sign of second derivative. 
Velocity is preemptive indicator for price. If price goes up (velocity is positive), but acceleration (second derivative) is negative, it means that velocity decreases and there is possibility of zero velocity and price reversal. Therefore acceleration can be assumed as preemptive indicator.

What do most trading systems use?

Almost all trade systems, possibly excepting systems based on trend identification, are based on valuation of velocity of price change or valuation of price acceleration. 
For example, disruptions of several levels (it seems there are no average or derivative) – it is difference between current price and some average (or maximal) for period – ie., it is also valuation of derivative. 

A bit of History 

Charles Dow in his famous theory determined that prices changes as directional trends until direction will change to opposite. But classical economy at that time declared that prices changes according to Brownian motion (L. Bachelier). Truth rather is somewhere in the middle. There are both directional trends and random Brownian motion in price behavior. 

In the second half of XX century it was discovered that a lot of natural phenomena (clouds, trees, length of coastline etc.) and price changes can be described by fractal structures (B.Mandelbrot, The Fractal Geometry of Nature, W.H. Freeman, San Francisco,1982.). 

What is fractal? 

Fractals are forms or structures, which look equally on different scales. For price series it is well known from times of Charles Dow (end of XIX century). Looking at diagram it is difficult to say of what scale are data – day or week. Price behaviors on different time frames are similar outwardly, although there are several differences also. Only actual fractals shouldn’t be mistaken for those “fractals” described by big specialist on “crocodiles” and “butterflies” Bill Williams. 

Formally as fractal can be termed set with Hausdorff dimension bigger than topological dimension. Practically it arises in fractional dimension of the set. For example, it is length of coastline or price diagram. If we measure their length on one scale (time frame), than on more detailed scale (time frame) the length would be bigger than if it would be usual line. 

Fractal dimension – numerical characteristic of trend

Popular measure of fractal dimension is Hirst parameter H (Edgar E. Peters, Fractal Market Analysis. Applying Chaos Theory to Investment and Economics, John Wiley & Sons, 2003.). Problem of this method applied on price series is that for correct calculation of Hirst parameter it is necessary to have thousands of bars, what is too much in comparison to duration of traded trends. Random walk has Hirst parameter of 0,5 value. Other values show difference between time series and random walk. Hirst parameter shows what dominates in time series – trend or contra – trend component, or series behave randomly. 

Can it be used in practice? 

It can be used in practice, if use variation index offered by M.M. Dubovikov and N.V. Starchenko (Ì.Ì. Dubovikov, N.V. Starchenko, Variation index and its application to analysis of fractal structures. scientific almanac "Gordon", Moscow 2005). Variation index analogical to Hirst parameter allows using data by two lines less than in calculation of Hirts parameter itself. In other words we can calculate Hirst parameter by using several tens of bars instead of several thousands. 

Implementation in practice

Modification idea of variation index lies in a base of algorithm realized in module Dll TS Trendiness. For correct calculation of the index it is enough with several tens of bars (recommended 30-40), what is quite comparable to duration of trends. Given indicator can be applied on any time frames and different trade platforms (TradeStation, eSignal, MultiCharts).

General rules for applying the indicator are as follows:
  • Indicator value less than 0,5 means contra – trend market situation.

  • Extremely low value often precedes beginning of significant trends.

  • Indicator value more than 0,5 means trend market situation.

  • Extremely high value often precedes end of significant trends.
    Indicator value around the 0,5 means uncertain market situation, what corresponds to Brownian motion.

Given function can be used in other systems and indicators, for example, to create adaptive filters or systems, what will be automatically adapting to current market situation. 

You can see examples how function works on different markets:
TradeStation Chart QQQQ 1 min Nasdaq - 100 Trust
TradeStation Chart QQQQ 1 min Nasdaq - 100 Trust

MultiCharts @EMD Daily E-Mini S&P Continious Contract
MultiCharts @EMD Daily E-Mini S&P Continious Contract

eSignal Advanced Chart MSFT Daily Microsoft Corporation
eSignal Advanced Chart MSFT Daily Microsoft Corporation

TradeStation Chart CLZ05 Daily Crude Oil Dec 2005
TradeStation Chart CLZ05 Daily Crude Oil Dec 2005

TradeStation Chart EURUSD Daily Euro/US Dollar
TradeStation Chart EURUSD Daily Euro/US Dollar

TradeStation Chart @EC Daily Euro FX Continious Contract
TradeStation Chart @EC Daily Euro FX Continious Contract



Examples

Examples of indicators are given below that you can use when building your own indicators using TS Trendiness functions.

EasyLanguage:
 
{******************************************************************* 
Name: TS.TRENDINESS.BARS 
Analysis Type: Indicator 
Description : Fractal Dimension like function for TS TRENDINESS DLL use 
Used: TS.TRENDINESS.BARS Function 
Provided By : Trade Smart Research (c) Copyright 2001 - 2005  
              www.tsresearch.com 
********************************************************************}
 
 
Inputs
        Max(40);{Minimum value 2, Integer, for example: 40} 
 
 
Value1 = TS.TRENDINESS.BARS(Max); 
 
Plot1(Value1, "TrendBars");  
 
{***** Copyright (c) 2001-2005 Trade Smart Research.  
All rights reserved. www.tsresearch.com ***** 
***** Trade Smart Research reserves the right to modify  
or overwrite this analysis technique with each release. *****}
 

EasyLanguage:
 
{******************************************************************* 
Name: TS.TRENDINESS.SERIES 
Analysis Type: Indicator 
Description : Fractal Dimension like function for TS TRENDINESS DLL use 
Used: TS.TRENDINESS.SERIES Function 
Provided By : Trade Smart Research (c) Copyright 2001 - 2005  
              www.tsresearch.com 
********************************************************************}
 
 
Inputs
        Price(close),{Float, for example Close, (H+L)*0.5 and etc.} 
        Max(40);{Minimum value 2, Integer, for example: 40} 
         
                                                      
Value1=TS.TRENDINESS.SERIES(Price,Max); 
 
Plot1(Value1,"TrendSeries"); 
 
{***** Copyright (c) 2001-2005 Trade Smart Research.  
All rights reserved. www.tsresearch.com ***** 
***** Trade Smart Research reserves the right to modify  
or overwrite this analysis technique with each release. *****}
 

eSignal Formula Script:

 /******************************************************************* 
 Name: TS.Trendiness.Series 
 Analysis Type: Indicator 
 Description: Example Indicator for Trendiness DLL 
 Used: tstrend.dll 
 Provided By: Trade Smart Research (c) Copyright 2001 - 2005 
          www.tsresearch.com 
 *******************************************************************/

 
 
 var v,vmin,vstep,vmax;
 
 /* Defining DLL */
 var d = new DLL("tstrend.dll"); 
 
 /* Function Declaration */
 d.addFunction("tstrendiness", DLL.FLOAT, DLL.STDCALL,"TSTRENDINESS", DLL.FLOAT,DLL.INT,DLL.INT,DLL.INT,DLL.INT); 
 
 
 /* Preparing parameters and array*/
 function preMain() {
     setPriceStudy(false);
     setStudyTitle("TS Trendiness Series");
     setCursorLabelName("TS Trendiness Series", 0);
     setDefaultBarStyle(PS_SOLID, 0);
     setDefaultBarFgColor(Color.red, 0);
     setDefaultBarThickness(1, 0);
     setPlotType(PLOTTYPE_LINE, 0);
           
     var fp1 = new FunctionParameter("Max", FunctionParameter.NUMBER);
     fp1.setLowerLimit(40);
     fp1.setUpperLimit(1000);        
     fp1.setDefault(40);
     
     var fp2 = new FunctionParameter("Source", FunctionParameter.STRING);
     fp2.setName("Source");
     fp2.addOption("Close");
     fp2.addOption("High");
     fp2.addOption("Low");
     fp2.addOption("Open");
     fp2.setDefault("Close");  
 }
 
 function main(Max,Source) {
 
    if (Max==null) Max=40;
    if (Source==null) Source="Close";
    
    
    /* determinig source */
    aSource=getValue(Source,0,-1);
    nBarIndex = getNumBars()+getCurrentBarIndex();
     
    vMax=Max;
    vMin=2;
    vStep=1;
  
    v = d.call("tstrendiness",aSource[0],nBarIndex,vMax,vMin,vStep);
    if (v>1) {v=1};
    if (v<0) {v=0};
    return v;
 }

eSignal Formula Script:

 /******************************************************************* 
 Name: TS.Trendiness.Bars 
 Analysis Type: Indicator 
 Description: Example Indicator for Trendiness 2D DLL 
 Used: tsewvl.dll 
 Provided By: Trade Smart Research (c) Copyright 2001 - 2004 
          www.tsresearch.com 
 *******************************************************************/

 
 
 var v,vmin,vstep,vmax;
 
 /* Defining DLL */
 var d = new DLL("tstrend.dll"); 
 
 /* Function Declaration */
 d.addFunction("tstrendiness2d", DLL.FLOAT, DLL.STDCALL,"TSTRENDINESS2D", DLL.FLOAT,DLL.FLOAT,DLL.INT,DLL.INT,DLL.INT,DLL.INT); 
 
 
 /* Preparing parameters and array*/
 function preMain() {
     setPriceStudy(false);
     setStudyTitle("TS Trendiness Bars");
     setCursorLabelName("TS Trendiness Bars", 0);
     setDefaultBarStyle(PS_SOLID, 0);
     setDefaultBarFgColor(Color.red, 0);
     setDefaultBarThickness(1, 0);
     setPlotType(PLOTTYPE_LINE, 0);
           
     var fp1 = new FunctionParameter("Max", FunctionParameter.NUMBER);
     fp1.setLowerLimit(40);
     fp1.setUpperLimit(1000);        
     fp1.setDefault(40);
     
 }
 
 function main(Max) {
 
    if (Max==null) Max=40;
 
       
    /* determinig source */
    
    aSource1=getValue("High",0,-1);
    aSource2=getValue("Low",0,-1);
    nBarIndex = getNumBars()+getCurrentBarIndex();
 
     
    vMax=Max;
    vMin=2;
    vStep=1;
  
 
  v = d.call("tstrendiness2d",high(0),low(0),nBarIndex,vMax,vMin,vStep);
    if (v>1) {v=1};
    if (v<0) {v=0};
    
    return v;
 }
 





All names and trademarks used on these web pages are registered by their respective companies
© 1998-2007 RT Soft, Ltd. All rights reserved.