The EA should add three lines on the chart - forming the reference channel and the neutral zone - as shown below. These channels have the same height, and that height will be used to find new channels. A buy is made when the price reaches 50% above the neutral zone, while a sell is made when the price closes below the neutral zone.
2 - from the entry made, an expansion is made with the height of the previous channel, when the price closes above this new channel, the Stop must be moved to the entry, when the price reaches another channel, the stop is moved again. (The EA should allow the option to choose whether the stop will move at each level, or stop at the entry level)
3 - Take profit is 2x (reference channel + neutral zone) from entry
4 - Stop is below the reference channel
5 - if the price hits the stop before the stop moves to the entry, a new entry must be made, in the opposite direction when the price closes below or above 50% of the channel depending on the trend.
6 - if the price takes the stop after it moves to the entry, the EA must analyze the trend, if the trend remains the same, it must perform a new trade when the price breaks 50% of the channel, if the trend changes, the Ea must trade when the price closes below the neutral zone.