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 Help 





In This Help:

Introduction
System Requirements
Download Instructions
Installation
Activation
Getting Started
    TradeStation
    eSignal
Function Description
    EasyLanguage and eSignal Formula Script
    Description of Dll module “tstrend.dll” functions
Examples
    TradeStation
    eSignal
Contact Information


Introduction

TS Trendiness is a separate Dll module for calculating the fractal dimensions of price series. TS Trendiness requires look-back period ~ 20-40 bars comparing to 10^3 bars for the Hirst index, so it can really detect local trends in prices. The TS Trendiness oscillates around 0.5 (random walk), its extreme values mean the possible beginning and the finishing of trend or range.

  • If returned value is >0.5 – then it’s trend mode;
  • Iff returned value is < 0.5 – then it’s flat mode;
  • If returned value is = 0.5 – then it’s brownian motion.

TS Trendiness is designed to work with the technical analysis software:

TS Trendiness can work with any other third party software using function TS API Dll.

System Requirements

Operating System: Windows NT/2000/XP/2003
User Access Level: Administrator
Software: Omega Research ProSuite 2000i or TradeStation 6.x/7.x/8.x or MultiCharts or eSignal/eSignal Pro
Processor: 500 MHz Pentium III or better
RAM: 256 MB (512 MB RAM is recommended)
Hard Drive: 65 MB free space
Monitor: 800x600 monitor resolution or higher

Download Instructions

In the File Download box, select Save the program to disk.
Save the file named "TSTrendinessSetup.exe" to your hard drive.

Note: If you are running Internet Explorer 5.0 or later, a dialog box will appear when the download is completed, and you will be prompted to begin installation.

Installation

When the download is completed, locate TSTrendinessSetup.exe on your hard drive and double-click the file to begin installation.

  • Launch Installation wizard and click “Next”
  • Read license agreement, select “Accept…” and click “Next”
  • Read readme information, minimum system requirements and click “Next”
  • Enter your information and click “Next”
  • Select Install Folder and click “Next”. Note: We recommend not Change Install Folder
  • Please review Installation Setting and click “Install”
  • If installation is successfully completed click “Finish”

Activation

To begin using the purchased products after installation you need to make activation of these products.

Then follow the instruction from the Products Control Center and download the purchased product and go through online activation process on your PC.

Find the detailed description of activation at our site of the Products Control center under the section: Products -> Help:
http://reg.tsresearch.com/client/products/help/

Getting Started

To work with the Dll module you need to import functions that you can use for building indicators and systems. Examples of indicators and systems are freely available as component of Dll module.

For TradeStation and MultiCharts users

Import TS Trendiness Function, and Indicators into EasyLanguage Power Editor or TradeStation

Before getting started with TS Trendiness it is necessary to import functions into EasyLanguage PowerEditor. For manual export of functions after installation enter TS Trendiness directory located in Program Files: ...Program Files\TradeSmart\TS Trendiness

  • Launch EasyLanguage PowerEditor, select Import and Export from the File menu
  • Further select Import EasyLanguage Documents or Archive File (ELD or ELA)
  • Click Browse in the popup window and indicate TS.TRENDINESS.ELD file destination (Program Files ->TradeSmart -> TS Trendiness). Select TS.TRENDINESS.ELD file.
  • And click Next, select all types.
  • Click Next, select All and Finish consequently.
  • Run TradeStation or Omega Research ProSuite
  • Create Tradestation Chart and insert example indicator "TS.TRENDINESS"
  • After recalculating indicator, you can view indicator data in TradeStation Chart.

For eSignal users

After installation Run Start menu -> Program -> TradeSmart -> TS Trendiness ->eSignal
Description of functions and parameters of indicators for TS Trendiness are located in this folder.

Before running TS Trendiness for eSignal it's necessary to copy '*.efs' files with indicators from
...Program Files\TradeSmart\TS Trendiness\EFS.ADD\
to the place where eSignal is located, so the path to examples of indicators would look like:
...eSignal\Formulas\TradeSmart\Trendiness

Then open chart in eSignal with instrument you want and choose formulas in menu:
Chart Options -> Formulas -> TradeSmart -> Trendiness
Example of indicator or system.

Choose indicator you want and attach it to chart, after calculation you will see result on chart.

In our description you can find only examples of calling functions Dll and example of builgind indicators and systems based on Trendiness. Using this library doesn't restrict only with these examples. Using Trendiness transform functions you can build any indicators and systems.


Function Description

Dll module is a separate library that contains the functions.

To work with these functions it’s necessary to call the Dll in the system or indicator code.

To simplify the work it’s possible to create additional functions in EasyLanguage or sSignal Formula Script that will call functions of the Dll module. Furthermore in the codes of your systems and indicators you can only use EasyLanguage and eSignal Formula Script functions.

For general users we recommend to use the functions in EasyLanguage and eSignal Formula Script but experienced users can call functions of Dll directly and change parameters of these functions.

We have created several functions that can be used with module Dll “tstrend.dll”.

Caution !

