Login Page - Create Account

Support Board


Date/Time: Fri, 14 Mar 2025 22:45:11 +0000



[Programming Help] - Setting .Drawstyle is ACSIL Study

View Count: 591

[2022-06-27 13:16:51]
User92573 - Posts: 548
Dear Support

I'd be grateful for some direction on the following.

Although I set the default .Drawstyle for a Subgraph in the defaults section; I then change the .Drawstyle via the Input Selection i.e.


sc.AutoLoop = 1;
Subgraph_One.DrawStyle = DRAWSTYLE_STAIR;
Input_Show_One.SetYesNo(true);

// ------------------------------------------

if(Input_Show_One.GetYesNo())
{
Subgraph_One.DrawStyle = DRAWSTYLE_LINE;
}  
else
{    
Subgraph_One.DrawStyle = DRAWSTYLE_HIDDEN;
  
}




Here is my issue. I'm now setting on all new bars the selected .Drawstyle which means I cannot now select an alternative .Drawstyle.

Each bar will, as expected, run the input question and then set the .Drawstyle to either DRAWSTYLE_LINE or DRAWSTYLE_HIDDEN.

As a result other .Drawstyle's are no longer an option, as even if selected they will be reset as the code is executed.

I can see a persistent variable is most likely the solution but I'm not sure how to achieve the outcome.

Any help appreciated

Many thanks
[2022-06-27 19:42:08]
ForgivingComputers.com - Posts: 1028
If you want the user to select any drawstyle, the easiest way to do this on the Subgraph tab of the Study Settings. If you want to limit the user to specific drawstyles, then do it with a Study Setting in ACSIL using .SetCustomInputStrings
[2022-06-29 06:49:34]
User92573 - Posts: 548
Thank you.

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

Login

Login Page - Create Account