'Movable vertical line pine script

I want to add a vertical line like below pic and it should be movable line, I'll tried many codes but they can't add movable vertical line, how can I do this ? please help

enter image description here



Solution 1:[1]

use the input.time function

inp_time1 = input.time(timestamp("21 Mar 2022 00:00 +0000"), "Date", confirm = true)

for example like this, the 'confirm' means you have you pick a time first before the indicator works.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Gann Bino