Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Requirements

...

The "key" Parameter

You will notice that the "key" parameter is the first parameter in each of the cht functions.

On the SC side, each chart you wish to access needs to have the "T29 SC-Excel" study added to it. In the study settings is a field called "Key". You can set this "key" to anything that makes sense. The only requirement is that it is unique and you don't use the same "key" on two different charts.

The "key" parameter ties the excel function with a specific chart.

Case does matter - if you set a key "XYZ" (upper case) in Sierra Chart, the key in Excel must also be "XYZ" ("xyz" lower case won't work).



sc.cht.GetSGData2

=sc.cht.GetSGData2(key, data, include_timestamp)

...

A simple example of this is something like sc.cht.GetSGData2("BTC1", "ID0.[SG1].[0:5]", TRUE)

In this example, data is set to ID0 (the main price graph) and retrieves the most recent 6 bars from SG1 (which happens to be the Open).


In more detail

study_id - formatted like it appears in SC. ID1, ID2, ID3 etc. ID0 is the main price graph.

...