Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 09:16:17 +0000



Post From: sc.IndexOfFirstVisibleBar not updating with sc.UpdateAlways = 1;

[2019-04-07 08:04:17]
Sierra Chart Engineering - Posts: 104368
They do update but the study function is not going to reveal that. We made the necessary changes:

SCSFExport scsf_VisibleBarTest(SCStudyInterfaceRef sc)
{

  SCSubgraphRef Subgraph_FirstBarNumber = sc.Subgraph[0];
  SCSubgraphRef Subgraph_LastBarNumber = sc.Subgraph[1];

  if (sc.SetDefaults)
  {
    // Set the configuration and defaults

    sc.GraphName = "Visible Bar Test";
    sc.ValueFormat = 1;

    sc.AutoLoop = true;

    Subgraph_FirstBarNumber.Name = "First Bar";
    Subgraph_FirstBarNumber.DrawStyle = DRAWSTYLE_SUBGRAPH_NAME_AND_VALUE_LABELS_ONLY;
    Subgraph_FirstBarNumber.PrimaryColor = COLOR_GREEN;

    Subgraph_LastBarNumber.Name = "Last Bar";
    Subgraph_LastBarNumber.DrawStyle = DRAWSTYLE_SUBGRAPH_NAME_AND_VALUE_LABELS_ONLY;
    Subgraph_LastBarNumber.PrimaryColor = COLOR_GREEN;

    sc.UpdateAlways = 1; //for visible bars


    return;
  }

  Subgraph_FirstBarNumber[sc.IndexOfLastVisibleBar] = sc.IndexOfFirstVisibleBar;
  Subgraph_LastBarNumber[sc.IndexOfLastVisibleBar] = sc.IndexOfLastVisibleBar;

}

Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing