Login Page - Create Account

Support Board


Date/Time: Sat, 24 May 2025 09:15:15 +0000



[Programming Help] - Default Colors

View Count: 371

[2023-07-27 17:26:55]
WarriorTrader - Posts: 246
Hello,

FYI, the default colors for sc.Input[] no longer work. A random color is set when the study is first loaded. So the lines below have no effect. You have to manually change the color after the study is loaded. Is there a new way to set defaults for a sc.Input[] variable?




    BreakoutColor.Name = "Breakout Color";
    BreakoutColor.SetColor(0, 255, 0);

    BreakdownColor.Name = "Breakdown Color";
    BreakdownColor.SetColor(255, 0, 0);


--WT
[2023-07-27 19:00:21]
WarriorTrader - Posts: 246
Hello,

I am trying to say that the
if (sc.SetDefaults) { }
block is not running.


--WT
[2023-07-27 19:45:17]
John - SC Support - Posts: 40015
We just tested to ensure there was no issue, and we are not seeing any problem with the SetColor() function in version 2524, nor do we expect any difference in any other version, as this is not something that has been touched any time lately.

We will not look into this any further, as there must be something with your code that is not setup properly.

You can post more information for others to look at and comment, if you like.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-07-29 21:35:25]
WarriorTrader - Posts: 246
The problem was with my chartbook. I created a new chartbook and added the study without any problems with the default colors.

I guess rebuilding my chartbook will be part of my upgrade process when there is 6 months between upgrades.

-WT

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

Login

Login Page - Create Account