1

I want to draw vertical line for example on the day specific start.

In manual there is example:

plot(timestamp(2016, 01, 19, 09, 30),linewidth=3,color=green)

But this drawing horizontal line instead of vertical.

Thanks for help.

PineCoders-LucF
  • 8,288
  • 2
  • 12
  • 21
Esperanz0
  • 1,524
  • 13
  • 35
  • Please link to the "manual" so we can see. – not2qubit Feb 14 '18 at 11:55
  • https://www.tradingview.com/study-script-reference/ – Esperanz0 Feb 14 '18 at 14:23
  • link the example you are quoting, not the entire manual... anyway, see my answer [here](https://stackoverflow.com/questions/47610638/how-to-draw-a-vertical-line-in-tradingview-pine-script). Please recall that SO **is** a programming site, so there are no solutions handed to you without you having tried yourself first. You need to use `style=histogram` and figure out the tick from the date. – not2qubit Feb 14 '18 at 21:41
  • Possible duplicate of [How to draw a vertical line in TradingView pine script?](https://stackoverflow.com/questions/47610638/how-to-draw-a-vertical-line-in-tradingview-pine-script) – Dan Beaulieu Nov 17 '18 at 02:36

1 Answers1

-1

Now in Pinescript v5, you can code :

line.new(bar_index, 1, bar_index, 10, extend = extend.both)

You will get a vertical line at x=bar_index

G.Lebret
  • 2,826
  • 2
  • 16
  • 27