1. Create consolidation function in mq4 code. So the function does consolidation in a few time frames (e.g. 5mins, 15mins, 1 hour ). Can write it as a function where the time frames are passed into the function.
2. When a channel is identified, put a buy & sell order (buy on top of the channel & sell below the channel) the function will cancel the other order, when one of them is triggered.
Will provide more info upon accepting