Two indicators or systems cannot work simultaneously with one function of the “tstrend.dll” module. If there is need to have two indicators working with one function then it’s necessary to make additional copy of Dll and call it as  “tstrend2.dll” and place it in the System32 folder. In the same time in the code of indicator or system the name of ne Dll should be used.

Description of functions for EasyLanguage and eSignal Formula Script:

TS.TRENDINESS.SERIES(Price,Max)

Calculates local fractals for price series.
Returns value of trend from 0 to 1.

  • If returned value is >0.5 – then it’s trend;
  • If returned value is < 0.5 – then it’s flat;
  • If returned value is = 0.5 – then it’s brown motion.

Parameters:
Price(Numericseries, Float) – price series, for example Close
Max(Numeric, Integer) – number or points that are used to calculate trend indice.

  • Range of values from 10 to infinity
  • Recommended value: 40
Code of function in EasyLanguage:
 
{******************************************************************* 
Name: TS.TRENDINESS.SERIES 
Analysis Type: Function 
Description : Fractal Dimension like function for TS TRENDINESS DLL use 
Used: tstrend.dll 
Provided By : Trade Smart Research (c) Copyright 2001 - 2005 
              www.tsresearch.com 
********************************************************************}
 
 
Inputs
        Price(numericseries),{Float} 
        Max(numeric); {Minimum value 2, Integer, for example: 40} 
 
Vars:    
        Min(2), {Minimum value 2, Integer} 
        Step(1);{Minimum value 1, Integer} 
 
{Declaration functions} 
defineDLLFunc"tstrend.dll"Float"TSTRENDINESS",Float,Int,Int,Int,Int
 
{Call Dll and send and receive to it of the value} 
value1 = TSTRENDINESS(Price,Barnumber,Max,Min,Step); 
if value1 > 1 then value1 = 1; 
if value1 < 0 then value1 = 0; 
 
TS.TRENDINESS.SERIES= value1; 
 
{***** 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. *****}
 




TS.TRENDINESS.BARS(Max)

Calculates local fractals for price series.
Returns value of trend from 0 to 1.

  • If returned value is >0.5 – then it’s trend;
  • If returned value is < 0.5 – then it’s flat;
  • If returned value is = 0.5 – then it’s brown motion.

Parameters:
Max(Numeric, Integer) – number or points that are used to calculate trend indices.

  • Range of values from 10 to infinity
  • Recommended value: 40
Code of function in EasyLanguage:
 
{******************************************************************* 
Name: TS.TRENDINESS.BARS 
Analysis Type: Function 
Description : Fractal Dimension like function for TS TRENDINESS DLL use 
Used: tstrend.dll 
Provided By : Trade Smart Research (c) Copyright 2001 - 2005  
              www.tsresearch.com 
********************************************************************}
 
 
Inputs
        Max(Numeric);{Minimum value 2, Integer, for example: 40} 
Vars
        Min(2),{Minimum value 2, Integer} 
        Step(1);{Minimum value 1, Integer} 
 
{Declaration functions} 
defineDLLFunc"tstrend.dll"Float"TSTRENDINESS2D",Float,Float,Int,Int,Int,Int;  
 
{Call Dll and send and receive to it of the value} 
Value1 = TSTRENDINESS2D(High,Low,Barnumber,Max,Min,Step); 
if value1 > 1 then value1 = 1; 
if value1 < 0 then value1 = 0; 
 
TS.TRENDINESS.BARS = Value1; 
 
 
{***** 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. *****}
 


Description of Dll module “tstrend.dll” functions


TSTRENDINESS(Price,Barnumber,Max,Min,Step)

Calculates local fractals for price series.
Returns value of trend from 0 to 1.

  • If returned value is >0.5 – then it’s trend;
  • If returned value is < 0.5 – then it’s flat;
  • If returned value is = 0.5 – then it’s brown motion.

Parameters:
Price(Float) – data series, for example Close

Barnumber(Integer) – number of current bar. Value of this variable should increase only with new bar and not increase until bar is not closed. This value is used to correct work in Update Every Tick mode.

Max(Numeric, Integer) – number or points that are used to calculate trend indices.
- Range of values from 10 to infinity
- Recommended value - 40

Min(Integer) - minimal cover;
- Range of values from 2 to higher
- Recommended value - 2

Step(Integer) - cover increment step;
- Range of values from 1 to higher
- Recommended value - 1

TSTRENDINESS2D(High,Low,Barnumber,Max,Min,Step)

Calculates local fractal for price series.
Returns trend indicator from 0 to 1.

  • If returned value is >0.5 – then it’s trend;
  • If returned value is < 0.5 – then it’s flat;
  • If returned value is = 0.5 – then it’s brown motion.

Parameters:
High(Float) – Value of High;

Low(Float) – Value Low;

Barnumber(Integer) – number of current bar. Value of this variable should increase only with new bar and not increase until bar is not closed. This value is used to correct work in Update Every Tick mode.

Max(Numeric, Integer) – number or points that are used to calculate trend indice.
- Range of values from 10 to infinity
- Recommended value - 40

Min(Integer) - minimal cover;
- Range of values from 2 to higher
- Recommended value - 2

Step(Integer) - cover increment step;
- Range of values from 1 to higher
- Recommended value - 1

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.