Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 20:34:19 +0000



is it possible to hide/show all studies with a single mouse-click?

View Count: 3452

[2016-01-05 11:28:38]
4646ed - Posts: 230
is it possible to hide/show all studies with a single mouse-click?
[2016-01-14 04:13:52]
Bedhog - Posts: 179
SAVE AND LABEL THE CURRENT STUDIES
Select Analysis; Studies; Save Studies As Study Collection
Enter a description in the Name: box (eg. My Favorite Studies)
Click Save All; OK
Select Analysis and confirm your new description appears in the list.


CLEAR THE STUDIES AND SAVE THE BLANK CHART;
Select Analysis; Studies; Remove all the studies from this chart
Enter a description in the Name: box (eg. No Studies)
Click Save All; OK


Now you can toggle the studies off and on via the Analysis pull down menu.
[2016-01-14 12:55:13]
4646ed - Posts: 230
That works in my case if i save each main chart's individual study collection under a different name b/c i have several study/price overlays on each chart. I have one chart book with four main charts that are visible then studies on 12 more charts that i use the study/price overlay study to place on the main charts. So each main chart has a bunch of charts associated with it. Your method works if I save a separate analysis group for each main chart. When i go to a chart that has different study/price overlays, and toggle it off, then on, i get the overlays from the memorized group and not the chart's own, unless i memorize a separate group for the new main chart.
Your method IS better than hiding each study one at a time. It's a good start, and i'm glad you recommended it.. I have 15 studies on each main chart (mostly timelines and ranges), and eight main charts in two books total, so turning them off individually is tedious.
But it would be great and much easier if there was just a simple button or checkbox that hid all the studies temporarily while i'm putting on daily support and resistance lines or pivot pts etc.
And usually I monitor more than 20 main charts, each with 15 studies and 3-4 study/price overlays - but without a simple toggle I cant do it anymore.
[2016-01-20 11:12:47]
4646ed - Posts: 230
And, there should be another button to toggle off/on all chart drawings with a single click.
[2016-01-20 18:47:10]
Sierra Chart Engineering - Posts: 104368
To hide all of the Chart Drawings you can do this with Chart >> Hide Chart Drawings and you can set both a Control Bar button and keyboard shortcut for that.

Refer to:
https://www.sierrachart.com/index.php?page=doc/doc_GlobalSettingsMenu.html#CustomizeControlBar
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
[2019-09-17 15:39:33]
Mack - Posts: 83
It'd be nice if there was a button: " Chart >> Hide Chart Studies "
Date Time Of Last Edit: 2019-09-17 15:39:49
[2021-03-04 14:47:36]
User459170 - Posts: 262
It'd be nice if there was a button: " Chart >> Hide Chart Studies "

Yes please
[2023-10-29 20:37:12]
raheemrazzak - Posts: 41
If you can add the ability to multi select studies when you open a study collection (similar to how it is when you open drawing properties) it will be easier to hide and show (Like when you have 100 studies in the collection and want to hide 10-15 of them) studies quickly.

Thank You
[2023-10-29 22:45:12]
Tony - Posts: 519
This is a very goofy solution, I tested on my chart, it works:

Press the "q" key will hide all the studies on the chart, and
press the "q" key again will unhide all the studies.
so on and so forth, just like a light switch.

You will just have to load this tiny custom study to all of
your charts

Mouse click is also doable, since we have access to values
of X and Y coordinates in a chart with ACSIL, but I think key
board is much faster.
  
if you don't like letter "q", go to this web site to find out the
value of what ever key/letter you like to use, i.e. 27 for "Esc"


#include "sierrachart.h"

SCDLLName("KeyToHide")

SCSFExport scsf_KeyToHide(SCStudyInterfaceRef sc)
{
  if (sc.SetDefaults)
  {
    sc.GraphName = "Key To Hide";
    sc.GraphRegion = 0;
    sc.AutoLoop = 1;
    sc.UpdateAlways = 1;
    sc.ReceiveCharacterEvents = 1;    
    return;
  }
  

  if (sc.CharacterEventCode==113) "q"uick hide
    sc.HideStudy = !sc.HideStudy;
    
  if (sc.HideStudy) { // chage to a bigger value if you have 100+ studies
    for (int MyStudyIDs {0}; MyStudyIDs<100; MyStudyIDs++)
      sc.SetStudyVisibilityState(MyStudyIDs, 0);
  }
  else {
        for (int MyStudyIDs {0}; MyStudyIDs<100; MyStudyIDs++)
      sc.SetStudyVisibilityState(MyStudyIDs, 1);
  }
  
  
}

Unfortunately, there is no ACSIL function or variable to hide/show drawings,
unless for drawings drawn by sc.UseTool(), you can pretty much do whatever
you want.
Date Time Of Last Edit: 2023-10-29 23:19:56
[2023-10-30 01:55:19]
raheemrazzak - Posts: 41
Thank You Tony, this is a real neat hack. I don't need to hide all studies just a bunch of them (so I was able to edit the for loop and it kinda works), do you know if there is a way to use the chronological # of the study instead of ID #, as the studies I want to hide don't have IDs in a consecutive order. Thanks again.
[2023-10-30 04:17:08]
Tony - Posts: 519
@raheemrazzak

You are welcome, one of the possible option for your
case is saving multiple study collections, and define
buttons on the tool bar, so that each bar loads
different set of study collections

For ACSIL, unfortunately, I am not aware of a way to
access chronological #, for the time being, this is the
solution I am thinking (tested, works):

Give each study an unique Short Name (see attached image)
with or without space, doesn't matter, just make sure
it matches exactly with the name in the code. That means
it doesn't matter which order you loaded your studies,
you will always be able to identify each one.

I loaded Simple Moving Average, and give it a Short Name
as "My ID2", the previous code would be modified as below:

Then you can do whatever you want, i.e. press "q" to hide/unhide
this group of studies, press "a" to hide/unhide that group of
studies, etc, quite a work though if you have dozens or hundreds
of studies.

I will let you know if I would think of a better way to do it.


#include "sierrachart.h"

SCDLLName("KeyToHide")

SCSFExport scsf_KeyToHide(SCStudyInterfaceRef sc)
{
  if (sc.SetDefaults)
  {
    sc.GraphName = "Key To Hide";
    sc.GraphRegion = 0;
    sc.AutoLoop = 1;
    sc.UpdateAlways = 1;
    sc.ReceiveCharacterEvents = 1;    
    return;
  }
  
  static int VisibilityOfGroup1 {1};
  static int VisibilityOfGroup2 {1};
  
  if (sc.CharacterEventCode==113) // "q"uick hide or unhide Group One
    VisibilityOfGroup1 = !VisibilityOfGroup1;
    
  if (VisibilityOfGroup1) {
    sc.SetStudyVisibilityState(sc.GetStudyIDByName(sc.ChartNumber, "My ID2", 1), 1);
    //sc.SetStudyVisibilityState(sc.GetStudyIDByName(sc.ChartNumber, "My ID7", 1), 1);
    //sc.SetStudyVisibilityState(sc.GetStudyIDByName(sc.ChartNumber, "My ID9", 1), 1);
  }
  else {
    sc.SetStudyVisibilityState(sc.GetStudyIDByName(sc.ChartNumber, "My ID2", 1), 0);
    //sc.SetStudyVisibilityState(sc.GetStudyIDByName(sc.ChartNumber, "My ID7", 1), 0);
    //sc.SetStudyVisibilityState(sc.GetStudyIDByName(sc.ChartNumber, "My ID9", 1), 0);
  }
}


Date Time Of Last Edit: 2023-10-30 04:56:39
imageID.png / V - Attached On 2023-10-30 04:16:59 UTC - Size: 95.01 KB - 138 views
[2023-10-30 13:26:17]
raheemrazzak - Posts: 41
that works, thanks a lot Tony, appreciate your help.
[2023-10-30 14:02:07]
User431178 - Posts: 543
do you know if there is a way to use the chronological # of the study instead of ID #, as the studies I want to hide don't have IDs in a consecutive order.

Use sc.GetStudyIDByIndex() instead, this uses the order from the studies window.
Date Time Of Last Edit: 2023-10-30 14:02:33
[2023-10-30 14:23:27]
Tony - Posts: 519
Thanks @User431178!

@raheemrazzak previous code modified and tested, assumed the Simple Moving Aaverage
is on the top of study's list, but its study ID is not 1 (i.e. ID 6), this is so much easier,
no Short Name entries are needed. (1 based Index)


#include "sierrachart.h"

SCDLLName("KeyToHide")

SCSFExport scsf_KeyToHide(SCStudyInterfaceRef sc)
{
  if (sc.SetDefaults)
  {
    sc.GraphName = "Key To Hide";
    sc.GraphRegion = 0;
    sc.AutoLoop = 1;
    sc.UpdateAlways = 1;
    sc.ReceiveCharacterEvents = 1;    
    return;
  }
  
  static int VisibilityOfGroup1 {1};
  static int VisibilityOfGroup2 {1};
  
  if (sc.CharacterEventCode==113) // "q"uick hide
    VisibilityOfGroup1 = !VisibilityOfGroup1;
    
  if (VisibilityOfGroup1) {
    sc.SetStudyVisibilityState(sc.GetStudyIDByIndex(sc.ChartNumber, 1), 1);
    //sc.SetStudyVisibilityState(sc.GetStudyIDByIndex(sc.ChartNumber, 2), 1);
    //sc.SetStudyVisibilityState(sc.GetStudyIDByIndex(sc.ChartNumber, 3), 1);
  }
  else {
    sc.SetStudyVisibilityState(sc.GetStudyIDByIndex(sc.ChartNumber, 1), 0);
    //sc.SetStudyVisibilityState(sc.GetStudyIDByIndex(sc.ChartNumber, 2), 0);
    //sc.SetStudyVisibilityState(sc.GetStudyIDByIndex(sc.ChartNumber, 3), 0);
  }
}

Date Time Of Last Edit: 2023-10-30 14:53:26
[2023-10-31 19:54:07]
raheemrazzak - Posts: 41
Thank you guys, that's perfect, works like a charm.

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

Login

Login Page - Create Account