Getting the slope of a line

I want to draw a line on a chart from one pivot to another pivot, and then see on the chart a statement which says 'x cents per bar' or similar. Can this be done?

you can start from here.

If you share the code for the pivot array(s) and use gfx to draw your lines, or you can also use BarsSince() and calculate Rate_of_change() too.

AFL Function Reference - LINEARRAY can plot lines with this too!

Plotting lines for specific array values only - AFL Programming - AmiBroker Community Forum