Support Board
Date/Time: Tue, 26 Aug 2025 10:27:49 +0000
Horizontal Relative Drawing Indexes
View Count: 215
[2025-07-06 00:27:01] |
maxpi - Posts: 188 |
I'm placing some ACS lines on the same chart the study is running on. I try to use relative indexes for the end datetime and the lines always end on a bar, never between bars. I've used relative vertical placement before and it works fine but this escapes me.
|
[2025-07-06 06:11:20] |
Sierra_Chart Engineering - Posts: 20734 |
Yes this is correct and cannot be changed: I try to use relative indexes for the end datetime and the lines always end on a bar, never between bars.
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-07-06 11:24:11] |
maxpi - Posts: 188 |
The UseTool documentation should be corrected
|
[2025-07-06 11:46:05] |
User431178 - Posts: 764 |
I try to use relative indexes for the end datetime and the lines always end on a bar, never between bars. When using both BeginDateTime and EndDateTime values in the 1-150 range (and when AddAsUserDrawnDrawing = false), for me at least, drawings are definitely being mapped between bars to accurate pixel locations. I have made various gauges and display grids using relative horizonatal and vertical positioning, these would not have been possible if the drawings mapped to the nearest bar index. Date Time Of Last Edit: 2025-07-06 11:46:30
|
[2025-07-06 15:03:00] |
Sierra_Chart Engineering - Posts: 20734 |
That is interesting. This is not what we see in the code: When using both BeginDateTime and EndDateTime values in the 1-150 range (and when AddAsUserDrawnDrawing = false), for me at least, drawings are definitely being mapped between bars to accurate pixel locations.
I have made various gauges and display grids using relative horizonatal and vertical positioning, these would not have been possible if the drawings mapped to the nearest bar index. We need to spend some time to see how this works . It would be best if we can support positioning between bars. Especially when using high-resolution positioning: s_UseTool::UseHighResolutionForWindowRelativeCoordinates 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 Date Time Of Last Edit: 2025-07-06 15:05:42
|
[2025-07-06 16:39:11] |
User431178 - Posts: 764 |
That certainly is interesting. To use a value relative to the left side of the chart for BeginDateTime rather than an absolute Date Time value, specify an integer value from 1 to 150. Per the above, the docs mention using integer values in range 1 to 150 but fractional values (setting BeginDateTime and/or EndDateTime using double) also appear to be supported and, more importantly, are accurate in terms of their positioning. As an example, using 3, 4.5, 6, and 7.5 for BeginDateTime results in the edge of the drawing being moved left to right in equal steps. |
[2025-07-06 18:28:26] |
Sierra_Chart Engineering - Posts: 20734 |
Yes that does make sense. We are doing testing, and we can see that the relative values are not actually being mapped to the chart bar coordinates but when we look in the code they are. There may be some other special handling of them elsewhere that we did not look at.
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 Date Time Of Last Edit: 2025-07-06 18:29:00
|
[2025-07-06 23:03:28] |
maxpi - Posts: 188 |
I would love to know how to accomplish this. Are there commands for horizontal similar to Tool.UseRelativeVerticalValues = true;
|
[2025-07-07 10:47:18] |
maxpi - Posts: 188 |
OK, much better now but not ideal... if I declare Tool.UseRelativeVerticalValues = true and place integers for both the horizontal and vertical values i can have relative positioning of the horizontal values. Ideally i could use floating point values for the vertical and integers for the relative horizontal positions but when i write it that way the lines simply do not draw...
|
[2025-07-07 11:21:45] |
User431178 - Posts: 764 |
Maybe something is wrong in your code? OK, much better now but not ideal... if I declare Tool.UseRelativeVerticalValues = true and place integers for both the horizontal and vertical values i can have relative positioning of the horizontal values. Ideally i could use floating point values for the vertical and integers for the relative horizontal positions but when i write it that way the lines simply do not draw... What do you mean? Do you want to use actual (not relative) values for vertical but use relative for horizontal? Only set Tool.UseRelativeVerticalValues = true if you need relative vertical position. |
[2025-07-08 00:27:29] |
maxpi - Posts: 188 |
I thought i was accomplishing relative horizontal positioning but was mistaken. I indeed do want relative horizontal positioning and actual values for vertical...
|
[2025-07-08 09:07:31] |
User431178 - Posts: 764 |
I thought i was accomplishing relative horizontal positioning but was mistaken. I indeed do want relative horizontal positioning and actual values for vertical... From previous post (though edited slightly): When using both BeginDateTime and EndDateTime values in the 1-150 range drawings are definitely being mapped to accurate pixel locations. So what are you doing for it not to work? |
To post a message in this thread, you need to log in with your Sierra Chart account: