Login Page - Create Account

Technical Studies Reference


Study Angle


Description

This study calculates and displays the angle of a line (Subgraph) from another study on the chart. The angle is calculated based on the change in points of the Input Data over the specified Length.

To use this study, set the Based On setting in the Study Settings window for the Study Angle study to the study that you want to calculate the angle from. After this, set the Input Data Input to the specific study Subgraph name that you want to calculate the angle for.

Let \(X\) be a random variable denoting the Input Data, let \(n\) denote the Length Input, and let \(v\) denote the Value per Point Input. Then we denote the Study Angle at Index \(t\) for the given Inputs as \(\theta_t(X,n,v)\), and we calculate it for \(t \geq n\) as follows.

\(\theta_t(X,n,v) = \tan^{-1}\left(\frac{X_t - X_{t - n}}{nv}\right)\cdot\frac{180^o}{\pi}\)

The Study Angle is given in degrees, and the range of the output is between \(-90^o\) and \(90^o\). If the Study Angle is positive, then the slope of the line (Subgraph) is positive, and if the Study Angle is negative, then the slope is negative.

Inputs

  • Input Data
  • Length. The Length Input specifies the number of bars back to reference. Therefore, with a Length of 1 the angle will be calculated from the current bar being processed, and the bar before. A Length of 2 would mean that the angle will be calculated from the current bar being processed and 2 bars before.
  • Value Per Point: For more information about the Value Per Point Input, see the explanation in the Drawing a Line with a Specific Angle or Slope section on the Tools page.
  • Skip Calculation at Start of Trading Day: When this Input is set to Yes , then at the start of the trading day according to the Session Times in the chart, the study angle calculation will not be done at that chart bar and the subsequent chart bars from that bar up to the number of bars specified by the Length Input minus 1.

Spreadsheet

The spreadsheet below contains the formulas for this study in Spreadsheet format. Save this Spreadsheet to the Data Files Folder.

Open it through File >> Open Spreadsheet.

Study_Angle.231.scss


*Last modified Monday, 08th May, 2023.