The market is often accelerates and decelerates its movements, so it's not easy to draw the straight lines of support and resistance levels.
The Price Channel Indicator draws the price channel, its upper and lower boundaries are determined by maximal and minimal prices for a certain period.
Price Channel indicator
Translated from russian by MetaQuotes Software Corp.
Original code: http://www.mql5.com/ru/code/44