Chart Studies

A simple definition of a Study is that it is a graph of the results from a formula applied to the entire series of data elements in a chart. A study may also be called an indicator. In Sierra Chart they are called studies.

See the Technical Studies Reference documentation page for information on the available studies. In Sierra Chart, you can also create your own custom study by using the Spreadsheet Study or by using the Advanced Custom Study Interface and Language.



Adding/Modifying Chart Studies

  1. Open or go to an already opened chart for which you want to add studies to, or modify the studies of.
  2. Select Analysis >> Studies on the menu or press the F6 key on your keyboard to display the Chart Studies window.
  3. To Add a study, select a study in the Studies Available list box (see image to the right) and then press the Add button. Any number studies can be added to a chart and even the same study can be added more than once to the chart. For example, you can add 2 Moving Averages to the chart, each with a different Length input.

    Advanced Custom Studies from DLL files (these are studies developed by other developers) can be added by pressing the Add Custom Study button. The names of all the Advanced Custom Study files will be listed on the Studies list on the Add Study window. Press the + sign to the left of the Advanced Custom Study file name to list all of the available Custom Studies within that file.

    To add a study to the chart, select the custom study from the list and press the Add button. For additional information, refer to the How to Use an Advanced Custom Study page.
  4. To Modify the settings for a study, select the study in the Studies to Graph list box and press on the Settings button to open the Study Settings Window for the study.

    On the Study Settings window you will see two tabs. The Settings and Inputs tab is for setting the study's Inputs and various other settings. The Subgraphs tab sets various appearance settings for the study's subgraphs. This includes the Draw Style and Color of each Subgraph. Each line in a study is called a Subgraph. Although, not all Subgraphs are continuous lines. For example, the Bar Draw Style are individual vertical lines at each chart column that are all related to each other and are considered one subgraph.
  5. When you are done, press the OK button on the Study Settings window for a study, if it is open. If not, go onto the next step.
  6. Press the OK button on the Chart Studies window to apply your studies and changes to the chart.
  7. To quickly modify the settings for a study after it is on the chart, refer to the Quick Access to Study Settings section.

Note: For the Subgraphs in a study graph to be visible, you need to have enough data in the chart. For example, a Moving Average study with a Length of 10 needs at least 10 bars of historical data in the chart. If there are only 10 bars in the chart, then you will only see one point of data in the Moving Average graph.

Chart Studies Window

Open the Chart Studies window by selecting Analysis >> Studies on the menu.

Access to Study Settings

Studies Available

Lists all available studies that can be applied to a chart.

Studies To Graph

Lists the studies that will or are currently applied to the chart.

Add

Adds the selected study in the Studies Available list box to the Studies To Graph list box. If you wish to add the same study more than once, then press the Add button twice.

Move Up / Move Down

Moves the selected study in the Studies To Graph list box, up or down one level.

This is useful for adjusting the study display order on the chart, study calculation order, or the display order of studies on a Spreadsheet when using one of the Spreadsheet studies.

If you are using one of the Spreadsheet studies, then the order studies that will be displayed on the Spreadsheet is the same as this list.

Settings

The Settings command button displays the Study Settings Window for the selected study in the Studies To Graph list box.

To select a study, just select its name in the Studies to Graph list box with your Pointer. A study must be first added to the Studies to Graph list box before you can adjust the settings for it.

Duplicate

The Duplicate command button duplicates the selected study in the Studies To Graph list box and creates an exact copy of it using the same settings.

Another way to apply a study to a chart is to say that single study as a Study Collection that contains a single study. Refer to Study Collections. Make sure to enable the option to Prompt to Remove Existing Studies.

Remove

Removes the selected study in the Studies To Graph list box. Press OK or Apply to actually remove the study from the chart.

Save Studies as Study Collection

These controls are for Study Collections:

  • Save Single
  • Save All
  • Delete Study Collections List
  • Delete
  • Prompt to Remove Existing Studies

Refer to the Study Collections page for complete documentation.

Add Custom Study

Opens the Add Custom Study window. This window allows you to add Advanced Custom Studies to the chart. The Advanced Custom Studies are contained within DLL (dynamic Link Library) files. These DLL study files need to be located in the Sierra Chart Data Files Folder. You can find this folder by selecting Global Settings >> General Settings on the menu.

OK

Saves all changes, closes the window and calculates the studies.

Cancel

Cancels all changes and closes the window.

Apply

Saves all changes and calculates the study while keeping the window open.

Help

Displays this page.

Study Settings Window

The Study Settings window is for entering and adjusting the settings for a study on the chart. To open the Study Settings window for a study, follow these steps:

  1. Open the Chart Studies window if it is not already open by selecting Analysis >> Studies on the menu.
  2. Add the study to the Studies To Graph list on the Chart Studies window, if it is not already added.
  3. Highlight the study in the Studies To Graph list by selecting it with your pointer.
  4. Press the Settings button on the Chart Studies window to display Study Settings window.
  5. For more details, refer to Adding/Modifying Studies.

OK

The OK button saves all changes and closes the window.

Cancel

The Cancel button cancels all changes and closes the window.

Help

The Help button displays this page.

Settings and Inputs tab

To access the Settings and Inputs for a study, refer to Adding/Modifying Chart Studies.

Inputs

The Inputs list box displays the input settings for the study which control various parameters of the study. To adjust an Input, click on its name in the list and enter or select the new value in the control box or boxes just below the list.

Based On - Basing a Study on Another Study

The Based On setting on the Settings and Inputs tab of the Study Settings window supports basing a study another study. For example, you could apply the Moving Average study to a Volume study. Follow the instructions below.

Not all studies support being based on other studies. For example, studies that rely on two or more of the Open, High, Low, or Close values of chart bars usually cannot be based on other studies unless they have Input Data inputs to control what specific Subgraphs to reference in the study they are based on.

  1. Open the Study Settings window for a study by following the instructions in the Adding/Modifying Chart Studies section on this page.
  2. Select the Inputs and Settings tab.
  3. Select from the Based On list the study to base the study that the Study Settings window is open for, on. Only studies which are already added to the Studies to Graph list on the Chart Studies window will be listed. It is necessary for a study to be in that list in order to base a study on it. If you want to base a study on the main price graph, then select <Main Price Graph>.
  4. When you base a study on another study, then the inputs named Input Data will list the Subgraphs of the study you are basing your study on. After setting Based On, you will need to choose the appropriate Subgraph listed in these Input Data inputs. This is especially important when basing a study that normally is based on the main price graph and refers to Open, High, Low, or Close/Last values from that main price graph. Those Input Data Inputs now need to refer to the appropriate Study Subgraphs it is based on.
  5. Adjust the Chart Region setting for the study to the same region as the study you are basing it on, if you want it displayed in that same region.
  6. If you wish to hide the study that you Based your study on because it is not in itself useful for you to view, then enable the Hide Study setting on the Study Settings window for that study.
  7. Press OK.

Short Name

