Video by via Dailymotion
Source
Such an analysis technique needs three elements:
1) To be able to detect when a bar is clicked on the chart
2) To clear vertical lines drawn when a previous bar was clicked
3) To create and draw vertical line drawing objects
In this tutorial, rather than hard-coding the number of bars before and after the bar clicked, the number is determined by a user input (Gap) as are the weight and thickness of the vertical lines.
The colors of the lines are hard-coded but could easily be changed.
Technical lessons include:
Using the ChartingHost class to determine when a bar is clicked
Creating BNPoints for the bars where we draw Vertical lines
Clearing and adding VerticalLines to the chart
Modifying the weight and style of the vertical lines
See: https://markplex.com/free-tutorials/tutorial-194-drawing-vertical-lines-to-left-and-right-of-a-clicked-bar/