Algorithmic Rules Of Trend Lines