Login Page - Create Account

Support Board


Date/Time: Fri, 19 Apr 2024 12:08:05 +0000



gdt candlestick bar hiding

View Count: 1943

[2014-12-10 22:53:28]
onnb - Posts: 660
I have a chart with sc.GraphDrawType = GDT_CANDLESTICK;

I am trying to hide (not display) the last bar while its forming and only display on bar close.
I am trying to do this by changing the primary color of the Open/High/Low/Last Subgraphs to the chart background color.

This does hide the last bar but messes up all the rest of the bars by painting them black (I have a white background).

1. Do you have another approach to hiding this bar?
2. Any idea why the rest of the bars might be black?

below is the set default block



  if (sc.SetDefaults)
  {
    sc.GraphName = "My Study";

    sc.FreeDLL = 1;
    sc.MaintainAdditionalChartDataArrays = 1;
    sc.AutoLoop = 0;

    sc.ValueFormat = 0;
    sc.GraphDrawType = GDT_CANDLESTICK;

    Open.Name = "Open";
    Open.DrawStyle = DRAWSTYLE_LINE;
    Open.PrimaryColor = RGB(0, 255, 0);
    Open.SecondaryColor = RGB(0, 255, 0);
    Open.SecondaryColorUsed = true;
    Open.DrawZeros = true;

    High.Name = "High";
    High.DrawStyle = DRAWSTYLE_LINE;
    High.PrimaryColor = RGB(0, 128, 0);
    High.DrawZeros = true;

    Low.Name = "Low";
    Low.DrawStyle = DRAWSTYLE_LINE;
    Low.PrimaryColor = RGB(255, 0, 0);
    Low.SecondaryColor = RGB(255, 0, 0);
    Low.SecondaryColorUsed = true;
    Low.DrawZeros = true;

    Close.Name = "Close";
    Close.DrawStyle = DRAWSTYLE_LINE;
    Close.PrimaryColor = RGB(128, 0, 0);
    Close.DrawZeros = true;

    OHLCAvg.Name = "OHLC Avg";
    OHLCAvg.DrawStyle = DRAWSTYLE_IGNORE;
    OHLCAvg.PrimaryColor = COLOR_GREEN;
    OHLCAvg.DrawZeros = true;

    HLCAvg.Name = "HLC Avg";
    HLCAvg.DrawStyle = DRAWSTYLE_IGNORE;
    HLCAvg.PrimaryColor = COLOR_GREEN;
    HLCAvg.DrawZeros = true;

    HLAvg.Name = "HL Avg";
    HLAvg.DrawStyle = DRAWSTYLE_IGNORE;
    HLAvg.PrimaryColor = COLOR_GREEN;
    HLAvg.DrawZeros = true;

    

    return;
  }

[2014-12-11 18:57:57]
onnb - Posts: 660
consider this issue resolved
[2014-12-11 19:07:31]
Sierra Chart Engineering - Posts: 104368
Use the Color Bar Draw Style, set its color to black, and set the Subgraph element for it at the last bar to 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