Login Page - Create Account

Support Board


Date/Time: Wed, 02 Jul 2025 04:54:03 +0000



Ending my Line Drawing

View Count: 572

[2021-01-19 12:47:27]
WHum7812 - Posts: 23
Hello:

I am using the USETOOL function to draw a line horizontally from a start candle to an end candle. Once I specify a start index and value in UseTool, I want the line to display on the chart and extend to the right until my program specifies an end index. Therefore, initially I set the LineNumber, the startindex and startvalue in the UseTool function. Later, when I want the line to stop, I modify the Line (using UTAM_ADD_OR_ADJUST) to get it to end. The problem is that the line will not display on the chart until such time I specify the endindex in UseTool. Only then, will the drawing appear and display on the chart. It displays correctly, so I assume I am using the UseTool function correctly.

Since it reacted that way with the LINE, I then tried the exact same thing with the DRAWING_RAY. In this case, it displayed properly in between the time of the start and the end of the line drawing. However, the problem this time is that the Ray will not end. In the line properties, I can see the two anchor points for the beginning and the end index, which are correct, but the Ray will not stop and continues to the right edge of the chart. I know that is what the DRAWING_HORIZONTAL_RAY is supposed to react like, but is the DRAWING_RAY not different? It does also show a {} symbol above and below the line at the END candle as if it recognizes the end point. However, it just didn't end there.

I am really sorry to bother you with this but I have spent considerable time testing all the scenarios to try to make this work and cannot get it. In case you ask... I have also substituted using the index with the DateTimeIn. It reacted exactly the same as the results I explained above for both Line and Ray.... thank you,
[2021-01-19 14:00:56]
JohnR - User831573 - Posts: 333
Hey WHum7812,

I am not a guru by any means, but I am pretty sure the 2 scenarios you describe is what you need to incorporate into your final solution. You need to use both Horizontal tools - Ray and Horizontal_Line_Non_Extended. When you first draw the line, use the Ray, which will extend as you wish to the right. Then once your logic determines there is an end point, you would delete that "tool" / line object and draw a new one using Horizontal_Line_Non_Extended giving it both the start and end points.

JohnR
[2021-01-19 14:09:40]
WHum7812 - Posts: 23
That makes total sense... I cannot believe I never thought of that. Thank you. As soon as I am done trading for the day, I will give that a try. Thank you very much. I will let you know how I make out.... Ward
[2021-01-19 15:14:37]
WHum7812 - Posts: 23
Thank you JohnR - User831573

I first tried just changing the DRAWING_HORIZONTAL_RAY to DRAWING_LINE when I went into Usetool to modify the drawing but that did not work. So, then I use the Sierra function sc.DeleteUserDrawnACSDrawing(sc.ChartNumber, UpLineNumber); to delete the drawing and re-created it as a DRAWING_LINE with begin and end index, value and an UpLineNumber. It worked great.

I am very grateful for your assistance JohnR. This has been a perfect example of not seeing the forest for the trees for me and then having you come in with their outside point of view.... I love it. Thank you very much.

Ward

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

Login

Login Page - Create Account