Plot horizontal line at specific price


Category:
0
0

Hi Pete, I need 3 inputs for the specific price on chart and want to have 3 horizontal lines on chart.
Price1 , price 2 price 3 and as per the input of those prices I need lines horizontally on chart.
Thank you,

Shaishav

Marked as spam
Posted by (Questions: 49, Answers: 62)
Asked on November 20, 2022 6:44 pm
68 views
0
Private answer

There are plenty of examples of this already posted in this forum:

https://www.hahn-tech.com/ans/tos-horizontal-line/

https://www.hahn-tech.com/ans/create-and-edit-drawing-tools-from-chart-study/

But neither of those include a user input to adjust the price level from the Edit Studies window. So here is a solution that provides one user input and one line. You can add this to the chart as many times as you want adjust each value to suit your preference. Or you use this code as a starting point and create one study that includes as many lines as you want.

input priceLevelOne = 50.00;
plot levelOne = priceLevelOne;

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on November 20, 2022 7:29 pm