Drawing a horizontal or vertical line segment in past
Posted: Mon Nov 01, 2021 9:12 pm
I have a question about drawing a line between price points in the primary window that are in the past and future.
Examples :
1) I want to draw a horizontal line from 9:00AM - 4:15PM today at price = 4500.00. The current time is 1:00PM
2) I want to draw a vertical line at 10:00AM from 4500.00 to 4515.50. The current time is 1:00PM
I use the addpoint() method to draw lines on an interval basis, but that only works going forward.
I have a question about drawing a line between price points in the primary window that are in the past and future.
Examples :
1) I want to draw a horizontal line from 9:00AM - 4:15PM today at price = 4500.00. The current time is 1:00PM
2) I want to draw a vertical line at 10:00AM from 4500.00 to 4515.50. The current time is 1:00PM
I use the addpoint() method to draw lines on an interval basis, but that only works going forward.
I also use the addShape() method functionality that can draw at a time relative to the current time to put a shape on the screen, or absolute location based on location in the window. But I haven't figured out how to determine the exact point that equates to both price and time so that I can draw lines from one point to another, and have them persist (when changing the price / time scale).
If there's a sample app that does this that would be very helpful.
Thanks
Examples :
1) I want to draw a horizontal line from 9:00AM - 4:15PM today at price = 4500.00. The current time is 1:00PM
2) I want to draw a vertical line at 10:00AM from 4500.00 to 4515.50. The current time is 1:00PM
I use the addpoint() method to draw lines on an interval basis, but that only works going forward.
I have a question about drawing a line between price points in the primary window that are in the past and future.
Examples :
1) I want to draw a horizontal line from 9:00AM - 4:15PM today at price = 4500.00. The current time is 1:00PM
2) I want to draw a vertical line at 10:00AM from 4500.00 to 4515.50. The current time is 1:00PM
I use the addpoint() method to draw lines on an interval basis, but that only works going forward.
I also use the addShape() method functionality that can draw at a time relative to the current time to put a shape on the screen, or absolute location based on location in the window. But I haven't figured out how to determine the exact point that equates to both price and time so that I can draw lines from one point to another, and have them persist (when changing the price / time scale).
If there's a sample app that does this that would be very helpful.
Thanks