Login Page - Create Account

Support Board


Date/Time: Thu, 28 Mar 2024 18:29:25 +0000



CANGE BAR COLOR IN SIERRA TREND

View Count: 2670

[2013-05-24 15:43:43]
User59821 - Posts: 6
Hi-is there a way to change or at least darken the blue and red default colors in Sierra Trend indicator-thanks
[2013-05-24 17:11:03]
M5amhan - Posts: 468
its a user contributed study, they didnt allow any colors to be changed.

best i could figure out was change the draw style to "color bar hollow" then change the color of the candlesticks however you want through graphics settings
[2013-05-24 17:57:41]
Sierra Chart Engineering - Posts: 104368
Here is the source code for it:

#include "sierrachart.h"
//DEVELOPED BY TCAST
//tcast@charter.net
//SCDLLInit("SierraTrend");


/***********************************************************************/
SCSFExport scsf_SierraTrend(SCStudyGraphRef sc)
{
if(sc.SetDefaults)
{
sc.GraphName="SierraTREND";
sc.StudyDescription="SierraTREND. TTM trend replica by tcast. ";

sc.Subgraph[0].Name="sierraTREND BAR";
sc.Subgraph[0].DrawStyle = DRAWSTYLE_COLORBAR;
    sc.Subgraph[0].LineWidth = 3;

    sc.Input[0].Name = "Length";
    sc.Input[0].SetInt(5);
    sc.Input[0].SetIntLimits(1, 1000);
    
    sc.FreeDLL = 0;
sc.AutoLoop = 1;
sc.GraphRegion = 0;
return;
}

int i = sc.Index;
int len = sc.Input[0].GetInt();
  const DWORD upColor = RGB(0, 0, 255);  
  const DWORD downColor = RGB(255, 0, 0);  

  sc.Subgraph[0][i]=sc.BaseDataIn[SC_LAST][i];

  if( sc.BaseData[SC_OPEN][i] >=sc.BaseData[SC_HIGH][i-len])
  {
    sc.Subgraph[0].DataColor[sc.Index] =upColor ;    
  }
  else if ( sc.BaseData[SC_OPEN][i] <=sc.BaseData[SC_LOW][i-len])
  {
    sc.Subgraph[0].DataColor[sc.Index] = downColor;    
  }
else
  {
    sc.Subgraph[0].DataColor[sc.Index] = sc.Subgraph[0].DataColor[sc.Index-1];    
  }
  
  }


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

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

Login

Login Page - Create Account