The ruler tool is pre-selected in the toolbar. Drag from A to B on the chart.
The ruler is a built-in toolbar tool, pre-selected here with toolbar.autoSelected: 'measure'. Drag across the plot: a shaded band spans the two points and a readout shows the change, the % change and the range between them, with the endpoints snapped to the price line (the finance-style default, measure.mode: 'span'). Green means the move is up, red means down. Release to pin it; a pinned ruler is stored in data coordinates, so it stays glued when you zoom or resize. Click the ruler icon again to deselect it and hand the plot back to zoom; the m key still works too. Fires the measured event. Set measure.mode: 'free' for a diagonal ruler between any two points. Needs the measure feature. Clear removes all rulers.