Login Page - Create Account

Support Board


Date/Time: Thu, 28 Mar 2024 12:49:03 +0000



[Programming Help] - Cut drawing object-2 items->1 UI & 1 ACSIL - one general tool request - One Doc update

View Count: 496

[2022-05-01 20:43:58]
JohnR - User831573 - Posts: 296
-->Cut drawing object<-- I really like this ability. I prefer it to the "Extend" capability, in my currrent usage. There is documentation for the ability to cut a drawing object by the user from the menu. I like the way this is possible, Great capability. B U T --- there are a few things I am looking for answers / knowledge / direction. Please!
- In playing/testing with objects on the chart I came to the following conclusions. It is not a one time cut, as SC does keep track of this cut bar # some where, and it is tied to that specific object, presumably until I "Extend". Verifiable, because if I move the object around, it does stay with the cut bar as the end of the 'seen' object. If it matters, for this project, I am specifically interested in the 1 - pitchfork and 2 - ray drawing tools.

From a UI need
1 - When I bring up the Pitchfork or the Ray / Line Properties popup menu - by a right click on the object then select Chart Drawing Properties. I do not see it stated on any of the 3 tabs, that this object instance is "cut". I would like to see a check box for Cut_Left & Cut_Right, the state Cut/UnCut and/or an offset / bar # where the cut was selected. I do see "Extend" and it's multiplier field, but it has no effect on "Cut". Please add to the 'Options' tab. Cut Left and Right info.
- from a usage stand point, it would be great to have the ability to go back to the original uncut / un-extended original shape / properties prior to cut/extend, as the 2 or 3 selected points are still visible properties.

From an ACSIL train of thought

2 -Which properties in which data structure would have the values/state of a drawn object that is has been cut? --- Cut_State_Left, Cut_Left_BarNum, Cut_State_Right, Cut_Right_BarNum.

I have not found the properties within each type of drawing objects data structure or an associated structure containing the values.
- Are cut values an offset, or a specific bar/dateTime value?
- Is state(s) a separate property or determined via non_zero value in BarNum properties.
Please, please please, share this. I am willing to sign an NDA if you prefer and also, work is intended for my personal use, but I am also willing to share if you prefer and see some value?

My general tool request, add a property called "Text" to all drawn object types. It is there for some now. I think it could could be used as a possible solution if it were part of add drawn objects. Also add View/Edit "Text" and check box to hide on the Options tab. People could creatively use it, if consistent across all tool types, for a # of tool enhancements they have requested. They would have to code, but they can achieve their desired results. This "Text" property would be available for all drawn object types. Both User and ACSIL drawn tools. Please include the ability to hide the text. This way we could access it from ACSIL, but not clog up the UI with unnecessary text. for the user that wants to turn on / off certain sup/res objects across multiple charts. Using this common "Text" property and shell of logic like included in the provided Menu/ControlBarButtons to turn on / off Just like Hide does currently individually.

In my case, I am adding lines to the pitchfork tool, based on the original 3 selection points. If I, as a user, move / delete or do anything to the original pitchfork, my code needs to be able to be able to make corresponding adjustments to the additional drawn objects I put on the screen using ACSIL. I would use a unique # name for the pitchfork and my objects to use this as a grouping mechanism. Having the ability to query drawn objects based the Text field for a unique string, would allow me to make the adjustments (Move / Delete / etc ) to my drawn objects. For all desired / included objects to act as one unified thing. As FYI only, My current solution which I am building has started with your example code in Studies.cpp - A good shell, it is easy to add my stuff to various menu selections / control bar buttons activity.

Doc correction - the name of the example in studies.cpp is now scsf_ButtonAndMenuAndPointerExample -- not scsf_MenuAndPointerExample()
Advanced Custom Study Interaction With Menus, Control Bar Buttons, Pointer Events

Hop I am not asking for too much.

JohnR
Date Time Of Last Edit: 2022-05-01 20:45:23
imageMenu_n_Pointer_Example_Doc.jpg / V - Attached On 2022-05-01 19:09:18 UTC - Size: 197.61 KB - 113 views
[2022-05-02 15:42:17]
John - SC Support - Posts: 30401
Actually what you are asking for does not exist. There is no known state when a drawing is cut. When the cut occurs the drawing anchors are adjusted based on where the cut occurred and the drawing is then redrawn with the new information.

So it is not possible to return to the previous state, as it is no longer available.

In terms of the "extend" option, if an object was extended and then cut, the extend variable is then set to 'false'. So it can be extended again from the current anchor points.

--

We'll take care of the documentation - thank you for letting us know.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2022-05-02 16:57:21]
JohnR - User831573 - Posts: 296
First, thanks for your time to reply. I very much appreciate your time.

But I must respectively disagree with the statement "Drawing anchors are adjusted based on where the cut occurred". This is not true for all drawing objects. I've only tested the 2 tools I care about Ray and Pitchfork. So, I do see. hopefully correctly, that for a ray, if it is not "extended", the end anchor value, is the original selected point or the 'new' end point, where the cut took place. I'm OK with that logic.

So, yes it is true for Ray, but for pitchfork, the 3 originally selection points remain as the anchors. You can verify by doing the following.
1 - draw a pitchfork using UI, which has 'extend' as a default.
2 - cut,
3 - then extend
4- remove extend using UI.

The original pitchfork is still where I drew it and the anchors are the 3 points I selected. Even when viewed in the UI the anchors show the values of the original selection. Also, if I cut the pitchfork then move one of the anchors, to modify the shape, SC knows what the "Cut Bar Num" is, and the visual drawing stops at that cut bar.

So, somewhere, SC keep track of each objects cut BarNum / DateTime of each drawn pitchfork. This can be verified by placing 2 pitchforks on a chart and cutting each one. Then move one of the anchors of each one and you will see that each one still uses the cut bar as the last visual drawing point.

I am willing to do screen share with team viewer or another program of your choice.

Please advise

JohnR
Date Time Of Last Edit: 2022-05-02 17:17:56
imagePitchfork no extend.jpg / V - Attached On 2022-05-02 16:41:43 UTC - Size: 33.61 KB - 89 views
[2022-05-02 20:47:06]
John - SC Support - Posts: 30401
You are correct, we forgot about Pitchfork, in which there is a hidden anchor point. We do not know if that anchor is available through ACSIL or not though. You would have to look and see.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2022-05-02 21:49:26]
JohnR - User831573 - Posts: 296
Again thanks for the follow up. If you know the name of this hidden anchor point, it would save some digging. If not, I'll see what I can find. I will get into a debug session most likely tomorrow, and see if I can determine anything by examining all properties I can see in the structure.

JohnR
Date Time Of Last Edit: 2022-05-02 22:03:17
[2022-05-02 22:35:27]
John - SC Support - Posts: 30401
I do not know how this is handled in ACSIL, you would have to look through the documentation and see what you can find.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account