Use the Short Name setting to give a study a short or custom name to display as an alternative to the default study name in the Region Data Line for the chart region where the study is located on the chart and to display in the Chart Values windows. This name is also displayed on a Spreadsheet where the study is outputted to when using one of the Spreadsheet studies. In the case of the Spreadsheet studies, the original name is displayed in (). Example: YourCustomShortName (Moving Average-Simple).

Chart Region

Use Chart Region drop-down list to set the region to display the study in.

There are 12 regions in a chart. Region 1 is at the top of the chart window. It is where the main price graph is located. Regions 2 through 12 are below the main price graph.

Regions 2 through 12 are only displayed if a study is set to display in one of them.

  • Overlaying Studies in the Same Chart Region on a Chart

    Follow the instructions below to overlay 2 studies in the same Chart Region on the chart.

    1. Select Analysis >> Studies from the Sierra Chart menu.
    2. Add the 2 studies to the chart. For instructions, refer to Adding/Modifying Chart Studies.
    3. Select one of the studies and press the Settings button to display the Study Settings window for the study.
    4. Set the Chart Region box to 2 or whatever chart region you want it displayed in.
    5. Note: If you are overlaying studies that have significantly different scales, then it is necessary to set one of them to an Independent scale. On the Study Settings window for the current study, which is already open, press the Scale button and set the scale to Independent.
    6. Press OK.
    7. Repeat steps 2 and 3 above for the other study. Make sure this other study is set to the same Chart Region as the other study you require in the same Chart Region.
    8. Press OK and OK again.
    9. If you require to see the scale for each of these studies, then select Chart >> Chart Settings >> Advanced Settings. Enable the Use Left Side Scale option.
  • Overlaying a Study on the Main Price Graph

    It is also supported to set the Chart Region to 1 to overlay the study on the main chart graph.

    1. For example, if you want to overlay a stochastic on the main price graph, then Select Analysis >> Studies from the Sierra Chart menu.
    2. Add the study that you want to overlay in Chart Region 1 by selecting it from the Studies Available list.
    3. Press the Add button.
    4. Press the Settings button to display the study settings.
    5. Set the Chart Region box to 1.
    6. On the Study Settings window, which is already open for the study, press the Scale button and set the scale to Independent. Refer to the image below.
    7. Press OK and OK again.
  • Displaying a Scale on the Left Side for the Overlay Study

    In the case where there is more than one study in the same Chart Region or you have a study displayed in the main price graph region, you may want to see the scale for the second and additional studies. To do this you will need to enable the Left Side Scale.

Value Format

Use this drop-down list to set the format for displaying the study values. If you choose Time, then the study values will be displayed as times. This is only valid if the study values actually contain valid time values. If you choose Inherited, then the Price Display Format set under Chart >> Chart Settings is used.

Scale

The Scale button displays the Scale window. The controls in that window set the scale used for the study graph. For complete information about the Scale window, see the Scale Window documentation page.

Hide Study

When this option is enabled the study will be hidden from the chart. The Study name and thename and value for Subgraphs will also not be displayed in the Chart Values Windows. The usefulness of this option is that you can effectively disable the display of a study without actually removing it from the chart, and still retain its settings and calculation functionality.

Display As Main Price Graph

This option is in the Settings and Inputs tab for a study.

When Display As Main Price Graph is enabled, the study will be displayed as the main price graph in the chart. It will replace the underlying price bars the study is based on and the study itself will become the new underlying data for any other studies on the chart.

For example, if you enable this option on the Difference (Bars) study, then any other studies added to the chart will be based directly on this study and not the original main price graph.

This option can also be used on the Spreadsheet Study study. Using this feature with the Spreadsheet Study can be a very useful feature and will let you do many things with Sierra Chart.

This option is also very useful to create currency cross rates by using it with the Ratio study and two currency charts.

If using this option with the Spreadsheet Study, then the K column is the Open price, the L column is the High, the M column is Low, and the N column is the Close.

Draw Study Underneath Main Price Graph (in the same Chart Region)

To access the Draw Study Underneath Main Price Graph setting, open the Study Settings window for the study. Select the Settings and Inputs tab.

When the Draw Study Underneath Main Price Graph option is enabled and the study is displayed in Chart Region 1, then the study will be drawn directly underneath the main price graph bars instead of above them.

Protect with Password

For complete documentation for this feature, refer to Password Protecting Studies.

Spreadsheet Name / DLL File and Function Name

For Spreadsheet studies, this is the name of the Spreadsheet file the study is associated with. In this case do not specify a file extension.

For Advanced Custom Studies, this is the DLL (Dynamic Link Library) file name and function name for the study in the format: [DLL File Name].[External Function Name] (Example: MyDll.MyFunction).

Subgraphs Tab

The Subgraphs tab of the Study Settings window contains the individual settings for each of the Subgraphs that are used in the study, as well as settings that affect all Subgraphs.

The list box at the top of the tab lists the Subgraphs which are used by the study.

Select the individual Subgraph in that list you want to change the settings for and use the controls below to change its settings.

Each line in a study is called a Subgraph. Although not all subgraphs are continuous lines. For example, the Bar Draw Style are individual vertical lines at each chart column that are all related to each other and are considered one Subgraph.

Subgraphs Tab

Follow these steps to go to the Subgraphs tab for a study.

  1. Select Analysis >> Studies on the menu.
  2. Select a study in the Studies to Graph list. If you have not already added the study to the chart, then Add it.
  3. Press the Settings button.
  4. Select the Subgraphs tab on the Study Settings window.
  5. Select the individual Subgraph in the list at the top of the Subgraphs tab that want to change the settings for and use the controls below to change its settings.

Subgraphs >> Graph Draw Type

For studies that use a price graph type of drawing, support the Graph Draw Type setting. This setting lets you choose between various Graph Draw Types which include Open High Low Close (OHLC) bars and Candlestick bars.

Choose the Graph Draw Type that you require.

For studies that support the Graph Draw Type setting, the individual Subgraphs only support a Draw Style of Visible or Ignore.

This control is disabled for Studies which do not support a price graph type of drawing.

Subgraphs >> Color

Click on this button to set the color of the subgraph. Some Subgraphs may allow you to set two colors, and this is shown by two buttons instead of one.

Subgraphs >> Draw Style

The Draw Style drop-down list allows you to select the Draw Style for a study Subgraph.

  1. To set the Draw Style for a Subgraph, open the Study Settings window for a study.
  2. Select the Subgraphs tab.
  3. In the list of Subgraphs, select the particular Subgraph you want to modify the Draw Style for.
  4. If you want to hide a Subgraph, set the Draw Style for it to Hidden or Ignore. Refer to the descriptions below for these.

The available Draw Style types are listed below.

References to ACSIL in parentheses indicate the actual constant value that can be assigned to sc.Subgraph[].DrawStyle. ACSIL = Advanced Custom Study Interface and Language.

Line (ACSIL: DRAWSTYLE_LINE)

A standard continuous line Draw Style.

Bar (ACSIL: DRAWSTYLE_BAR)

A bar style where a line is drawn from 0 to the value of the Subgraph at the corresponding chart column.

Point (ACSIL: DRAWSTYLE_POINT)

A point or circle.

Dash (ACSIL: DRAWSTYLE_DASH)

A dash which is the width of the chart bars.

Hidden (ACSIL: DRAWSTYLE_HIDDEN)

This style does not draw the Subgraph. However, the Subgraph data still is included in the displayed Scale Range.

Ignore (ACSIL: DRAWSTYLE_IGNORE)

This style does not draw the subgraph. The subgraph data is not included in the displayed scale range.

Stair Step (ACSIL: DRAWSTYLE_STAIR)

A stairstep draw style.

Square (ACSIL: DRAWSTYLE_SQUARE)

A single independent square draw style.

Square Left Offset (ACSIL: DRAWSTYLE_SQUAREOFFSETLEFT)

An independent square draw style. The square's right side is offset to the left of the bar.

Square Left Body Offset (ACSIL: DRAWSTYLE_SQUAREOFFSETLEFTB)

An independent square draw style. The square's right side is offset to the left of the bar based on the candlestick body width.

Star (ACSIL: DRAWSTYLE_STAR)

An independent star draw style.

Plus (ACSIL: DRAWSTYLE_PLUS)

An independent plus sign draw style.

X (ACSIL: DRAWSTYLE_X)

An independent 'X' draw style.

Arrow Up (ACSIL: DRAWSTYLE_ARROWUP)

An independent up arrow draw style.

Arrow Down (ACSIL: DRAWSTYLE_ARROWDOWN)

An independent down arrow draw style.

Arrow Left (ACSIL: DRAWSTYLE_ARROWLEFT)

An independent left arrow draw style.

Arrow Right (ACSIL: DRAWSTYLE_ARROWRIGHT)

An independent right arrow draw style.

Fill Top (ACSIL: DRAWSTYLE_FILLTOP) and Fill Bottom (ACSIL: DRAWSTYLE_FILLBOTTOM)

These two Draw Styles are used in combination to fill the area between the two Subgraphs that are set to them. With these draw styles, the edges of the fill area are smooth. For more information, refer to the Notes.

Fill Rect Top (ACSIL: DRAWSTYLE_FILLRECTTOP) and Fill Rect Bottom (ACSIL: DRAWSTYLE_FILLRECTBOTTOM)

These two Draw Styles are used in combination to fill the area between the two Subgraphs that are set to them. With these draw styles, the edges of the fill area are rectangular. For more information, refer to the Notes.

Color Bar (ACSIL: DRAWSTYLE_COLORBAR)

This Draw Style is used to fully color price graph bars with the color/colors the Subgraph is set to, or the color set in the corresponding ACSIL sc.Subgraph[].DataColor[] array element if it is used by the study.

A price graph bar is a type specified by the Graph Draw Type setting other than the Custom setting.

A price graph bar will be colored when a Subgraph data element for the corresponding bar is nonzero.

When using this Draw Style for coloring price bars for studies in Chart Regions other than 1, it is necessary that the study using this Draw Style is set to draw after the study that it is coloring. Refer to Study Display Order.

Color Bar Hollow (ACSIL: DRAWSTYLE_COLORBARHOLLOW)

This Draw Style is used to color the main price graph bars with the color/colors the Subgraph is set to, or the color set in the corresponding ACSIL sc.Subgraph[].DataColor[] array element if it is used by the study. A bar will be colored when a Subgraph data element for the corresponding bar is nonzero. In order for the chart bars to be colored, you need to set the study to display in Chart Region 1.

The area drawn will be the outline of the candlestick when used with a candlestick graph. With an OHLC bar graph, the entire OHLC bar will be colored.

Color Bar Candle Fill (ACSIL: DRAWSTYLE_COLORBAR_CANDLEFILL)

This Draw Style is used to color the main price graph bars with the color/colors the Subgraph is set to, or the color set in the corresponding ACSIL sc.Subgraph[].DataColor[] array element if it is used by the study. A bar will be colored when a Subgraph data element for the corresponding bar is nonzero. In order for the chart bars to be colored, you need to set the study to display in Chart Region 1.

The area drawn is only the body of the candlestick when used with a candlestick graph. With an OHLC bar graph, the entire OHLC bar will be colored.

Box Top (ACSIL: DRAWSTYLE_BOXTOP) and Box Bottom (ACSIL: DRAWSTYLE_BOXBOTTOM)

These two Draw Styles are used in combination to create boxes which are the width of the spacing between the chart bars. For more information, refer to the Notes.

Custom Text (ACSIL: DRAWSTYLE_CUSTOM_TEXT)

Custom Text is not an actual Draw Style. It is used only for the setting of the Color and Size of custom drawn text that a study performs. The study will set itself to use this Draw Style. This is not a Draw Style that you would ever manually set. However, you will use it to set the Color and Size of custom drawn text from the study.

Bar Top (ACSIL: DRAWSTYLE_BARTOP) and Bar Bottom (ACSIL: DRAWSTYLE_BARBOTTOM)

These two Draw Styles are used in combination to draw a vertical line/bar from the top Subgraph to the bottom Subgraph. The width of this line/bar is controlled by the Width setting of the first Subgraph used in this pair. For more information, refer to the Notes.

Line - SkipZeros (ACSIL: DRAWSTYLE_LINE_SKIPZEROS)

This Draw Style draws a continuous line. Where there are zero values in the Subgraph, no line will be drawn at those points. Here is an example: There are the Subgraph values for the chart columns of 1, 2, 3, 0, 4. There will be no line drawn between 3 and 4. This differs from using sc.Subgraph[].DrawZeros = FALSE in ACSIL, by not actually drawing a line where there are 0 values. Whereas when setting DrawnZeros to FALSE, a line would actually be drawn from 3 to 4 but it would not go down to the 0 value. That is the key difference.

Transparent Fill Top (ACSIL: DRAWSTYLE_FILLTOP_TRANSPARENT) and Transparent Fill Bottom (ACSIL: DRAWSTYLE_FILLBOTTOM_TRANSPARENT)

These 2 Draw Styles used in combination to fill the area between the two Subgraphs that are set to them. The filled area is transparent and the edges of the filled area are smooth. For more information, refer to the Notes.

The level of transparency is controlled through Global Settings >> Graphics Settings >> Other >> Transparency Level for Fill Styles.

Text (ACSIL: DRAWSTYLE_TEXT)

This Draw Style will display the specified text at each chart bar/column at the level of the Subgraph value for that bar/column. The actual text is specified with the Text to Draw setting for the Subgraph. To clearly see the text, be certain to set the Width/Size setting for the Subgraph to a large enough value. For example, use 12. Refer to the image.

Point On Low (ACSIL: DRAWSTYLE_POINTLOW)

This is a special type of draw style where when a Subgraph value at a column in the chart is nonzero, then a circle or point will be drawn on the low of the corresponding bar.

Point On High (ACSIL: DRAWSTYLE_POINTHIGH)

This is a special type of draw style where when a Subgraph value at a column in the chart is nonzero, then a circle or point will be drawn on the high of the corresponding bar.

Triangle Up (ACSIL: DRAWSTYLE_TRIANGLEUP)

An independent up pointing triangle draw style.

Triangle Down (ACSIL: DRAWSTYLE_TRIANGLEDOWN)

An independent down pointing triangle draw style.

Triangle Left (ACSIL: DRAWSTYLE_TRIANGLELEFT)

An independent left pointing triangle draw style.

Triangle Right (ACSIL: DRAWSTYLE_TRIANGLERIGHT)

An independent right pointing triangle draw style.

Triangle Right Offset(ACSIL: DRAWSTYLE_TRIANGLERIGHTOFFSET)

An independent right pointing triangle draw style. The triangle's left side is offset to the right of the bar.

Triangle Right Body Offset(ACSIL: DRAWSTYLE_TRIANGLERIGHTOFFSETB)

An independent right pointing triangle draw style. The triangle's left side is offset to the right of the bar based on the candlestick body width.

Transparent Fill Rectangle Top (ACSIL: DRAWSTYLE_FILLRECTTOP_TRANSPARENT) and Transparent Fill Rectangle Bottom (ACSIL: DRAWSTYLE_FILLRECTBOTTOM_TRANSPARENT)

These 2 Draw Styles are used in combination to fill the area between the two Subgraphs that are set to them. The filled area is transparent and the edges of the filled area are rectangular. For more information, refer to the Notes.

The level of transparency is controlled through Global Settings >> Graphics Settings >> Other >> Transparency Level for Fill Styles.

Background (ACSIL: DRAWSTYLE_BACKGROUND)

This is a special type of draw style where when a Subgraph value at a column in the chart is nonzero (any number other than zero), then the background in the Chart Region where the study is located is colored the Subgraph Primary color if the Subgraph value is greater than zero or the Secondary color if less than zero. The Primary and Secondary colors are set with the 2 Subgraph Color buttons. An ACSIL (Advanced Custom Study Interface and Language) study can optionally use the sc.Subgraph[].DataColor array to use alternate coloring for the background at each chart column that differs from the primary color.

Diamond (ACSIL: DRAWSTYLE_DIAMOND)

An independent diamond draw style.

Fill to Zero (ACSIL: DRAWSTYLE_FILLTOZERO)

This draw style will fill the Chart Region from the Study Subgraph value to the zero level. For more information, refer to Notes about Top and Bottom Draw Style Pairs.

Transparent Fill to Zero (ACSIL: DRAWSTYLE_FILLTOZERO_TRANSPARENT)

This draw style will fill the Chart Region from the Study Subgraph value to the zero level. The filled area is transparent. For more information, refer to Notes about Top and Bottom Draw Style Pairs.

The level of transparency is controlled through Global Settings >> Graphics Settings >> Other >> Transparency Level for Fill Styles.

Left Hash (ACSIL: DRAWSTYLE_LEFTHASH)

A hash mark on left of bar (Example: Opening hash of OHLC bar).

Right Hash (ACSIL: DRAWSTYLE_RIGHTHASH)

A hash mark on right of bar (Example Closing hash of OHLC bar).

Candle Body Open (ACSIL: DRAWSTYLE_CANDLE_BODYOPEN) and Candle Body Close (ACSIL: DRAWSTYLE_CANDLE_BODYCLOSE)

These two Draw Styles are used in combination to draw a Candlestick Body from the Open Subgraph to the Close Subgraph. The colors are controlled by the ACSIL sc.SubGraph[].DataColor array if used. Or, the Subgraph Primary Colors if an up bar, or the Subgraph Secondary Colors if it is a down bar. The Body Open Subgraph colors are used for the Fill color, while the Body Close Subgraph colors are used for the Outline color.

Value on High (ACSIL: DRAWSTYLE_VALUE_ON_HIGH)

This Draw Style will draw the numeric value, as text, of the Study Subgraph at each chart bar/column at the High of the main price graph bar. When using ACSIL, to not display a value at the High of a bar, then set the Subgraph element at that particular bar index to be 0 and set sc.Subgraph[].DrawZeros = 0.

Value on Low (ACSIL: DRAWSTYLE_VALUE_ON_LOW)

This Draw Style will draw the numeric value, as text, of the Study Subgraph at each chart bar/column at the Low of the main price graph bar. When using ACSIL, to not display a value at the Low of a bar, then set the Subgraph element at that particular bar index to be 0 and set sc.Subgraph[].DrawZeros = 0.

Value of Subgraph (ACSIL: DRAWSTYLE_VALUE_OF_SUBGRAPH)

This Draw Style will draw the numeric value of the Study Subgraph which uses this Draw Style, at the level of the Subgraph value at each chart bar/column. The size of the font is set through the Width/Size Subgraph setting.

Custom Value At Y (ACSIL: DRAWSTYLE_CUSTOM_VALUE_AT_Y)

This Draw Style will draw the numeric value contained in the Study Subgraph at the index corresponding to each chart bar/column. The vertical axis level this will be drawn at is specified by sc.Subgraph[].Arrays[0] Extra array at the corresponding index.

This Draw Style is only intended to be used by ACSIL.

The size of the font is set through the Width/Size Subgraph setting.

Subgraph Name and Value Labels Only (ACSIL: DRAWSTYLE_SUBGRAPH_NAME_AND_VALUES_ONLY)

This Draw Style will not draw any study Subgraphs on the chart bars but instead only the Subgraph Name and Value Labels will be displayed if those are enabled. To enable the Name and Value Labels, refer to Subgraphs >> Name and Value Labels.

You may want to use this Draw Style with the Line study to just place a label on the right side of the chart at the price level specified by the Line study.

Line at Last Bar to Edge (ACSIL: DRAWSTYLE_LINE_AT_LAST_BAR_TO_EDGE)

This Draw Style draws a horizontal line from the last displayed chart column to the left edge of the right side Values Scale. The purpose of this particular Draw Style is to draw only the current value of a study Subgraph. You can optionally enable the Subgraph Name and Value Labels for the Subgraph if you require.

Bar Top (ACSIL: DRAWSTYLE_TRANSPARENT_BARTOP) and Bar Bottom (ACSIL: DRAWSTYLE_TRANSPARENT_BARBOTTOM)

These two Draw Styles are used in combination to draw a vertical line/bar from the top Subgraph to the bottom Subgraph. The width of this line/bar is controlled by the Width setting of the first Subgraph used in this pair. For more information, refer to the Notes.

This line/bar is drawn with transparency. The level of transparency is controlled through Global Settings >> Graphics Settings >> Other >> Transparency Level for Fill Styles.

Notes about Top and Bottom Draw Style Pairs

  • The Top and Bottom Draw Style pairs (Fill Top, Fill Bottom, and others) fill or draw in an area between two study Subgraphs. To use them, you need to have a study with at least two Subgraphs. Set the Draw Style of one of the Subgraphs to the first Draw Style in one of the pairs (Example: Fill Top). Set the Draw Style of another Subgraph to the second Draw Style in one of the pairs (Example: Fill Bottom).

    For example, using the Bollinger Bands study, you could set the Top Band (SG1) Subgraph to Fill Top and the Bottom Band (SG3) Subgraph to Fill Bottom. This will result in the area between the Top Band and the Bottom Band being filled.

  • There are some Draw Styles which fill in an area and do not have a corresponding Draw Style and instead fill to the zero level. For example, the Fill To Zero Draw Style is one of these.
  • When using the Fill* Draw Styles in Chart Region 1, they may overlap the price bars in the chart. There are two solutions to this. The first solution is to open the Study Settings window for the study and enable the Draw Study Underneath Main Price Graph option.

    The second solution is to use a pair of Transparent Draw Styles. However, keep in mind transparent Draw Styles will elevate CPU usage. The level of transparency is controlled through Global Settings >> Graphics Settings >> Other >> Transparency Level for Fill Styles.

    The Transparent Draw Styles are as follows:
    • Trans. Fill Rect Top
    • Trans. Fill Rect Bottom
    • Trans. Fill Top
    • Trans. Fill Bottom
    • Trans. Fill To Zero
    • Trans. Fill Rect To Zero
  • Only similar Top and Bottom Draw Styles can be used together. For example: You can only use Fill Bottom with Fill Top. You cannot use Fill Rect Bottom with Fill Top.
  • If you use the Fill Top or Fill Rect Top Draw Styles without the matching Bottom style, then the Subgraph will fill to the bottom of the Chart Region. Likewise, if you use the Fill Bottom or Fill Rect Bottom Draw Styles without the matching Top* Draw Style, then the Subgraph will fill to the top of the chart region.

    The Box Top/Bottom styles do not do this.
  • When using one of the Top* fill Draw Styles, the Subgraph Color setting is used to fill the region when that Subgraph is above the Subgraph set to a Bottom* fill Draw Style.

    Likewise, when using one of the Bottom* fill Draw Styles, the Subgraph Color setting is used to fill the region when that Subgraph is above the Subgraph set to a Top* fill Draw Style.

Filling the Area Between Two Study Subgraphs

To fill an area between two study Subgraphs follow the instructions below. A study Subgraph is a single line or a related graph of Draw Style elements along the horizontal axis within a study.

  1. It is only possible to fill an area between two Subgraphs that exist within one study. If you want to fill an area between two separate Moving Average studies or any two studies, then you will need to use the Study Subgraphs Reference study which is able to reference study Subgraphs from two different studies to combine them into a single study.
  2. Use the Horizontal Lines study on the chart to fill a rectangular area between two horizontal price levels.
  3. Open the Study Settings window for the study.
  4. On the Settings and Inputs tab, enable the option Draw Study Underneath Main Price Graph.
  5. Select the Subgraphs tab.
  6. Set the Draw Style of the top Subgraph to Fill Top and the Draw Style of the bottom subgraph to Fill Bottom. You can also use any Draw Style Top/Bottom pair. Refer to Draw Style for descriptions for all of the available pairs.
  7. Set the colors for each Subgraph as you require. The Color of the Fill Top Subgraph is the fill color used when the Fill Top Subgraph is above the Subgraph set to Fill Bottom. The Color of the Fill Bottom Subgraph is the fill color used when the Fill Bottom Subgraph is above the Subgraph set to Fill Top.
  8. Press OK.
  9. Optional: If there is a single study Subgraph that you want have filled to two other Subgraphs within the same study, then it is necessary to add another instance of the study to the chart and configure that study Subgraph to fill to that other Subgraph as explained above. For example, if you want Subgraph 1 to fill to Subgraph 2 and 3, then in one instance of the study set Subgraph 1 to Fill Top and Subgraph 2 to Fill Bottom. In the second instance of the study, set Subgraph 1 to Fill Top and Subgraph 3 to Fill Bottom.
  10. Press OK again.

Subgraphs >> Line Style

This drop-down list allows you to select the line style of theSubgraph. Not all Draw Styles make use of the Line Style. The Line Draw Style does support the Line Style. If the Line Style is not supported for a particular Draw Style, then the list box will be disabled and not allowing you to change the setting.

In the case of a study Subgraph with a Draw Style of Line or Dash, when the Line Style is set to a style other than Solid it may not have any visible effect when the chart bar spacing is very small and the Subgraph >> Width is 2 or greater because each segment of the line is drawn independently for each chart bar and each segment of it may appear solid since it is very short which can effectively create a solid line.

The solution to this is to change the Draw Style to Point or something similar. Or increase the spacing between the chart bars. Although increasing the chart bar spacing still may not have any effect when using a Draw Style of Line / Dash unless you decrease the study Subgraph Width to 1.

Subgraphs >> Line Width

Use this to set the width of the subgraph's line.

Subgraphs >> Auto Coloring

None: When this option is selected, the study Subgraph will have no Auto-Coloring.

Based on Slope: When this option is selected, the Subgraph colors will based upon whether the line is sloping up or down. For example, if a Subgraph Line value at a chart column is greater than the prior column, then the Subgraph Primary color (first color button) will be used. If the Line value at a chart column is less than the prior column, then the Subgraph Secondary color (second color button) will be used. If the Line value at a chart column is same as the prior column, then the average color between the Primary and Secondary colors will be used.

Based on +/-: When this option is selected, the Subgraph colors will based upon whether the Subgraphs value at a chart column is positive (+) or negative (-). The Subgraph primay color (first color button) controls the positive line color. The Subgraph secondary color (second color button) controls the negative line color.

Same As Base Graph: When this option is selected, the Subgraph colors will be based upon the relationship between the Open and Close values of the main price graph bar in the same column on the chart. If the close is greater than the open on the bar of the base graph, the primary color will be used. If the close is less than the open on the bar of the base graph, the secondary color will be used. This is useful for when you use one of the Color Bar Draw Styles over the main price graph.

Angle Based Gradient: A color gradient is applied to the study Subgraph based on the calculated angle of a Subgraph element at each chart column compared to the prior Subgraph element. The Subgraph Primary Color (first color button) is used for the positive angles, and the Subgraph Secondary Color (second color button) is used for the negative angles. The selected color will be used for the Subgraph for angles greater or equal to the Angle Maximum value, and successively lighter shades of the color as the angle approaches zero. Very light colors may not work well as there will not be enough difference between the two extremes. As an alternative, the Angle Unit can be specified as a negative value, and then the selected color will be used for angles approaching zero, and darker shades will be used as the angle approaches the Angle Maximum value.

  • Angle Unit: This box becomes visible when you have set the Auto-Coloring option to Angle Based Gradient . This value is used to scale the calculated angle. The angle is calculated by dividing the difference between the current value and the previous value by the Angle Unit, and the result is then converted to degrees. The Angle Unit defaults to the TickSize for the chart symbol, and should be changed if Auto coloring >> Angle Based Gradient is being applied to a non-price chart region.
  • Angle Maximum (Max): This box becomes visible when you have set the Auto-Coloring option to Angle Based Gradient . The color gradient is applied based on how the current angle falls within the scale of zero to Angle Maximum. If the angle is greater than the Angle Maximum, it is treated the same as if it were the Angle Maximum.

Subgraphs >> Text To Draw

Text to Draw specifies the actual text to display by the study Subgraph when using the Text Draw Style. There is a limit to the number of characters this can be.

Subgraphs >> Displacement

This setting offsets the study Subgraph. A positive displacement will shift the Subgraph towards the right, and a negative displacement will shift the Subgraph towards the left.

If you wish to use a common displacement for all of the subgraphs, then enable the Use Common Displacement option on the Subgraphs tab. In this case the displacement of the 1st Subgraph controls the other Subgraphs.

When a study Subgraph is forward displaced and you scroll past the last bar in the chart using the scrollbar at the bottom of the chart, or any of the other supported methods to scroll the chart, then you will see the Subgraph line drawn past the last bar of the chart into the future.

Subgraphs >> Name and Value Labels

For each Subgraph line in a study, it is possible to display Name and/or Value labels. Follow these instructions to do this:

  1. Refer to the Adding/Modifying Studies section to open the Study Settings window for the study.
  2. Select the Subgraphs tab.
  3. In the list of Subgraphs, select a particular Subgraph you want to set the Name and Value labels for.
  4. To display the Subgraph Name Label, enable the Show option for the Name Label for the selected Subgraph on the Subgraphs tab of the Study Settings window.
  5. To set a different name for a Subgraph rather than the default name, then specify this name in the Short Name box for the Subgraph.
  6. To display the Subgraph Value Label, enable the Show option for the Value Label for the selected Subgraph on the Subgraphs tab of the Study Settings window.
  7. There are several options for Vertical and Horizontal Alignment. Set these as you require. They are described below.
    • Left Edge : This horizontal alignment option will display the label on the left side of the chart window.
    • Left : This horizontal alignment option will display the label at the end of the Subgraph at the last displayed bar. The right side of the label will be aligned to the end of the Subgraph.
    • Right : This horizontal alignment option will display the label at the end of the Subgraph at the last displayed bar. The left side of the label will be aligned to the end of the Subgraph.
    • Right Edge : This horizontal alignment option will display the label on the right side of the chart window.
    • Values Scale : This horizontal alignment option will display the label within the right side Values Scale.
  8. These Name and Value labels display beside the study Subgraphs on the chart (see image below). They are not for the display of the Subgraph Names and Values on the Region Data Line at the top of the chart region the study is located in. For the Region Data Line, use the Display Name and Value in Region Data Line Subgraph option.

Labels Not Visible: When a study Subgraph does not extend to the very last bar on the chart, then the Subgraph Name Label and Value Label will only display when Always Showed Name and Value Labels When Enabled is enabled on the Subgraphs tab of the Study Settings window. Therefore, in the case when a study Subgraph does not extend to the very last bar on the chart, and you do not see Name and Value labels that you have enabled, then make sure Always Showed Name and Value Labels When Enabled is enabled.

Subgraphs >> Display Name and Value in Chart Values Windows

When this option is enabled, the Subgraph Name and Value are displayed in the Window >> Chart Values Window, Window >> Tool Values Window and the Compact Tool Values Window. Otherwise, the Subgraph Name and Value will not be displayed and can save space. This option applies to the individual selected Subgraph in the Subgraphs list. Each Subgraph has its own independent setting.

The Compact Tool Values Window currently only displays the values for the first study (graph) or main price graph in the Chart Region being pointed to with one of the chart tools, such as the Chart Values tool. Therefore, in the case of a study in Chart Region 1, even if you have enabled Display Name and Value in Chart Values Windows, you will not see the values for it in the Compact Tool Values Window because it is the second graph in that region.

Subgraphs >> Display Name and Value in Region Data Line

When this option is enabled, the Subgraph name and value are displayed in the Region Data Line at the top of the region that the study is located in. Otherwise, the Subgraph name and value will not be displayed and can save space. This option applies to the individual selected Subgraph in the Subgraphs list. Each Subgraph has its own independent setting.

Subgraphs >> Display Study Name, Subgraph Names and Subgraph Values - Global

When this option is enabled, then the name and value for each Subgraph will be displayed in the Chart Values, Tool Values and Compact Tool Values Windows and in the Region Data Line if the corresponding Subgraph options are enabled. Otherwise, they will not be displayed even when the corresponding Subgraph options are enabled. When this option is disabled, then the main study name itself will also not be displayed.

Subgraphs >> Use Common Displacement

When this option is enabled, then the displacement of the 1st Subgraph controls the other Subgraphs.

Subgraphs >> Display Study Name

When this option is enabled, then the main study name will be displayed in the Chart Values Windows and in the Region Data Line. Otherwise, it will not be displayed.

Subgraphs >> Display Input Values

When this option is enabled, then study Input values will be displayed in the Chart Values Windows and in the Region Data Line. Otherwise, they will not be displayed.

Subgraphs >> Always Show Name and Value Labels When Enabled

When this option is enabled, then the Name label for a study Subgraph will always be displayed when the Show option is enabled for Name Label for the Subgraph, even when the label would not normally be displayed.

When this option is enabled, then the Value label for a study Subgraph will always be displayed when the Show option is enabled for Value Label for the Subgraph, even when the label would not normally be displayed. One reason the label would not be displayed is that at the last displayed column/bar in the chart, there is no data available for the study Subgraph. In this case, the prior value of the study Subgraph will be used for the label.

Subgraphs >> Use Chart Graphics Settings for Subgraph Colors

This option is only allowed to be set when the Graph Draw Type setting on the Subgraphs tab is a setting other than Custom. In this case, the Graph Draw Types will be various price bar types. When this option is enabled, then the colors for the price bars will be controlled through either Chart >> Graphics Settings, if using chart specific graphics settings or Global Settings >> Graphics Settings. If this option is disabled, then the price bar colors will be controlled through the Subgraph Color settings you specify on the Subgraphs tab of the Study Settings window for the study. For complete documentation for the color settings for the various Graph Draw Types when this option is disabled refer to the Color Settings for Graph Draw Types page to know which color settings control each specific element of a bar.

Quick Access to Study Settings

Above any Chart Region on a chart is a line of text displaying data from the studies, the main price graph, or both. This is known as the Region Data Line.

When you right-click with your Pointer on that line of text, a menu will display that contains the names of the studies in that same Chart Region, along with their unique study identifiers. Each Chart Region has its own Region Data Line.

