Login Page - Create Account

Support Board


Date/Time: Wed, 15 Jan 2025 12:58:32 +0000



change grid scale settings by keyboard shortcut/chart shortcut/toolbar button?

View Count: 970

[2017-08-06 16:22:47]
4646ed - Posts: 230
any possibility of making us able to set grid scale settings by a keyboard shortcut or chart shortcut or even by toolbar buttons? i constantly must change horizontal grid line increments from 10-20-25 and back and the only way to do it is right click on the right side price column and open scale settings and type in the numbers 10/20/25 over and over again all day long on many different charts...
[2017-08-06 19:40:26]
Sierra Chart Engineering - Posts: 104368
You can create a custom study using Control Bar buttons:
Advanced Custom Study Interaction With Menus, Control Bar Buttons, Pointer Events: Advanced Custom Study Buttons and Pointer Events

And setting this member as required:
sc.BaseGraphScaleIncrement

We probably could quickly create a study you can use in about 15 minutes for this.
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
[2017-08-07 06:02:43]
4646ed - Posts: 230
I dont know how to program.
Yeah. I've taken a long look at the documentation that you referred me to and I still wouldn't have a clue as to how to start...
Date Time Of Last Edit: 2017-08-07 06:45:26
[2017-08-07 15:50:44]
Sierra Chart Engineering - Posts: 104368
Here is the code to do what you want:
SCSFExport scsf_SelectScaleIncrementWithButtons(SCStudyInterfaceRef sc)
{
  if (sc.SetDefaults)
  {
    // Set the configuration and defaults

    sc.GraphName = "Select Scale Increment with Buttons";

    sc.StudyDescription = "This code serves as an example of how to set the base graph scale increment by using control bar buttons.";

    sc.AutoLoop = 0;

    sc.FreeDLL = 0;

    sc.Input[0].Name = "Scale Increment 1";
    sc.Input[0].SetFloat(1.0f);

    sc.Input[1].Name = "Scale Increment 2";
    sc.Input[1].SetFloat(2.0f);

    sc.Input[2].Name = "Scale Increment 3";
    sc.Input[2].SetFloat(4.0f);

    sc.Input[3].Name = "Scale Increment 4";
    sc.Input[3].SetFloat(8.0f);

    return;
  }



  if (sc.IsFullRecalculation)
  {
    sc.SetCustomStudyControlBarButtonHoverText(ACS_BUTTON_1, "Change to Scale Increment 1 Input");
    sc.SetCustomStudyControlBarButtonText(ACS_BUTTON_1, "Scale1");
    sc.SetCustomStudyControlBarButtonHoverText(ACS_BUTTON_2, "Change to Scale Increment 2 Input");
    sc.SetCustomStudyControlBarButtonText(ACS_BUTTON_2, "Scale2");
    sc.SetCustomStudyControlBarButtonHoverText(ACS_BUTTON_3, "Change to Scale Increment 3 Input");
    sc.SetCustomStudyControlBarButtonText(ACS_BUTTON_3, "Scale3");
    sc.SetCustomStudyControlBarButtonHoverText(ACS_BUTTON_4, "Change to Scale Increment 4 Input");
    sc.SetCustomStudyControlBarButtonText(ACS_BUTTON_4, "Scale4");
  }


  // wait for a button
  if (sc.MenuEventID >= ACS_BUTTON_1 && sc.MenuEventID <= ACS_BUTTON_4)
  {
    // reset button to off
    sc.SetCustomStudyControlBarButtonEnable(sc.MenuEventID, 0);
    sc.BaseGraphScaleIncrement = sc.Input[sc.MenuEventID - 1].GetFloat();
  }
}

This will be in the next release in Analysis >> Studies >> Add Custom Study >> Sierra Chart Custom Studies.

It will require you to Advanced Custom Study Buttons. Refer to:
Control Bar: Advanced Custom Study Control Bar Buttons
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
[2017-08-13 10:40:27]
4646ed - Posts: 230
What will the study's name be? "Select Scale Increments"?
Date Time Of Last Edit: 2017-08-13 10:41:30
[2017-08-13 13:26:49]
Sierra Chart Engineering - Posts: 104368
The name of the study is "Select Scale Increment with Buttons".
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
[2017-08-13 16:14:58]
4646ed - Posts: 230
Oops. That works really well -- but I guess i wasnt clear. Its the horizontal grid line increment setting i wanted to change. (Or actually having both scale increment and horizontal grid line increment on the buttons would be great.)
How would i do that? would just changing the words in the code from "scale increment" to "horizontal grid line increment" work ? or is there more?
and then how do i get the amended code into the study?
[2017-08-13 22:49:59]
Sierra Chart Engineering - Posts: 104368
(Or actually having both scale increment and horizontal grid line increment on the buttons would be great.)
This will be supported in the next release.
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