Is it possible to code an algorithm so that it identifies ascending and descending channels (like  below) and, on the 1-minute chart, trade when price hits the top/bottom of the channel? What other factors should be considered when designing this algorithm that I may not be aware of. Thank you!