So depending upon what chart is active, effects the on/off state of these buttons, depending upon their usage with that chart or how an Advanced Custom Study study has set them. The On/Off state of Advanced Custom Study Control Bar buttons is remembered per individual chart. For complete documentation, refer to Customizing Keyboard Shortcuts. In the Commands list, expand the Custom Study Control Bar Button Keyboard Shortcuts list. To do this, select Global Settings > Customize Keyboard Shortcuts. It is also supported to assign keyboard shortcuts to these Advanced Custom Study Control Bar buttons. These events include Pointer Button Down, Pointer Button Up, Pointer Move.įor a working example for all of this, refer to the scsf_MenuAndPointerExample() function in the /ACS_Source/studies.cpp file in the folder where Sierra Chart is installed to. The second purpose of these Advanced Custom Study Control Bar buttons is that when one of them is selected (On state), the study function instances on the chart that have requested to receive Pointer events by setting sc.ReceivePointerEvents = ACS_RECEIVE_POINTER_EVENTS_WHEN_ACS_BUTTON_ENABLED in the study function, will receive those events as the Pointer is moved around or used on the chart that contains the study function instance. This provides a lot of useful functionality for a custom study including even one-time button events where the button does not remain in an On state, which is explained further in this section. So this allows a study to monitor for an On/Off state using a particular Control Bar button. In other words whether the button is in a pushed in state or not (on/off). They can be used to signal to an Advanced Custom Study, that is monitoring for them, whether a particular button is selected or not. These buttons can be added to any of the Control Bars. There are 150 Advanced Custom Study buttons available for custom studies to interact with on the Control Bar. Sc.AddMessageToLog("User selected ACS Chart Shortcut Menu Item", 1) If (sc.MenuEventID != 0 & sc.MenuEventID = MenuID) Sc.AddMessageToLog("Add ACS Chart Shortcut Menu Item failed", 1) MenuID = sc.AddACSChartShortcutMenuItem(sc.ChartNumber, "Menu Example Menu Item 1") If (sc.Index = 0)// Only do this when calculating the first bar. For a complete working example, refer to the scsf_ButtonAndMenuAndPointerExample() function in the /ACS_Source/studies.cpp file in the folder where Sierra Chart is installed to. An error can mean the ChartNumber parameter is not valid or the maximum limit of Chart Shortcut Menu custom commands has been reached. The function returns a unqiue menu integer command ID when successful. This can be done when sc.LastCallToFunction is nonzero. When a study is removed from a chart, the study should always remove any custom Chart Shortcut Menu commands by calling sc.RemoveACSChartShortcutMenuItem(). The selected menu item identifier is obtained through the sc.MenuEventID ACSIL member given to the custom study function instance. Once a menu item has been added, the study function instance is called when the user selects the menu item from the Chart Shortcut Menu which is displayed when right clicking on a chart. Although when you add a menu item with the same MenuText, it will not be added again and you will be returned the very same menu item ID previously returned for that text. You should only add a particular menu command item only once. The command is added to the chart specified by ChartNumber. The name of the command will be the text specified by the MenuText parameter. The sc.AddACSChartShortcutMenuItem() function is for adding a custom menu command to the Chart Shortcut menu that displays when you right-click on a chart. Int AddACSChartShortcutMenuItem(long ChartNumber, const char * MenuText)
sc.SetCustomStud圜ontrolBarButtonHoverText().
sc.SetCustomStud圜ontrolBarButtonText().Advanced Custom Study Control Bar Buttons.Advanced Custom Study Control Bar Buttons and Pointer Events.sc.ChangeACSChartShortcutMenuItemText().sc.SetACSChartShortcutMenuItemChecked().sc.SetACSChartShortcutMenuItemEnabled().sc.SetACSChartShortcutMenuItemDisplayed().Home > (Table of Contents) Advanced Custom Study/System Interface and Language (ACSIL) > Advanced Custom Study Interaction With Menus, Control Bar Buttons, Pointer Events Advanced Custom Study Interaction With Menus, Control Bar Buttons, Pointer Events