QuantStudio Financial Data Analysis and Trading Framework

TR Class

True Range (TR)

For a list of all members of this type, see TR Members.

System.Object
   RQuant.Indicator.TTimeArray
      RQuant.Indicator.TDoubleArray
         RQuant.Indicator.TIndicator
            RQuant.Indicator.TR

[Visual Basic]
Public Class TR
    Inherits TIndicator
[C#]
public class TR : TIndicator

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Welles Wilder developed True Range to create a tool for a precise and realistic calculation of the market?s price activity. This value is considered when calculating the directional movement of a market. Mr. Wilder defined the True Range to be the greatest for the following periods:
- The distance from today?s high to today?s low.
- The distance from yesterday?s close to today?s high.
- The distance from yesterday?s close to today?s low.

True Range measures market volatility and is used as part of the calculation of other indicators, such the Directional Movement System and Average True Range, to identify the directional movement of a market.

This indicator is described in more details in the Steve Achelis' book "Technical Analysis from A to Z".

Formula:

Example

TDataManager.cd("Demo");

TDailyArray Daily1 = TDataManager.GetStock("YHOO").DailyArray;

DateTime Date1 = DateTime.Parse("1999/02/08"); 
DateTime Date2 = DateTime.Parse("2000/12/29"); 

TDailyArray Daily = Daily1.Clone(Date1, Date2);

TCanvas Canvas = new TCanvas("Canvas","TR DEMO",600,400);
    
Canvas.Divide(1,2);

TR TR = new TR(Daily);

Canvas.cd(1);
Daily.Draw("c");

Canvas.cd(2);
TR.Draw(Color.Red);

Requirements

Namespace: RQuant.Indicator

Assembly: RQuant.Indicator (in RQuant.Indicator.dll)

See Also

TR Members | RQuant.Indicator Namespace