Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 17:31:52 +0000



Post From: gdt candlestick bar hiding

[2014-12-10 22:53:28]
onnb - Posts: 661
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;
  }