Simple Trendline Help

 

Could someone help me understand how to code a simple trendline.

If I wanted to create a trendline that goes from the high at 0800 to the high at 0900 and extend it out for the rest of the day as it unfolds, what would the code look like?

Also, if I wanted to later check if I was above or below that trendline, what would that look like?

I've tried to read through the manual and dissect code like for the ZigZag indicator, but I'm getting lost in the details of all of the other things going on in them.

Any help would be appreciated!

Reason: