Support Board
Date/Time: Sat, 05 Jul 2025 12:11:50 +0000
Post From: Expanding charts that have locked fill space
[2024-11-23 18:53:04] |
User676363 - Posts: 83 |
Does anyone have a way to change the Lock Fill Space while the chart does not show the hard right edge? Why not have the same dialog available in Graphics Properties on the Chart Settings? This would allow us to open it, click lock space, type a value for x bars to the right, and see the current bar spacing in case we want to modify it as well. Reset Bar Size/Spacing/Scale is useful, utilizing the two parameters (bar size and lock space size = x bars), but it takes you back to the hard right edge, which is problematic if you're examining something further left. I would like a way to change the lock space without returning to the end of the data, as this seems wasteful in terms of time. There should be a method to set the lock space mode to on at any point, allowing us to drag it or set it to X bars from the right, depending on the situation. Since the spacing of the bars affects the space, but the text labels on the drawings do not change or zoom like the bars, achieving perfect sizing for the task can be challenging. If I am looking at many tiny bars, the lock space differs from when I am viewing larger bars. Here's code that works for setting the number of bars in the right-hand side space, indicating that this could be added to the chart dialog and applied by the user through a menu, dialog box, or a control key plus mouse movement on the last bar. Unfortunately, I cannot find the ACSIL code that would allow me to retrieve the defaults from the default dialog to initialize this code, nor do I see a function to get the bar spacing, only the fill space. The study would improve if it presented both options simultaneously and initialized using the user's system defaults. For now, it seems either SierraChart does not expose that information, or I am unable to locate it. The question remains: why must I build a study or scroll to the right of the data to simply add or remove bars from the fill space on the right in my existing view? #include "sierrachart.h"
SCDLLName("sc-fill-space"); // DLL name SCSFExport scsf_CustomFillSpace(SCStudyInterfaceRef sc) { SCInputRef Input_FillSpaceBars = sc.Input[0]; // Set study configuration and defaults if (sc.SetDefaults) { sc.GraphRegion = 0; // Main chart region sc.AutoLoop = 0; // No auto-looping sc.GraphName = "Custom Fill Space"; // Study Name sc.StudyDescription = "This study allows you to control the number of bars in the right-hand fill space of " "the chart."; // Define the input for fill space bar count Input_FillSpaceBars.Name = "Fill Space Bar Count"; Input_FillSpaceBars.SetInt(10); // Default to 10 bars Input_FillSpaceBars.SetIntLimits(1, 100); // Allow 1 to 100 bars Input_FillSpaceBars.SetDescription( "This input determines the number of empty bars displayed in the right-hand fill space " "of the chart. Increasing this value expands the fill space, providing more room for " "future price action or visual indicators."); return; } // Get the user-specified fill space bar count int FillSpaceBars = Input_FillSpaceBars.GetInt(); // Set the fill space bar count sc.PreserveFillSpace = 1; // Enable fill space preservation sc.NumFillSpaceBars = FillSpaceBars; } |