AFL code help

#1
I want to create an amibroker AFL code as per the below requirements.


1. The rectangle should automatically extend to the right side when drawn on the chart.


2. The rectangle should display the price values on the upper and lower line of the rectangle [Right Side extend].


3. The color of the rectangle should be auto set to Red if it drawn above the LTP and should be set to Green if it is drawn below LTP.