Login Page - Create Account

Support Board


Date/Time: Fri, 21 Jun 2024 17:51:33 +0000



[User Discussion] - ACSIL questions: colour in between subgraphs

View Count: 1353

[2014-01-29 13:30:13]
User40117 - Posts: 56
hi,

- is it possible to color in between 2 subgraphs and if yes how ?
- i'm using several subgraphs (4) but it seems the fourth is not drawn sc.Subgraph[4], are subgraphs limited ? (i however thought read somewhere 60....)


ty

[2014-01-29 16:31:55]
User40117 - Posts: 56
As far as the (named) subgraph's: i tested using [1] instead of [4] (1 wasn't used) and then it plotted correctly, if i change into [1] again it is not plotted ???
I'd like to move on...


Date Time Of Last Edit: 2014-01-29 16:32:12
[2014-01-29 17:23:41]
User40117 - Posts: 56

/*============================================================================
  This is another template function you can copy and modify to start a new study
  function.
----------------------------------------------------------------------------*/
SCSFExport scsf_test(SCStudyGraphRef sc)
{

  

  if (sc.SetDefaults)
  {
    
  
    sc.GraphName = "test";
    sc.GraphRegion = 0;
    sc.StudyDescription = "Insert description here.";
        
    sc.AutoLoop = 1; // true

    // During development set this flag to 1, so the DLL can be rebuilt without restarting Sierra Chart. When development is completed, set it to 0 to improve performance.
    sc.FreeDLL = 1;

    sc.Subgraph[2].Name = "test 1";
    sc.Subgraph[2].PrimaryColor = RGB(0,255,0);
    sc.Subgraph[2].LineWidth = 2;
    
    sc.Subgraph[3].Name = "test 2";
    sc.Subgraph[3].PrimaryColor = RGB(255,0,0);
    sc.Subgraph[3].LineWidth = 2;
    
    sc.Subgraph[5].Name = "test 3";
    sc.Subgraph[5].PrimaryColor = RGB(255,0,0);
    sc.Subgraph[5].LineWidth = 1;
    
    return;
  }

  
    sc.Subgraph[2][sc.Index] = sc.BaseData[SC_HIGH][sc.Index];
    sc.Subgraph[3][sc.Index] = sc.Subgraph[2][sc.Index] + 5.0;
    sc.Subgraph[5][sc.Index] = sc.Subgraph[2][sc.Index] + 15.0;





}


Subgraph test3 is NOT plotted, however when changing index [5] into [1] it IS plotted, any index above 3 is NOT plotted ???!!!

[2014-01-29 17:43:52]
Sierra Chart Engineering - Posts: 104368
You can color between subgraphs by using the various Fill Subgraph Draw Style pairs:
http://www.sierrachart.com/index.php?l=doc/doc_ChartStudies.html#DrawStyle

The reason you do not see the Subgraphs displayed is because you are not setting the DrawStyle for them.

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
[2014-01-29 18:29:13]
User40117 - Posts: 56

/*============================================================================
  This is another template function you can copy and modify to start a new study
  function.
----------------------------------------------------------------------------*/
SCSFExport scsf_test(SCStudyGraphRef sc)
{

  

  if (sc.SetDefaults)
  {
    
  
    sc.GraphName = "test";
    sc.GraphRegion = 0;
    sc.StudyDescription = "Insert description here.";
        
    sc.AutoLoop = 1; // true

    // During development set this flag to 1, so the DLL can be rebuilt without restarting Sierra Chart. When development is completed, set it to 0 to improve performance.
    sc.FreeDLL = 1;

    sc.Subgraph[2].Name = "test 1";
    sc.Subgraph[2].PrimaryColor = RGB(0,255,0);
    sc.Subgraph[2].LineWidth = 2;
    sc.Subgraph[2].LineStyle = LINESTYLE_DOT; // Optionally, you may predefine a line style
    
    sc.Subgraph[3].Name = "test 2";
    sc.Subgraph[3].PrimaryColor = RGB(255,0,0);
    sc.Subgraph[3].LineWidth = 2;
    sc.Subgraph[3].LineStyle = LINESTYLE_DOT; // Optionally, you may predefine a line style
    
    sc.Subgraph[5].Name = "test 3";
    sc.Subgraph[5].PrimaryColor = RGB(255,0,0);
    sc.Subgraph[5].LineWidth = 1;
    sc.Subgraph[5].LineStyle = LINESTYLE_DOT; // Optionally, you may predefine a line style
    
    return;
  }

  
    sc.Subgraph[2][sc.Index] = sc.BaseData[SC_HIGH][sc.Index];
    sc.Subgraph[3][sc.Index] = sc.Subgraph[2][sc.Index] + 5.0;
    sc.Subgraph[5][sc.Index] = sc.Subgraph[2][sc.Index] + 15.0;





}

test 3 does not plot! at least in my chart. change [5] into [1] it plots !

[2014-01-29 18:31:45]
Sierra Chart Engineering - Posts: 104368
You need to set sc.Subgraph[].DrawStyle=.

Otherwise, the study subgraphs will not be visible. Other than possibly the first one.
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
[2014-01-30 06:12:40]
User40117 - Posts: 56
finally it works ! thx !
sorry for the misunderstanding...

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account