Skip to content

Studies

andriypohorilko edited this page Apr 14, 2022 · 22 revisions

Study is the object that is responsible for charting business logic. Here you decide what your chart should display and how it should be visualized - as a candlestick, line, column, mountain, etc.

Modify Study Properties

Each of our built-in studies has editable properties, depending on the Finance Series type and indicators included in that study. These editable properties are annotated with the @EditableProperty annotation to allow you to collect all of them in one place, for example, for a study settings view.

NOTE: To see it in action, please try our SciTrader Android app.

As an example, let's take our RSIStudy and try to modify its properties. It has two of them - RSIIndicator and LineFinanceSeries:

  1. RSIIndicator has also two properties: period and input. By default, period == 14 and input == "close" which means that we want to calulate our RSI based on close prices from our candlesticks. Let's change our period to 50 and input to "open". It will produce the following result:
period == 14, input == "close" period == 50, input == "open"
RSI-14-close RSI-50-open
  1. LineFinanceSeries has its own editable properties: opacity and strokeStyle with color, antiAliasing, thickness and strokeDashArray.

NOTE: You can find more about PenStyle, BrushStyle and FontStyle in the SciChart Android Documentation

NOTE: All of these properties have some default values to have a nice chart out-of-the-box. Feel free to edit them to match your design requirements.

After some changes, your RSIStudy might look, like this:

color == Constants.DefaultBlue
thickness == 5.5f
strokeDashArray == null
color == Constants.DefaultRed
thickness == 5.5f
strokeDashArray == floatArrayOf(3f.toDip(), 3f.toDip())
blue-4-dash-null red-4-dash20-20

Built-in Studies

Finance SDK contains 14 built-in studies, available out of the box. There is on special PriceSeriesStudy that displays candlesticks and volume bars. Others represent technical indicators from the world's most famous TA-Lib (Technical Analysis) Library. Here are all of them with some images:

PriceSeriesStudy ADXStudy
PriceSeriesStudy ADXStudy
ATRStudy BBandsStudy
ATRStudy BBandsStudy
CCIStudy EMAStudy
CCIStudy EMAStudy
HT_TrendlineStudy MacdStudy
HT_TrendlineStudy MacdStudy
OBVStudy RSIStudy
OBVStudy RSIStudy
SARStudy SMAStudy
SARStudy SMAStudy
STDDevStudy StochStudy
STDDevStudy StochStudy