If you have hidden the Region Data Line for a particular Chart Region, then you will not be able to access that menu for the studies in that particular Chart Region. Region Data Lines can be made hidden and visible through Chart >> Chart Settings >> Advanced Settings 2 >> Region Data Lines. If the Region Data Line is hidden, then you can right-click anywhere else in the Chart Region. On the displayed Chart Shortcut menu, select Study Settings and then the particular study that you want to modify the settings for.

Selecting any study from that list will immediately open the Study Settings window for that study.

Once the Study Settings window is open, modify the settings as you require and press either OK, or press Apply to see the changes without closing the Study Settings window.

When you right-click on the Region Data Line, you will also see a Remove submenu. This lets you remove any selected study from that submenu quickly.

 

Hiding and Showing Study Directly from Chart

A chart study can be hidden or shown very easily directly from the chart. Follow the instructions below:

  1. Right-click on the Region Data Line above the Chart Region that contains the study. The Region Data Line contains text information for the graphs in that Chart Region.
  2. You will see Hide and/or Show submenus.
  3. To hide a study, select its name from the Hide submenu.
  4. To show a study, select its name from the Show submenu.

Using Custom Default Study Settings

To use custom default settings for a study:

  1. Open the Study Settings window for a study by following the Adding/Modifying Chart Studies instructions.
  2. On the Settings and Inputs tab, enable the option Save These Settings As the Default. Modify the settings on this window as you require.
  3. Press the OK button. That is it. Next time you add the study from the Studies Available list, the new default settings will be used.
  4. You should also be aware of the Study Collections feature. Study Collections is another way to use custom settings.

Resetting Default Study Settings For an Individual Study

To reset all of the settings back to the original internal defaults for a study, follow the steps below.

  1. Open the Study Settings window for that study. The study will need to be in the Studies to Graph list first.
  2. Press Reset Defaults button. Press OK.
  3. Remove the study you have reset, from the Studies to Graph list by pressing the Remove button.
  4. Add the study again. The newly added instance of the study will have the default settings.

Resetting Default Study Settings For All Studies

To reset the defaults for all of the studies to be certain you are back to the defaults for all of the studies, go to the folder you installed Sierra Chart to and delete the SCStudiesDefSettings.ini file. Sierra Chart can be running when you do this.

Password Protecting Studies

In Sierra Chart you are able to password protect studies. This allows you to hide the original name of the study, subgraph names, inputs and prevent changing of the inputs. Follow these steps to password protect a study.

  1. Open the Study Settings window for the study.
  2. On the Settings and Input tab, enter a Short Name.
  3. Set all of the inputs as you require.
  4. On the Subgraphs tab enter a Short Name for each Subgraph to hide the original name.
  5. Go back to the Settings and Inputs tab and enable the option Protect with Password. Enter a password and press OK. The study is now password protected. Next time you go into the Settings you will see that the names and inputs cannot be seen. They will also not be displayed on the chart or Chart Values Windows.

Preventing Study From Compressing Main Price Graph

  1. Select Analysis >> Studies on the menu.
  2. Select in the Studies To Graph list, one of the studies that is set to display in Chart Region 1.
  3. Press the Settings button to open the Study Settings window.
  4. Press the Scale button. Refer to the image.
  5. Set the Scale Range to Same As Region. Refer to the image.
  6. Press OK. Press OK.
  7. Repeat steps 2 through 6 for each study that is displayed in Chart Region 1 .
  8. Press OK.

Adding a Horizontal Line to an Existing Study

Follow the instructions below to add a horizontal line to an existing study in the same Chart Region.

  1. Select Analysis >> Studies.
  2. Add the study, if it is not already added, that you want to add an additional horizontal line to.
  3. Select that study in the Studies to Graph list. Press the Settings button to open the Study Settings window.
  4. Press the Scale button. Make sure the Scale Range is set to Automatic.
  5. Press OK. Press OK.
  6. In the Available Studies list, select the Line study.
  7. Press Add.
  8. Press Settings button. Select the Settings and Inputs tab.
  9. Set the Value input to the level where you want the line displayed at.
  10. Set the Chart Region setting to the very same chart region where the existing study that you want to add additional horizontal line to, is located.
  11. Press the Scale button and confirm that the Scale Range is set to Automatic as well. Press OK.
  12. Select the Subgraphs tab and set the Color and Line Width.
  13. If you want to use a different Draw Style other than a line, then change the Subgraph Draw Style setting to what you want to use.
  14. Press OK. Press OK. Refer to the image below for an example.

Hiding a Study Subgraph within a Study

There may be cases where you do not want to see a particular Subgraph of a study and you will want to hide it. Follow these instructions to do that:

  1. Open the Study Settings window for the study. For instructions, refer to Adding/Modifying Chart Studies.
  2. Select the Subgraphs tab.
  3. Select in the list of Subgraphs the particular subgraph that you want to hide.
  4. Set the Draw Style for it to Ignore. Refer to the image below.

Study Display Order

The order in which studies are drawn on the chart is according to how they are listed in the Studies to Graph list on the Chart Studies Window.

To open the Chart Studies window, select Analysis >> Studies on the menu.

Select a study in the list of Studies to Graph on the Chart Studies window and use the Move Up and Move Down buttons to reorder the study relative to other studies.

In the case of a study which displays as the main price graph like the TPO Profile Chart study, make sure it is at the top of the Studies to Graph list so the standard chart header line is displayed in the Region Data Line at the top of the chart.

The order in which Study Subgraphs are drawn within a study cannot be reordered and is according to the internal order of Study Subgraphs with the study.

In the case of when studies are displayed in Chart Region 1, where the main price graph is, studies can be displayed above the main price graph or underneath the main price graph within the same Chart Region. Each chart study has a Draw Study Underneath Main Price Graph setting on the Study Settings Window for the study to control this.

Chart Studies and Chart Drawings

It is possible to display Chart Drawings from Chart Drawing Tools, above or below studies. To control this, refer to Controlling Display Order of Chart Drawings Relative to Graphs.

Study Calculation Precedence And Related Issues

There are various rules for determining the order in which studies are calculated on a chart. The significance of the calculation order is that a study which depends upon another study must be calculated after, the study or studies that it depends upon.

For the most part, this is an automatic process that you do not need to be concerned about. However, there are cases where Sierra Chart cannot determine the calculation order properly and you will have to make some adjustments. Refer to the How Calculation Order of Studies Is Determined section for the calculation order rules.

There are many details to determining the calculation order of studies. The first general rule is that they are calculated in the order that they exist in the Studies to Graph list on the Chart Studies window opened with Analysis >> Studies.

Use the Move Up and Move Down buttons to change the calculation order if you have any problems with studies not calculating and displaying properly due to the rules described in the How Calculation Order of Studies Is Determined section.

The 2nd general rule is that the calculation order of studies is determined by the precedence that each study has in relation to each other. Once again, this is explained in the How Calculation Order of Studies Is Determined section.

The following built-in studies have a Low Calculation Precedence. These are calculated after other studies with a Standard Calculation Precedence (These are studies which do not have a Low Calculation Precedence or Very Low Calculation Precedence).

  • Spreadsheet Study
  • Trade Management by Study
  • Correlation Coefficient
  • Study Subgraphs Difference
  • Color Bar Based On Above/Below Study
  • Study Subgraphs Reference
  • Study Subgraphs Average
  • Cumulative Sum Of Study
  • Reference Study Data
  • Study Subgraphs Add
  • Study Subgraphs Multiply
  • Study Subgraphs Ratio

The following built-in studies have a Very Low Calculation Precedence :

  • Spreadsheet System/Alert
  • Spreadsheet System for Trading
  • Color Bar Based On Alert Condition
  • Color Background Based On Alert Condition

Studies with a Very Low Calculation Precedence level means they are calculated after other studies with a Low Calculation Precedence level.

An ACSIL study can control its calculation precedence level through the sc.CalculationPrecedence member.

When you are viewing the values of studies on the chart or in the Chart Values Windows, then these values you are seeing are after all of the studies on the chart have been calculated.

You may notice differences when comparing those values to the values you see on a Spreadsheet because the study values on a Spreadsheet are the values that existed, if they exist at all, at the moment in time the particular instance of the Spreadsheet Study was calculated, which is based upon the order of studies in the Studies to Graph list and the calculation order rules.

You will not have any differences with values unless you have studies which make references to other studies and the Spreadsheet Study being used is not at the end of the calculation order.

Circular Study References When Using the Spreadsheet Study

If you are using chart studies which are Based On a Spreadsheet study and you are also using the results of those studies in the same Spreadsheet, then you have created what is known as a circular reference. Although these studies are outputted to the Spreadsheet, the data from them cannot be used because of the fact that these studies are calculated after the instance of the Spreadsheet study they are based on, and the data outputted for these studies at the time the Spreadsheet study is calculated, is old, incomplete, and/or nonexistent. Incomplete would mean that only 10 rows of data are outputted.

You simply cannot base studies on the Spreadsheet study and use the results of those studies in the very same Spreadsheet. This is an impossible circumstance to resolve.

Instead, what you need to do, if you need to perform calculations on those studies which are based on the Spreadsheet Study is to use another Spreadsheet Study, which those studies are not Based On. Make certain that other Spreadsheet Study is at the end of the Studies to Graph list in the Chart Studies window. You may also want to be aware of the various arithmetic studies we have which can in some cases eliminate the need for the Spreadsheet Study. They are as follows:

  1. Study Subgraph Add
  2. Study Subgraphs Add
  3. Study Subgraph Subtract
  4. Study Subgraphs Difference
  5. Study Subgraph Multiply
  6. Study Subgraphs Multiply
  7. Study Subgraph Divide
  8. Study Subgraphs Ratio

How Calculation Order of Studies Is Determined

The following describes the rules for determining the order in which all graphs/studies are calculated.

When determining the calculation order for a chart, references to all of the graphs/studies in the chart are moved from one list, representing the internal list, to another list, representing the calculation order.

The order of the internal list is the same order that studies are listed in the Studies To Graph list in the Chart Studies window. Although the base graph is not listed in the Studies To Graph list, it is the first item in the internal list, before all the studies.

Moving items from one list to another ensures that no items are duplicated (no study is calculated twice), and no infinite loops are created.

When inserting graphs/studies into the calculation order list, the place in the list that they are inserted may be based upon a precedence level. There are four levels of precedence. These are called groups in the internal precedence calculator class. They are in this order:

  1. Base Graphs. A study will be a base graph if it has Display as Main Price Graph enabled or it functions as a base graph.
  2. General Studies
  3. Low Precedence Studies
  4. Very Low Precedence Studies

The studies/graphs in the Base Graphs group get calculated first, and the studies/graphs in the Very Low Precedence Studies group get calculated last.

When determining where to insert a graph/study, the following things are checked in this order:

  1. Is the study a base graph?
    If so, it will be inserted at the end of the Base Graphs group.
  2. Does the study have a custom size? (custom base graph)
    If so, it will be inserted at the end of the Base Graphs group.
  3. Is the study a very low precedence study that is based on a higher precedence study? *[1]
    If so, it will be inserted at the end of the Very Low Precedence Studies group.
  4. Is the study based on another study?
    If so, it will be inserted immediately after the study that it is based on. *[2]
  5. Does the study have a "very low" calculation precedence?
    If so, it will be inserted at the end of the Very Low Precedence Studies group.
  6. Does the study have a "low" calculation precedence?
    If so, it will be inserted at the end of the Low Precedence Studies group.
  7. Do any of the study's inputs reference another study?
    If so, it will be inserted immediately after the study that it references. *[3]
  8. Does the study have an Alert Condition Formula that references another study?
    If so, it will be inserted at the end of the Low Precedence Studies group.

Otherwise, if the study does not match any of the above conditions, it will be inserted at the end of the General Studies group based upon the order the study exists in the Studies to Graph list in the Chart Studies window.

*[1]. A study is considered "a very low precedence study that is based on a higher precedence study" iff the study has a "very low" calculation precedence, and it is based on another study (that exists), and the study that it is based on has either a "low" or "standard" calculation precedence level.

*[2]. If a study is based on a study that does not exist, the study will be inserted at the end of the General Studies group instead.

*[3]. Inputs with the value types: STUDYID_VALUE, STUDY_SUBGRAPH_VALUES, CHART_STUDY_SUBGRAPH_VALUES, and CHART_STUDY_VALUES may reference another study. The last two will only count if the chart in the Input is the same as the chart that the study is on. If an Input references the same study that it is on, that Input is ignored, because it is not referencing another study. If the study that the Input references does not exist, then that Input is ignored. If a study has more than one valid Input study reference, then the Input reference with the greatest index in the unmodified internal list is used.

Notice that when studies are inserted into a precedence level group, they are always inserted at the end of the group. This maintains the original internal order of the studies when they end up in the same group, assuming no other conditions cause the order to change.

Study Collections

Refer to the Study Collections documentation page.

References to Other Charts and Tagging

A study on a chart can reference another chart. The chart that a study is referencing is considered the source chart and the chart that study is on is considered the destination chart.

When a study references a source chart, and data in the source chart changes, the destination chart is notified of this and the studies on the destination chart are calculated so that they can make reference to the up-to-date data in the source chart.

In some cases, like when historical data is downloaded in a source chart, the destination chart is tagged for a full recalculation. In the case a source chart tags a destination chart for a full recalculation, you will see messages like the following added to the Sierra Chart Message Log:

Chart #1 has tagged chart #2 for full recalculation. Chartbook: C:\SierraChart\Data\Chartbook1.cht
Chart #2 is performing a full recalculation because it has been tagged. Chartbook: C:\SierraChart\Data\Chartbook1.cht

*Last modified Tuesday, 30th August, 2016.