Support Board
Date/Time: Tue, 22 Apr 2025 10:23:20 +0000
[Programming Help] - possible to attach a control bar button to a particular study?
View Count: 1798
[2017-04-03 02:03:45] |
4646ed - Posts: 230 |
some studies require frequent opening and closing and messing with in general - would be great to attach a control bar button to the opening/closing of them -- is this possible? and/or an entry in the chart shortcut menu. studies like volume by price for example Date Time Of Last Edit: 2017-04-03 02:07:02
|
[2017-04-03 04:03:01] |
|
There are new Control Bar buttons that can be associated with Study Collections. Refer to: Control Bar: Control Bar Study Collection Buttons and Keyboard Shortcuts 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-04-03 06:36:44] |
4646ed - Posts: 230 |
that's different. that takes a study/collection on/off the chart. i want to be able to get into the settings tabs of a particular study without having to open studies then select the study then click on settings then maneuver to the setting i want to change - with the same study on many different charts then i have 4 or 5 or 6 extra clicks per chart...and if i want to try many different variations within the settings of one chart...it takes a long time. the IDEAL way of solving this problem, which i have mentioned at least once years ago, is to have a GLOBAL version of any studies applied to many charts. For example: RIGHT NOW, if you want to do something very simple even like change the color of the 200 EMA on 15 charts you have 2 options: 1. open all charts and then the individual studies and then change the color on each one. Really slow and tedious. 2. open one chart change the settings on the EMA then save it as a single study/collection then remove and apply to each chart -- not AS slow but certainly still slow...and tedious. And then if i want to change the length of the EMA after I have to save and remove and apply all over again...etc. Anyone who opens a lot of charts and applies only even a few studies to each would be ecstatic over an easier faster way of doing it. my suggestion is to do it like global graph settings are done -- you set the settings for one study for one chart (give it a global ID# or something) and all the charts with the same study are simultaneously affected. THEN you could give each global study a control bar button. 2 or 3 clicks and voila all the changes done in a few seconds that used to take 15 minutes. Date Time Of Last Edit: 2017-04-03 06:49:43
|
[2017-04-03 17:38:05] |
|
You need to use this method to quickly access study settings: http://www.sierrachart.com/index.php?page=doc/ChartStudies.html#QuickAccess And the Chart Linking feature for Studies: http://www.sierrachart.com/index.php?page=doc/WorkingWithCharts.html#ChartLinking 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-04-04 01:28:30] |
User20450 - Posts: 330 |
+1
|
[2024-03-04 23:27:54] |
cesium - Posts: 129 |
Hello, Im attempting to quickly change the Market Depth Historical Graph study Lowest Quantity for coloring input number without opening settings, Im able to type the following in the title bar to change the input quickly, in:id15.in8=60
However, is there a way to change this setting using a control bar button? Perhaps with increasing or decreasing buttons? If not, could a button be custom made on my end? or is there a way to send the string from my clipboard? Thank you Date Time Of Last Edit: 2024-03-04 23:40:19
|
[2024-03-05 00:20:12] |
John - SC Support - Posts: 39395 |
There is no built-in control bar button options that will do what you want. You can, however, create a custom study that can interact with a control bar button to do what you want. Refer to the following: Advanced Custom Study Interaction With Menus, Control Bar Buttons, Pointer Events For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2025-01-21 19:11:05] |
n8trading - Posts: 44 |
I'm using ChatGPT to create the code for this button and I've got it to work after several mistakes that ChatGPT was making but ultimately figured out and corrected. Pressing the button sets the trade symbol to MNQ, and releasing the button clears the trade symbol value. However, I want to add another function to set the order quantity back to 1 when releasing the button and reverting back to NQ. But ChatGPT isn't finding a way to do this. Is there a function in the API that I can point ChatGPT to that can simply ensure that the trade quantity is set back to 1 when switching from MNQ to NQ? I am using the stock order quantity buttons (OrdQty 1 for example) in my control bar. Is it possible to have the code depress that button, or is there a better way to set the order quantity in the trade window back to 1? |
[2025-01-21 19:37:58] |
User431178 - Posts: 654 |
Is there a function in the API that I can point ChatGPT to that can simply ensure that the trade quantity is set back to 1 when switching from MNQ to NQ?
ACSIL Interface Members - Variables and Arrays: sc.TradeWindowOrderQuantity |
[2025-01-21 20:35:57] |
n8trading - Posts: 44 |
Perfect, thank you! I'm quite impressed with ChatGPT even though it made a lot of mistakes and we had to go through several interations. Here is the final code which should work for any mini/micro symbol pair where the micro symbol simply has a "M" prepended to it, in case any one is interested. #include "sierrachart.h" SCDLLName("Toggle Mini/Micro Symbol") // Function to change the trade symbol void SetTradeSymbol(SCStudyInterfaceRef sc, const SCString& newSymbol) { sc.TradeAndCurrentQuoteSymbol = newSymbol; // Set Trade Symbol } // Function to set order quantity void SetOrderQuantity(SCStudyInterfaceRef sc, int quantity) { sc.TradeWindowOrderQuantity = quantity; // Set order quantity to the specified value } // Main study function SCSFExport scsf_ToggleMiniMicroSymbol(SCStudyInterfaceRef sc) { static bool isButtonPressed = false; if (sc.SetDefaults) { sc.GraphName = "Toggle Mini/Micro Symbol"; sc.StudyDescription = "Toggles the Trade Symbol between Mini and Micro based on button press and release."; sc.AutoLoop = 0; // Manual execution mode // Set the button text for the custom study button sc.SetCustomStudyControlBarButtonText(0, "Toggle Mini/Micro"); return; } // Detect button press event (SC_ACS_BUTTON_ON) if (sc.PointerEventType == SC_ACS_BUTTON_ON) { // Only change the symbol when the button is pressed if (!isButtonPressed) { SCString currentSymbol = sc.Symbol; // Get the current chart symbol SCString microSymbol = "M"; // Start with "M" for the micro version microSymbol.Append(currentSymbol); // Append the current symbol to "M" SetTradeSymbol(sc, microSymbol); // Set the trade symbol to the micro version isButtonPressed = true; } } // Detect button release event (SC_ACS_BUTTON_OFF) else if (sc.PointerEventType == SC_ACS_BUTTON_OFF) { // Null the TradeAndCurrentQuoteSymbol and set order quantity to 1 when button is released if (isButtonPressed) { SetTradeSymbol(sc, ""); // Null the symbol when switching back to default SetOrderQuantity(sc, 1); // Set the order quantity to 1 isButtonPressed = false; } } } Date Time Of Last Edit: 2025-01-21 22:21:54
|
To post a message in this thread, you need to log in with your Sierra Chart account: