Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 23:43:24 +0000



sc.GetGraphicsSetting() not working

View Count: 298

[2023-06-19 19:37:14]
WarriorTrader - Posts: 245
Hello,

I replaced with sc.ChartBackgroundColor with sc.GetGraphicsSetting() as per you relase notes for 2494 Release Date: 2023-04-21.

Now I get the following error:

C:\SierraChartCQG\ACS_Source\OrderFlowCandle.cpp(3712): error C2660: 's_sc::GetGraphicsSetting': function does not take 0 arguments
-- End of Build -- 15:26:47

Please advise. This is an important study for my trading.


Another reason I tend to only upgrade every 6 months or so.

Thanks,
-WT
Date Time Of Last Edit: 2023-06-19 19:37:43
[2023-06-19 19:50:19]
WarriorTrader - Posts: 245
Found this in the header file:

  int32_t GetGraphicsSetting(const int32_t ChartNumber, const n_ACSIL::GraphicsSettingsEnum GraphicsSetting, uint32_t& r_Color, uint32_t& r_LineWidth, SubgraphLineStyles& r_LineStyle)
  {
    return Internal_GetGraphicsSetting(ChartNumber, GraphicsSetting, r_Color, r_LineWidth, r_LineStyle);


And this in a study:

    sc.GetGraphicsSetting(sc.ChartNumber, n_ACSIL::GRAPHICS_SETTING_CHART_BACKGROUND, Color, LineWidth, LineStyle);


Is this the line I need - can't see how this would be better that a simple sc.ChartBackgroundColor????

So the color is stored in the variable color? So now I have an extra step of creating more variables.


Thanks,
Art
[2023-06-19 20:02:18]
WarriorTrader - Posts: 245
This will work:

  uint32_t Color, LineWidth;
  
  SubgraphLineStyles LineStyle = LINESTYLE_UNSET;
  sc.GetGraphicsSetting(sc.ChartNumber, n_ACSIL::GRAPHICS_SETTING_CHART_BACKGROUND, Color, LineWidth, LineStyle);

[2023-06-20 12:56:37]
Sierra_Chart Engineering - Posts: 17198

Is this the line I need - can't see how this would be better that a simple sc.ChartBackgroundColor????
Yes.

So the color is stored in the variable color?
Yes.
So now I have an extra step of creating more variables.

Yes there is a single function for the color, the width and the style. Yes we recognize this can be more of an inconvenience on your side working with three different variables. Maybe we could create a data structure to hold all three of 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, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2023-06-20 12:57:20

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

Login

Login Page - Create Account