Support Board
Date/Time: Thu, 13 Mar 2025 16:30:03 +0000
Post From: AutoHide number bars study on specific zoom level suggestion
[2022-05-29 22:18:08] |
Tony - Posts: 553 |
It might be achieved with ACSIL: Below is the custom study could meet your need. What I was trying to do is when the space between 2 candle bars is greater than 8 pixels (zoom in), show Number Bars, otherwise, hide Number Bars. #include "sierrachart.h" SCDLLName("Sierra Chart Support Board Contribution") SCSFExport scsf_HideShowNumberBars(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { sc.GraphName = "Hide Show Number Bars"; sc.GraphRegion = 0; sc.AutoLoop = 1; sc.UpdateAlways = 1; return; } if (sc.ChartBarSpacing > 8) // adjust number of bar spacing and study ID if needed sc.SetStudyVisibilityState(2, 1); // assume Study ID for Number Bars is 2, 1:Visible else sc.SetStudyVisibilityState(2, 0); // assume Study ID for Number Bars is 2, 0:Invisible } I don't have Number Bars, tested to hide/show one of my studies, works. Date Time Of Last Edit: 2022-05-30 06:08:43
|