Support Board
Date/Time: Tue, 15 Apr 2025 14:27:25 +0000
[Programming Help] - any available field in s_UseTool Tool structure that can be user defined?
View Count: 110
[2025-03-30 20:17:41] |
JohnR - User831573 - Posts: 330 |
I am looking for a field within the structure sc.UseTool ->Tool that I can fill without messing up SC? II can work with any. int, dbl, float, char. Thanks in advance for any assistance for any one. Example - I use levels with in the pitchfork tool. I use 8. - So can I use level 25 for my stuff? - Can I use this same level 25 in a rectangle highlight tool instance? Thanks in advance for any assistance or direction. JohnR Date Time Of Last Edit: 2025-03-30 20:21:05
|
[2025-03-31 03:51:29] |
User719512 - Posts: 307 |
Ask Grok (or ChatGPT) about Composition and Inheritance of s_UseTool and adding your own extra members/functions, or a map for unlimited key/value pairs. Pretty standard way to extend c++ classes. |
[2025-03-31 04:59:23] |
Sierra_Chart Engineering - Posts: 19226 |
Yes this would be a good idea. Derive from the structure s_UseTool and add your own members.
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, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2025-04-01 14:48:14] |
JohnR - User831573 - Posts: 330 |
First - thanks go out to User719512 for taking the time to respond. I am self taught and only code for my personal stuff. I did follow your suggestion and I working on how to rework my stuff. I plan to try using that ability of C++ as I go forward. So that leads to my next area of lacking knowledge. --> If I use Composition and Inheritance -- Is it safe to presume 1 - I would need to handle the loading & saving to a file the fields (members/properties?) I would add to the structure. 2 - I would also need to handle matching as I load again for my use. 3 - IS this the correct name -- when I use my new 'bigger' structure in a statement sc.UseTool(JORBigTool.Tool) - assuming already defined s_UseTool Tool; as my structure into standard sc statements Again, thanks, as I had never thought of using this logic as a way to extend / create tools. To add, I have used structures to get at fields I wanted/needed to use. B u t - I am starting to have little lights bulbs go off in my brain, as I dug further into C++ classes as a result of my initial request. Man, have I got a lot to learn. JohnR Date Time Of Last Edit: 2025-04-01 16:01:18
|
To post a message in this thread, you need to log in with your Sierra Chart account: